#arma3_scripting
1 messages Β· Page 354 of 1
private _nil = {_x setSkill ['aimingAccuracy',0.01];false}count (crew _vehicle);
In case commander has a weapon etc.
I find that setting all crew memebers to low accuracy causes less porblems then leaving some with higher accuracy, especially if vehicle might be different
And some vehicles have more than 1 gunners
that code i just trow on the vehicle init or i need to swap something?
Yea you do
_vehicle = this;
private _nil = {
_x setSkill ['aimingAccuracy',0.01];
false
}count (crew _vehicle);
That should do the trick
Make sure you add that to the VEHICLE
comment 'Set group accuracy to low';
_unit = this;
private _nil = {
_x setSkill ['aimingAccuracy',0.01];
false
}count (units _unit);
Would work on group/unit
I think some vehicles are scripted or sth, I couldn't change accuracy of some RHS vehicles..
or maybe old interpolation was playing tricks on me
Gotta retest ai
So, i've got a quick question, or so i think, so i made this mission in which you have to hunt down 3 Narcos, but they're in a party, the moment you get close (BLUFOR "present" activated trigger) they will try to start running to a helo and the pilot will get in first (so he gets the pilot seat) and then he'll fly them off to a point in the map that if the reach makes you lose the mission, thing is i made the init in the 3 Narcos this:
NarcoName disableAI "MOVE";
and then on the trigger i placed:
NarcoName enableAI "MOVE";
Y syncd the trigger to they waypoint of both, pilot and narcos so that when the player gets inside the trigger it activates, and they get inside the helo and then i placed a waypoint with this init:
((obj1 in helo1) || (!alive obj1), (obj2 in helo1) || (!alive obj2), (obj3 in helo1) || (!alive obj3))
and i also tried that with a "Waypoint activation" trigger, but the pilot will still fly off withouth the 3 guys
you guys know a better way to make AI do a decent convoy?
group them, and make waypoint on group leader, thats the best i can get, mb there is other way
way points does not seens to work if i need to stop a vehicel somewere and then move
use waypoint activation fields to stop the vehicles etc
@astral tendon you could use a trigger that uses "Group disableAI "MOVE""
Oh yeah, you'd have to use it for every single unit, my bad
my problem really is that some times i need they to split to park in one directon but they do not break formations
the condition youre typing will never return true in my opinion
@golden storm what condition do you want ? the one youre typing is weird
@simple solstice thx
what is the equivalent to the DoStop to units follow their waypoint again?
_unit doMove position _unit;
This will order them to move to where they are atm. Which will be completed instantaneously and then the unit returns to formation.
_unit is the name of the unit i need to swap?
Yeah. It's a variable. Replace as needed.
in my case are 4 units
This code is for 1.
so i just repeat?
Yeah, or make a loop if you want it to happen at the same time and you don't want to write it down multiple times.
{
_x doMove position _x;
} forEach [_unit1, _unit2, _unit3, _unit4];
The wiki lied again. It says forEach accepts uncompiled string as code block and so does the ingame hint.
"systemChat _x" forEach ["a","b","c"];
This just says "generic error" for me.
Wiki is usually nice to me
maybe he lies when he's drunk
It is saturday after all...
@little eagle probably removed that
and nobody updated the wiki
weird part is the ingame hint though ...
that should work with supportInfo
commy2 that did not worked, the AI is not moving to its original waypoint
@little eagle I guess "(OFP / Armed Assault) " means String for OFP and Code for Arma
Just delete it from the wiki if it no longer works ffs.
quick question: can doMove be used without errors for other objects? (createVehicle)
that actually is enough for me
limitSpeed 0 does not work?
(A3 1.24)To clarify, limitSpeed only do effect on non-player controlled AI units, it has continuous effect and AI wonβt break through the speed limitation until one is contacted, engaged or regrouped.
yes but, the AI still moves
So i'm making a custom Arsenal with the help of a script i found on the ARMA 3 forums, i've modified it with the ACE and TFAR mods, and i've added some class names of the items i want to add, but although i have the ace mod enabled it will only list the vanilla items, and it will only show a piece of the error:
Class "TFAR_mr3000_multicam" not found in CfgWeapons
You have TFAR not loaded. Apparently. And if it doesn't show ACE items.. You also didn't load ACE
They ignore the speed limit in danger mode obviously.
Isn't TFAR_mr3000_multicam a backpack and not a weapon?
Well i have loaded both of them on my side, so i don't get why it won't show
Don't use addWeaponCargoGlobal with a backpack is what the game is trying to tell you.
_contents =
nul = ["AmmoboxInit",[_this,false]] spawn BIS_fnc_arsenal;
clearBackpackCargoGlobal _this;
clearItemCargoGlobal _this;
clearMagazineCargoGlobal _this;
clearWeaponCargoGlobal _this;
{
_toAdd = _contents select _forEachIndex;
_fnc = missionNamespace getVariable format [ "BIS_fnc_addVirtual%1Cargo", _x ];
[_this, _toAdd, true ] call _fnc;
}forEach [ "backpack", "item", "magazine", "weapon" ];
THats the code i used is it wrong?
Probably not this part.
But that first line does look fishy.
Assignment without anything behind the equal sign.
lacks commands like https://community.bistudio.com/wiki/sideEnemy
Well i didn't paste the full list because it was huge
west
east
blufor
opfor
resistance
independent
sideUnknown
sideLogic ???
sideFirendly
sideEnemy
civilian duh
something about animals too
Did I forget something?
sideEmpty is "sideNull" I guess.
probably
is there a command to set the text of a listbox to centered left or right?
No.
no command, only style
sideAmbientLife !
So, on the arsenal would i need to use addWeaponCargoGlobal, addItemCargoGlobal, and so on manuall for it to work so i tell the game what kind of item they are?
while (_item isEqualType []) do {
_item = _item param [0,""];
};
does this make sense?
it makes item
You just have to make sure that the radio backpack is in "backpack" and not "item", "weapon" or "magazine", Lorflord.
lmao X39 π
It should find the string in all my 100 nested arrays
Is item a string?
[[[["rifle"]]]]
_item = str _item splitString "[" select 0;
Ok, thanks @little eagle ! π
"""rifle""]]]]"
_item = str _item splitString "[""" select 0;
???
I want it to automatically work if user makes a mistake and nests the array too many times π
ye
_item = str [[[["rifle"]]]]splitString "[" select 0;_item
"""rifle""]]]]"
Of course it does!
why "["""
is the while worse?
It looks dumb, but so does mine.
the while would be worse if there would never be a string or anything in the array
systemChat format ["_size %1", _size]; // 4.62894
systemChat format ["_centerposASL %1", _centerposASL]; // [12435.8,14287.2,8.04945]
_check2 = [_centerposASL,_size,8,1.25] call Ivan_fnc_circle_check;
today is nothing works day.
Generic Error in Expression _check2|#|
Delete the space between ``` and sqf and all spaces after sqf
ahhh.
Top!
commy2 to the rescue, as always
I think Ivan_fnc_circle_check returns the assignment operator.
googles assignment operator
=
Example:
_a = {
_b = 1;
};
^ This would cause the same error.
You have to make your functions so that they never end with an assignment operator, because SQF is shite.
Fixed:
_a = {
_b = 1;
nil
};
Sorry for the variable names. Too much trigonometry today.
I don't think i follow. https://github.com/ArmAIvan/ADMM3/blob/master/ADMM3.Altis/functions/common/fn_circle_check.sqf
Just use the debug console and play around with:
_a = {
_b = 1;
};
The function you posted looks fine. Updated by chance? The error is definitely from a returned assignment.
i remember i saw it some were, is there a command to set the distance of a vehicle to another?
Hi guys
is it possible to add a proxy using a script? or is attachTo the only way to add another object using scripting?
depends on the functionality the attached object needs to have
you can always use simpleObject to spawn a thing without class name based on a model file path
how do i identifie a gunner of a vehicle?
like, i wanna make a telepor that one gunner in a vehicle gets teleported to another one
gunner _vehicle
might not work for some vehicles, depends on the setup
like in a blackhawk / ghosthawk the door gunners are both "gunners"
in that case you'd have to use fullCrew and check for turret (with fire from vehicle turrets off)
@little eagle i uploaded the very current version of the function to github before linking to you.
{!isNull gunner _x} count [car1, car2, car3, car4, car5, car6] => 4;
this is acondition to a trigger
what is wrong?
bigger or equal. Not equal or bigger
thanks
gunner test moveInGunner car1;
this is a trigger activation
i wanna the "test" gunner to be in the car1 gunner
how should i put it?
look up the syntax
myGunnerGuy moveInGunner myTank
=> makes for the better smiley though.
how is the myGunnerGuy ?
test is a vehicle also?
i wanna the gunner of "test" moveInGunner to "car1"
Delete the space after sqf
so (gunner test) moveInGunner car1
Parenthesis aren't needed.
@badbenson#0154
thanks
Hey guys, I'm trying to use BIS_fnc_spawnGroup to spawn custom compositions that consist of buildings and units.
When I use this function, it doesn't seem to make use of the "dir" attribute and just points all of the objects in the composition in the same direction... any thoughts? Or more information needed?
@autumn palm dir = direction 0-360 iirc
It can't be outside of this? I thought - just "counterclockwised" it
No I don't think so. What are you trying to do exactly?
I have a laptop that's a Composition Spawner
Brings up a list of compositions
You choose a composition
then select a spot on the map
and it safe spawns it around where you clicked
Just tested a composition that has all 0-360 directions and it did the same thing :/
well yes, the direction parameter doesn't go past that.
Ignore the dir outside of 0-360
They're all within 0-360 in another composition I'm using
this one was just more concise
@subtle ore Bohemia themselves use negative values for dir in their cfggroups btw
I think you mis understood what I had said.
Alright, can you clarify, please?
What I had meant is that, yes you can input a negative value but it's from 0-360 in either direction
if I didn't convey that clear enoug the first time, I am sorry
Nah, that's fine, well then my config groups adhere to that standard
Still need to find out why it's not taking effect when using BIS_fnc_spawnGroup
If I put them down in Eden they all face the correct way no problem
if you pass a direction in the spawnGroup function then it'll take over the direction defined in config afaik.
Yeah, I'm not passing a direction
I assume it defaults to nil... maybe that's the problem
check out what the default is in the header. Maybe it assumes a default direction
Looks like spawn group does default an azimuth
I'll just take it and rewrite it to pull the object's dir
thanks much!
Sure.
Does anyone know what colour I can use for a chrome colour on vehicle?
grey?
I mean to actually get a chrome colour
chrome is light grey. its just super reflective soo Id suppose you need to have high specular value on it
and maybe mess with the fresnel value
Hmm alright
if this for car rims then π
How to send an invite link for discord?
@atomic epoch click the little avatar button next to a channel. It'll walk you throgu the invite, but this shouldn't be in the scripting channel.
thx
How do I do dialogs during briefing?
look for a rsc config for briefing?
or is there one? I know there is one for debriefing, still looking to find briefing here.
map idc is 12
Hmmm... π€· , don't think the briefing has the same idc as map
since you have the cancel, continue, and he shit up at the top. Or maybe it's created over the top.
What's the plan STAN?
for "_i" from 0 to 100000 do {
if !(isNull findDisplay _i) then {
str _i call debug_fnc_log;
};
};
aha
4:15:06 "0" //IDD_MAIN
4:15:06 "52" //IDD_SERVER_GET_READY
4:15:06 "63" //IDD_CHANNEL
4:15:06 "70" //IDD_MP_SETUP
4:15:06 "313" //IDD_CUSTOMINFO_CREW
busted
nigel, allDisplays is a thing too^^
shiddd
Haha.
Neat Commy, thanks for that.
@little eagle do you know a magic trick to get every var in a namespace?
I have an array that for whatever reason isn't showing me the values in it, its just displaying as "any"
For context, I am passing a global array into a function:
transport_recieve = [pilot1];
[transport_recieve] call KAL_fnc_propagate;
Propagate does:
params ["_inputArray"];
hint format ["%1", _inputArray];
I'm expecting the hint to read "[pilot1]", which is the variable name for one of my player units.
Instead, it is saying "any"
I'm at a loss of what's happening here.
@waxen tide allVariables
duh. thanks π³
Kal, is the pilot alive?
Found the (odd) issue. Apparently I need to set the paramter in a variable before I can access it. Ex
_test = _this select 0;
I haven't had this issue before. Weird.
Yeah the pilot was alive.
what do you mean set it before you can acess it?
params ["_inputArray"];
hint format ["%1", _inputArray];
returns any
params ["_inputArray"];
_temp = _this select 0;
hint format ["%1", _temp];
returns [pilot1]
doens't make sense. Because params["_inputArray"]; should return _inputArray just like _temp = _this select 0;
It should, but it wasn't working.
that's really freaking odd.
You're telling me. I just spent 2 hours on that.
So i have this in my function: if (_magic isEqualTo []) exitWith {false};
and i wonder why it sometimes returns false
and spend the whole day looking thru every other function
can someone please shoot me
All I can think of midnight is I was executing a local fnc call then calling another function in that, that's the only 'oddity' I can think of
drops dead
π πͺ some cookies and one pill will revive you!
is reincarnated as a professional SQF coder
π±
another weird tidbit,
{
_array pushBack _x
}forEach _something
//No error
{
_array pushBack _x
}count _something
//Type num, expected bool
{
null = _array pushBack _x
}count
_something
//No error
as count is much faster than forEach, and pushBack is also faster than any alternatives, this is the best solution.
@tough abyss nope, it is not
Only if you got a small array
Large arrays are easier merged via +
Assignment is also slower than just using false in the end
The documentation LIES. Again
I dream of the day we have an IDE to run code so its easier to time
And debug. And. Everything.
professional SQF coder π€
I have encountered that strange "paramter array is just any" bug again, and can't for the life of me figure what's going on.
professional SQF coders are a lot like professional russians.
strange accent, shrapnel proof, and shady shit going on all the time.
No, but - really. It's a valid array, it has stuff in it before I pass it, all the other parameters are fine, but its like that one array says "Ah, fuck it" and just becomes 'any'. I can't fathom what's happening.
@tough abyss ArmA.Studio allows you to debug code with breakpoints etc
Also working on sqf-vm to allow running sqf without arna
Check out my threads
You will be led to it too
Sqf-vm can already be used to a certain point
Most up-to-date version is always available as bot on my discord (and on everyone's who decides to add it to his)
So do not always worry that much
Community is probably already on it
@tough abyss found it?
Compy just crashed and I lost 5 hours of work π thanks acer
Wp
Tipp
Memorize ctrl + s
Never needed Auto save
Usually doing it with the ; or newline
I pressed cntrl+s at the exact moment the comp crashed, so now its full of NULL
i press it a lot, file corrupted
Anyway, feel free to join the discord to test the bot
yeah I will. just trying to. Figure out how to salvage this. God fucking damnit.
So your text editor is crap
notpad++
Should show you backup
Unless you run an outdated version
Also your hdd might die sooner or later if it Rly happened on save
Laptop isn't that old but it's happened a few times last couple of days. Figured it was a loose battery at first.
You're right, notepad++ does have some backups, but they're pretty old. Better than nothing at least.
i compulsively hit ctrl s regularly
which I have to cancel on websites
like a twitch reflex
....and when I'm not typing or between actively using keyboard I rest my left hand in a position to hit ctrl s...oddly enough
Worst part of that habit is when you just edit a temporary memory-only file
Clicking away those save dialogs...
yea hitting ctrl s can be bad in some programs
i've saved things I didn't mean to before....a lot
And wondering why you saved some random links? π
but I also don't ever lose data from crashes/sudden restarts for updates π
i just lose data because I am in a program that doesn't allow undo(or undo past once) and just accidentally hit a letter and compulsively hit ctrl s after highlighting everything
Kinda yeah
which is why don't use programs that don't have undo....if you can
lol
I'll dig through it as soon as I figure out why this array dies after I pass it into a function. Been at it for 5 hours now
turns into 'any'
Give code
Probably can tell you in minutes
My neck... Damn train still needs 8 mins
Laptop too heavy
I can literally do
_temp = [pilot1];
player addEventHandler["GetInMan", {
["SUCCEEDED", player, _temp, _this select 2]
call KAL_fnc_depropagate
}
];
BELOW IS KAL_fnc_depropagate
params ["_state", "_requester", "_recievedThisTask", "_vehicle"];
//Finish task for pilots
{
["task_transport_%1", _state, true] remoteExec ["BIS_fnc_taskSetState", _x, false];
} forEach _recievedThisTask;
yet it INSISTS that any _value I pass into it is any
even if I were to do, say
_bob = player;
and pass that into the function call instead of just player, it's just 'any'
The array scope cannot know of the outer scope
Thus you pass an non-existent variable into your event callback
how do I pass the variables then?
Depends on the value type
_temp in this case is an array of playable units
Global variable or passing netids etc
netIDs?
Alternatively try cba
Think cba you can pass custom args
Well... Then you have to write that code yourself
Fucking hell, the fuck kind of language can't pass a fucking local variable to another function
You do not pass the variable
The event is getting its own scope
Not sharing the one it got added to
From
Would I run into the same issue with an array of the netIDs though? I'm building that array from another function that searches for players that are pilots.
the _temp array that i'm trying to pass, that is.
You can pass a string to that function
Command
Which is the difference
Use Format to pass the array
Couldn't I format my _temp array and use the variable names?
But the editor names are global values. If I name a rifleman "bob", bob will always refer to him
I am on mobile right now so cannot Rly provide more help
all good
The alternative Btw is
To add it via set variable to the player
And then just get variable in the event handler from the player object
Train is here
See ya
I, don't know how that works honestly. Guess its time to tinker some more.
player setVariable ["Kal_GIM_args", _args];
player addEventHandler ["GetInMan", {
private _args = player getVariable "Kal_GIM_args";
}];
or
[player, "GetInMan", {
_thisArgs params ["_arg1", "_arg2"];
}, _args] call CBA_fnc_addBISEventHandler;
Assignment is also slower than just using false in the end
Pretty sure an assignment is faster than a nullary command (false). Nullary commands are worse than binary commands and an assignment should be cheap.
But if you're doing {pushBack _x, then you might as well just copy the whole thing with +.
Ooh, fancy. How'd you get the syntax highlighting in discord?
Also, thanks for the code. I'll give it a go when its not 3:00am 8)
sqf after the three backticks, no space
sqf //code
3 of those without spaces sqf at the end
shiftenter after sqf for newline
```sqf
player setDamage 1;
```
magicians
neatt
anyone knows function for "viewing poster from ground" from new LoW DLC ?
I dont, but its probably on the patch notes page somewhere. They talk about the leaflet feature as well, could be on that page too. https://dev.arma3.com/post/spotrep-00073
Very nice.
I am also looking for way to do this marker on map as in LoW DLC, Here is example: http://steamcommunity.com/id/mike_hudak/screenshot/849348382430606242
This "hand draw marker"
yeah, but if it is immage on map controll, why is it on same place when I move map
It can't be an image. Because that would have to either be a RscPicture or similar control, which can't be, because it would be behind the map control.
Or a display which can't be, because then you couldn't navigate the map.
in spotrep is mentioned: Added: IDAP map marker set
copyToClipboard ("true" configClasses (configFile >> "CfgMarkers") apply {configName _x});
It might be a marker you can't place yourself neither ingame nor in the editor. Maybe it's there and you just have to search though.
If you can't with the ui, you can always just use scripting to get it.
should not be there "str" ? copyToClipboard str ("true" configClasses (configFile >> "CfgMarkers") apply {configName _x});
ugh
_display = (findDisplay 37) createDisplay "briefing_roster";
I close the display, close map, boom crash
wth?
should not be there "str" ?
Yes, there should. Well ideally you didn't need it, but you do.
even after allowFunctionsRecompile = 1; I cant seem to be able to make changes to the script files
the text editor says it's locked
but I can recompile the scripts from the function viewer
checked all markers from config, there is none similair with that "hand draw", so it is done some other way
I'm probably being stupid, but I'm getting a generic error for this:
waitUntil {(speed _vehicle > 10) || (isNull objectParent player)};
Any ideas why?
Post the full error from the RPT file
Anyone know why I can't setDamage 1 on an IEDLandBig_F in multiplayer? Tried it first in SP and it works fine there.
Seems to be that editor placed ones can be blown up while ones that are created with createVehicle can't. Anything I'm overseeing here?
that one works, lol what's the difference.
createVehicle in combination with a "mine"-object creates the mine but without its propaties. createMine creates a object with mine propaties
k
like the propaty, that if u go near it it explodes
it doesn't do that just tried that
what was the code?
createMine ["IEDLandBig_F",getpos player, [],0]
doesn't blow up automatically, which I don't mind because I got a trigger setup for it.
but I saw a red triangle hope other people can't see that.
that works.
That is the CfgAmmo object.
what would be faster though to spawn in? I got about 50 randomly spawned.
(gunner test) action ["moveInGunner",car1]
the gunner of the test is not going into the car1 turret
what is wrong?
GetInGunner, not moveInGunner
And I'm pretty sure you'd have to move him out first.
there is a command like sleep to triggers?
i wanna give 1 second before execute another command
trigger timer? there is a countdown and a timeout
to do another action?
if this does not meet ur needs u can always use : _nul = [] spawn {ur_code_here};
if u don't understand this u'd propably need to watch some more youtube videos about scripting
Why _nul = ?
because it throws an error in a trigger without bla=
But you did put a local variable.
And then it complains about "local variable in global space".
try it ourself. it works -.-
Okay and you try without the _nul =, deal?
im seting up a trigger when a player touch the are he get into a vehicle
so how do i make the trigger "know" that i want the guy who touch it must get into the vehicle?
also, i cant especify the player, this is a 4 players coop sething
english machine broke
to make it simple
TheGuyWhoTouchTheTrigger action ["getInGunner",car1];
(thisList select 0) action [balbal]
maybe, and if it works u'd propably have some locality problems with more playable units
who knows, try it π
but thisList returns an array of objects that fulfill the trigger's condition
make sure the cars arent in the trigger area
did not worked
does anybody know how the get the resourses of the most right gaugle of the advanced flight model? i would like to modify it a little
it's a compass
this little guy here
With a mod you can.
well how is it displayed? a dialog a script ?
RscInGameUi
unitInfoTypeRTD = "RscUnitInfoAirRTDFullDigital";
unitInfoTypeLite = "RscUnitInfoAirRTDBasic";
unitInfoType = "RscUnitInfoAir";
uhh nice thx @little eagle
Hey, is it possibel to check if a player is in combat or not without using sleep command?
I don't see how sleep is related to checking if in combat
(thisList select 0) action ["getInGunner",car1];
i tried other ways to make this work but noting
do i need to put something else in the trigger?
also, i am sure i is activating by sound
but it also gives me no error
there is something else i can try?
I did exactly what you wrote and it worked, Roque.
The problem is that you don't understand how any of this works. Without me trying to be mean.
thisList will not contain units that board a vehicle. Only the parent objects in the trigger.
select 0 is a bad idea, because you have no idea which element the player will be.
And so is using this action on remote machines. The trigger fires on every machine.
There is no need for action getInGunner. You can just use the normal moveToGunner sqf command.
But to hop from one vehicle to another, you need to use moveOut first.
yes i had gived up on that
what i am trying to do is when a player touch the trigger he gets in to the gunner of a vehicle on the other side of the map
Trigger:
Type: None
Activation: Blufor
Condition: vehicle player in thisList
On Act.: moveOut player; player moveInGunner car1;
This is my best guess for what you want to do. But you never really explained what that is exactly.
The moveOut player; is needed if you already are in another vehicle.
If that isn't what you want, then you might as well rewrite the condition to: player in thisList without "vehicle".
so basicly, in condition player in thisList
is TheGuyWhoTouchTheTrigger action ["getInGunner",car1];
my first question was how i make a trigger use the command over the player who touch the trigger
The answer is:
Condition: vehicle player in thisList
Then the trigger will only execute if the player is in the trigger.
Not any other blue unit or other player.
If you do it like I did it will work in MP, as long as you don't have "server only" ticked.
"server only" ticked?
Not ticked.
server only would mean that the "on act." code only runs on the server machine.
On a dedicated server, player is always null.
So the condition would always be false.
It's always false anyway, but if you don't tick "server only", then it will be run on all clients too.
And on clients, the player's vehicle can be inside the trigger and therefore activate it.
And then run the code with player always being a local object and moveOut and moveInGunner working nicely.
thats someting that every server owner knows?
How this all works? I doubt it.
All you need to have to own a server is $$$. To understand how it works you need effort.
well, i am making this mission public
i want to make this as friendly and "idiot prove" as possible
funny that i am a little idiot here lol
A trigger like this is pretty self explanatory. But an idiot could just delete the whole trigger and there is nothing you can do about that.
more dificult is AI idiot-proof mission, lol
some times they are too inconsistent
especially driving
they cant do the same conner in the same way over and over again
they aways find a way to fuck up some how
i am trying to eat the frustration frist before the players and find a way round it
especially because i want all of this to work
its a tribute to another game i love
Did you try setdriveonpath for the vehicles? As much as I've understood you want to replicate that driving sequence from Delta Force: Black hawk down?
I do concur with quiksilver that it's best not to rely too much on AI for such things, keep AI actions simple or else it will become too unpredictable.
Hello guys, i am training myself with GUI actually. I am working on a notification system like this one : https://www.youtube.com/watch?v=MTypM4AHc4k
I got some questions, how do i proceed , should i create ctrl directly on one display, or should i create a dialog ?
how can i handle the fact that a notification push the other when she comes out ?
Thanks you
you should search the scripting section of the BI forums for "kill feed". it came up there several times the last few months including examples.
Thanks, you mean this : https://forums.bistudio.com/forums/topic/206593-headshot-killfeed-script/ ?
probably a little bit smaller and leaner thus better example. but you only need some starting point. it's not a crazy hard thing to achieve
oh thats great thanks you
@polar folio awesome, definitievly what i was looking for
allVariables returns all variables on a object or other. How do I differentiate between the variable not being defined, and being nil. Specifically,
player setVariable ["a",1];
player setVariable ["a",nil];
hint str allVariables player
allVariables player may return a nil variable, right?
great, thanks!
sillyHat attachTo [commy2];
Syntax error
no no, works just fine. i'm wearing a silly hat and i have an aircraft carrier attached to my butt, and its all commy2s fault.
im seting up a trigger to start if there is 4 players inside of it, but this is a coop set up, so maybe there is not enough players to fil that requirement, how would be the script?
you can do count allplayers
that gives you the number of all players on the server
then you check if an equal number is inside your trigger to have it activated?
i'm guessing thats what you meant.
but it have to be couting the players on the server to start
like the tigger must ativate with 4 players inside it
but if there is less than 4 players online on the server the trigger can still ativate
count (thisList arrayIntersect allPlayers) == count allPlayers
what do i need to change in it?
Thats it
It checks if there are as many players in thisList as there are players in total
so this condition starts the trigger if all the player online touch it right?
If they fulfill the condition set, yes
E.g. if theyre blufor, the trigger must detect blufor present
nice, this is what i want
what is the variation of player in thisList to also a playable caracter?
Is there a way to attach an EH to my LMB, similar to attaching a displayEventHandler to the keyboard?
So i'm trying to spawn the USS freedom on a client connected to a dedi server, with createvehiclelocal
_pos1 = ((getPos player) vectorAdd [200,0,200]);
_testobject = "Land_LightHouse_F" createVehicleLocal _pos1;
_pos2 = ((getPos player) vectorAdd [0,200,200]);
_new_carrier = "Land_Carrier_01_base_F" createVehicleLocal _pos2;
systemchat format ["new carrier: %1", _new_carrier]; // 2f25294fe0# 1780002: carrier_01_hull_base_f.p3d
_new_carrier setPosATL _pos2;
_new_carrier setDir 0;
[_new_carrier] call BIS_fnc_Carrier01PosUpdate;
but it doesn't work. if i check on my carrier, it returns an object, but there is no object visible. a test object spawned in the same fashion (lighthouse) is visible.
am i insane or is this broken?
why would you want to create it locally?
anyhow, they are each a individual object, it's essentially a composition
so I am pretty sure they have multiple functions for the individual parts.
i'm creating it locally since i'm having it drive around for a cutscene. doesn't work if you create it on a server, too many position updates, lag, etc.
if you just use createvehicle, it works like a charm. the issue starts with using createvehicle local
is this remote exec'd ?
no.
So this is local to the player?
Not sure why it wouldn't work, maybe it's simply incompatible.
works for lighthouses, doesn't work for carrier
also createvehicle works if you run it on server just fine
afaik the only difference between the main createVehicle and createVehicleLocal is just the locality difference
ahhh wait
i forgot
first line in "BIS_fnc_Carrier01PosUpdate" is: if (!isServer) exitWith {};
i copied that script, removed the line, and called my modified copy. doesn't work
copied the function?
Sure.
moveInGunner car1;
i have no clue whats up with that damn carrier
this is a trigger with a thislist condition
what object i put?
this is to work for AI and players
_pos1 = ((getPos player) vectorAdd [200,0,100]);
_testobject = "Land_LightHouse_F" createVehicleLocal _pos1;
_testobject setPosATL _pos1;
_pos2 = ((getPos player) vectorAdd [0,200,100]);
_new_carrier = "Land_Carrier_01_base_F" createVehicleLocal _pos2;
systemchat format ["new carrier: %1", _new_carrier]; // 2f25294fe0# 1780002: carrier_01_hull_base_f.p3d
[_new_carrier] call BIS_fnc_Carrier01Init;
[_new_carrier] call Ivan_fnc_Carrier01PosUpdate;
_new_carrier setDir 0;
_new_carrier setPosATL _pos2;
spawns a nice lighthouse, but no visible carrier
Dunno
Does anyone have any idea how to add ace actions for the gestures class parent?
I can do the main actions, self actions. Tried "ACE_Gestures","ace_gestures", and "gestures" but no go.
disregard last
my getDir in line 62 always seems to return 0 no matter what dir the object is facing
I'm a bit clueless as to why?
is the object those things are being attached to facing 0?
no its multiple objects in random directions
uhm
sorry i missunderstood your question
yes, it is facing 0
save the dir before you attach it and set it again after
attaching an object sets its dir to the dir of the thing its attached to
ur carrier still invisible?
yeah
i'm working around the issue spawning the carrier as global vehicle that is synced over network, since that works
but i can't have it drive around then which is a bit sad
its cause the init script has the isserver check for the visible parts
?
you know how you had to make your own setcarrierpos fnc cause only the server could run the BIS one? its the same deal for showing the carrier parts. the BIS script only lets the server do it
is it Carrier01Init?
yea
i looked at that
but i brainfarted at interpreting the first line again i guess.
i'll try that. thanks
trying to do complicated stuff that requires knowledge in lots of things isn't all that fun sometimes.
Ahh yes, this reduced randomly exploding objects on the carrier deck to a reasonably low number.
Do you know a way to access the units placed as "playable" in the editor that work as slots for players to join?
what do you mean?
well if you design a multiplayer mission you usually put down a bunch of units and tag them "playable" and these units don't spawn if you set "disabledAI" in the description.ext. so how to access those invisible, not-jet-spawned units?
i dont think you can? if they arent spawned they dont exist so.....
http://i.imgur.com/JGSPqnF.jpg also i need an aircraft carrier service technician.
If you disable the AI, then the units don't exist unless someone joins that slot and respawn is enabled.
There are no objects to access.
scratches his head
i guess thats why on all these dayz mods and w/e you always spawn in some odd place and then you're teleported.
This is the closest thing you can do: https://community.bistudio.com/wiki/playableSlotsNumber
well the issue is, these units are on the carrier. i move the carrier. so JIPs end up in water
Just move "respawn_west" marker.
ohhh. thanks.
I'm pretty sure that's enough for JIP players. If not, then you could also just setPos them instead, no?
with an onConnect eventhandler or something?
initPlayerLocal.sqf
The onPlayerConnected one fires on the server. Dunno about the delay, could still make you drown and look weird.
i'll try it out.
Just attach a logic to the carrier and setPosASL or something.
?
Game logic or some other kind of dummy object.
whatfor?
_unit setPosASL getPosASL my_logic
in initPlayerLocalsqf
why not use the carrier directly?
Would spawn you inside it, no?
Yeah, but you need to rotate that, What a pain.
rotate?
The carrier doesn't always point in the same direction, does it?
well it does, but lets assume it doesn't, i don't see the issue?
If you're just going to spawn them in the middle of the carrier and z=25 above, then it makes no difference.
But if you'd spawn them off center, you'd need to rotate the vector or do stuff with modelToWorld as Connor pointed out, idk.
i see
I somehow permanently fucked up BIS_fnc_Carrier01PosUpdate
always looks like this now (with slight variations)
is it your modified version or u using the actual BIS one?
original BIS
calling it on editor-placed, server-setpos'sed carrier.
worked fine 30 times
now doesn't
line 82
I mean i know american build quality can leave things to be desired but ...
haha, yea idk why its doing that.
I'm trying to create an array that contains a copy of each object on a carrier to replicate the same objects on a locally spawned carrier. i kind of need to sort out the carrier parts
this only works partially
OBJECTS: all objects
DELETED: deleted objects because they're carrier parts
SPAWN: objects that will be spawned on new carrier
apparently some parts of the carrier aren't children of "Land_Carrier_01_hull_base_F" ? BI inconsistency or am i being stupid?
you're needing an array of the carrier parts itself or things uve put on the deck?
things i put on the deck
i'm getting too fancypants over this.
minor issues. nobody will notice if i put a bit of fog over this.
is it seriously true that serverCommand can only be executed through a user interface event handler?
Ah fuck, nevermind. Read further, apparently as of Arma 3 V1.39 serverCommand can be used on HC's and Dedicated
The campaign has a flashback ripple effect. It isn't documented on the latest release. Does anyone know how to use it?
https://youtu.be/oTFwIzCKfxM?t=4m44s When you hold spacebar on the sign it has shimmer/ripple effect.
@tulip cloud https://forums.bistudio.com/forums/topic/210401-memories-laws-of-war There are the scripts that do it.
The script functions are only available in the campaign. So you can't really call them from your code
The shimmer effect is just a particle effect. I posted the script for that here a couple days ago ( Last Friday at 3:23 PM CET - It's 7:53AM CET now)
Any one have a good link to a burning wreck script?
@still forum any idea how to get rid of these carrier parts in that array?
What array :U
posted it like 3 of my messages up
The duplicates on your screenshot?
yes.
Trial and error
well i tried everything i could come up with
remove one.. If it wasn't it remove another one and try again
oh no thats not the issue
i KNOW which ones but i can't get my script to delete them
isKindOf etc all fails
its like i dont have the proper classname
because they are all the same isKindOf
it works for like 8 of 12 parts
they're not?
the 2nd carrier i spawn isn't part of the array.
They should all inherit from the same class. As they are all basically the same just with different models
yeah i thought so, but only 8 share a common base class. 4 are oddballs
you can check typeOf and compare the classnames directly
i did that, too
no effect
{
diag_log format ["OBJECTS: %1", _x];
if (_x isKindOf "StaticShip") then {
_spawn_carrier = _x;
_deleted_array pushBack _x;
_objects_array deleteAt _forEachIndex;
}else{
if (
(_x isKindOf "Land_Carrier_01_hull_base_F") or
(_x isKindOf "Land_Carrier_01_island_02_F") or
(_x isKindOf "Land_Carrier_01_island_03_F") or
(_x isKindOf "Land_Carrier_01_hull_02_F") or
(_x isKindOf "Land_Carrier_01_hull_05_1_F") or
(_x isKindOf "Land_Carrier_01_hull_07_1_F")
)
then {
_deleted_array pushBack _x;
_objects_array deleteAt _forEachIndex;
};
};
the first condition works for like 8 parts, but thats about it.
Go to the leftover parts.
typeOf cursorTarget to get the classname. And then check config viewer
well since they're being spawned and in the spawn array i did typeOf to diag_log
8:04:24 "DELETED: 2f0b7871a0# 1779916: carrier_01_hull_04_2_f.p3d"
8:04:24 "DELETED: 2f0b782d20# 1779918: carrier_01_hull_05_2_f.p3d"
8:04:24 "DELETED: 2f0b7835b0# 1779920: carrier_01_hull_06_2_f.p3d"
8:04:24 "DELETED: 2f0b780ae0# 1779922: carrier_01_hull_07_2_f.p3d"
8:04:24 "DELETED: 2f0b781c00# 1779927: carrier_01_island_01_f.p3d"
8:04:24 "DELETED: 2f0b787a30# 1779924: carrier_01_hull_08_2_f.p3d"
8:04:24 "DELETED: 2f0b788b50# 1779926: carrier_01_hull_09_2_f.p3d"
8:04:24 "DELETED: 2f0b7781e0# 1779911: carrier_01_hull_01_f.p3d"
8:04:24 "DELETED: 2f0b7857f0# 1779914: carrier_01_hull_03_2_f.p3d"
8:04:24 "DELETED: 2f0b777950# 1779910: carrier_01_hull_base_f.p3d"
8:04:24 "DELETED: 2f0b778a70# 1779913: carrier_01_hull_03_1_f.p3d"
8:04:24 "DELETED: 2f0b780250# 1779915: carrier_01_hull_04_1_f.p3d"
8:04:24 "DELETED: 2f0b784f60# 1779919: carrier_01_hull_06_1_f.p3d"
8:04:24 "DELETED: 2f0b781370# 1779923: carrier_01_hull_08_1_f.p3d"
8:04:24 "DELETED: 2f0b7882c0# 1779925: carrier_01_hull_09_1_f.p3d"
8:04:24 "SPAWN: 2f0b7893e0# 1779928: carrier_01_island_02_f.p3d"
8:04:24 "typeOf _x: Land_Carrier_01_island_02_F"
8:04:24 "SPAWN: 2f0b7846d0# 1779929: carrier_01_island_03_f.p3d"
8:04:24 "typeOf _x: Land_Carrier_01_island_03_F"
8:04:24 "SPAWN: 2f0b77f9c0# 1779912: carrier_01_hull_02_f.p3d"
8:04:24 "typeOf _x: Land_Carrier_01_hull_02_F"
8:04:24 "SPAWN: 2f0b786080# 1779917: carrier_01_hull_05_1_f.p3d"
8:04:24 "typeOf _x: Land_Carrier_01_hull_05_1_F"
8:04:24 "SPAWN: 2f0b786910# 1779921: carrier_01_hull_07_1_f.p3d"
8:04:24 "typeOf _x: Land_Carrier_01_hull_07_1_F"
bottom ones not being deleted
also not with your second if statement?
then compare the classname. Instead of using isKindOf
Because it might not be kindOf itself
ooh.
also slightly annoyed that the carrier parts don't ALL share a common base class -.-
tried both of these
(typeOf _x isEqualTo "Land_Carrier_01_island_02_F")
(typeOf _x == "Land_Carrier_01_island_02_F")
no bueno.
the second one should work... according to your diag_log output from above
After removing them all. Print out _object_array again to see if they were really not removed
still there
I noticed that they all inherit from the "House" class
but if i delete all with isKindOf, the pattern stays the same
so i suspect a bug with these parts.
Soo.. The if statement doesn't detect that part. Although typeOf _x == "classname" does return true? wtf
?
(typeOf _x == "Land_Carrier_01_island_02_F") never returns true although the strings match?
can you get the object into cursorTarget and print typeOf in debug console
do a select in..... Wait...
Wow...
You go to element 0. no match
you go to element 1. Match! remove element one. Every other element jumps back one index so element 2 is now on 1
you go to element 2. No match... Ouh.. Wait.. We just skipped one element and didn't even check it.
So... Use the right tool for the job instead of a hackjob that doesn't work.
select was made for this
π
yes yes i'm stupid.
its not that i didn't look at select. I tried to use it and failed.
try again and succeed!
well thanks for the help i would have never found that one.
also this seems to work fine
private _spawn_carrier = _objects_array1 select {_x isKindOf "StaticShip"};
private _objects_array2 = _objects_array1 select {!(_x isKindOf "Land_Carrier_01_hull_base_F")};
but i have a headache so i'll stop for now.
π
Condition: vehicle player in thisList
Activation: player moveInGunner car1;
this one does work but only for players
i would like that AI would also be teleported as a gunner to car1
Silly question but is it possible to make a config file server side like you would define it in description.ext
i think you can't
however, you can execute a script which is located outside the mission folder
yeah just wanting something with the configFile >>
But was thinking if i can save space on mission file id rather have it server side
you can make a serverside only Mod.. Ofcause...
But you can't write into missionConfig with a Mod.
Also.. Isn't this #arma3_config ?
Where would you include the config and how would you include it
config is not that heavy, does it really worth separate config/script/mod ?
again... #arma3_config
Just make a config.cpp in a PBO. And Load that as Mod on the server.
@astral tendon just use trigger condition as "this" without "", and select activation Anybody or the side u want, and select type present, make sure its a repeatable trigger if you want to have it for multiple uses
but still, only the Player will be teleported inside on the gunner
i wanna the AI who set off the trigger to be in it
{
if (_x isKindOf "Man") exitWith {_x moveInGunner myCar};
}forEach thisList;
@astral tendon put this in activation field
found*
english machine broke
does anyone have a script that would diag_log every class name and display name for each loaded vehicle into the game?
"loaded into the game"?
You mean like present in the mission?
@simple solstice
{
diag_log configName _x;
diag_log getText (_x >> "displayName");
} forEach ("true" configClasses (configFile >> "CfgVehicles"));
???
I want to make a mission that has a bigger aspect on surival then the most others. This means that you start with nothing but can collect weapons. (Just like in the beginning of PUBG) But when you die everything is lost and thats a bit hard when you play hours on hours to achieve this. So I need a feature to save the players loadout. I already have figured out how to safe it but the question now is: Can you make something like a button with the mouse-wheel-menu to execute that code?
[player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory;
I made a onPlayerRespawn.sqf with this inside
[player, [missionNamespace, "inventory_var"]] call BIS_fnc_loadInventory;
In order to load the loadout when respawning
addAction
How exactly?
addAction. Check BI wiki
yeah thats the problem. Ok I will have a look
Ah _act = player addAction ["Exec the file", "somescript.sqf"]
I think that is what IΒ΄m looking for. But I have a last question: Will this execute the code locale? So just for the person who presses the button or for all players?
How do you want to build such a big mission/gamemode without a clue on how SQF works?
Yes this is local.. Please Check Wiki.
I have a very basic knowledge on sqf and me and my friend built already very big missions but the main problem is the bad performance from the engine than my sqf skill
engine performance is quite good. If you don't trash it with bad scripts.. Atleast that's my experience.
no the problem arent the scripts. If you have thousands of objects it will lagg. And I have a new PC with i7 and GTX 1070
simpleObjects. Caching. Stop having thousands of objects.
I think I have to write the code into the initServer.sqf ?
Yeah but huge missions are cooler
Or does init.sqf also work? IΒ΄m really sorry but IΒ΄m pretty new to sqf
@muted parcel before you ask a question, at least read the BIKI article about the command you're asking about. chances are the explaination in the BIKI will answer your question, if not you can still ask. Asking lots of trivial questions will tire people and then they won't feel inclined to answer you anymore.
just ... personal observations.
sure thing, but i consider help i receive here by asking questions as a limited ressource and i always feel like wasting time of highly competent people.
Ok I tried out init.sqf and initServer.sqf but both donΒ΄t work :/
It is very important where you test things.
If you use the editor in SP mode, the init.sqf and the initplayerlocal.sqf should be executed. if you run it in MP mode, the initServer.sqf should be executed, too. but your player will be LOCAL to the "server". you need to start a seperate dedicated server to simulate MP correctly.
I tested with scenario if the main script works. But when I host the server it doesnt work
Yeah the init.sqf worked in SP
onPlayerRespawn.sqf is an event script. Those event scripts are executed whenever the event happens.
you want to save gear when a player dies and then restore it on respawn?
Yeah I know but initServer.sqf doesnt work
then onPlayerRespawn.sqf should be the right place to RESTORE the gear - but you need to SAVE it before you can do that?
I just want to execute a script when the game starts.
show the code you put into the initServer.sqf
_act = player addAction ["Save Inventory", "saveLoadout.sqf"];
[player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory;`
okay so the server i think is a "player" itself that connects to .. itself. so i think you're attaching an addAction to the server.
This is the saveLoadout.sqf
you need to put that into the initplayerlocal.sqf
if you want it to be executed on each player
so in my initplayerlocal.sqf is the following line:
execVM "debug.sqf";
player addAction ["Teleport",
"[""teleport_id"", ""onMapSingleClick"", ""Ivan_fnc_teleport_player""] call BIS_fnc_addStackedEventHandler;openMap true",
nil,1.5,false,true,"DEBUG_SWITCH = true"];
and thats what my debug.sqf looks like
and it works just fine!
SP or MP mission?
MP
hm
I will test it again
wtf now I respawn at 00000
I put it into onPlayerRespawn.sqf and this works.
@little eagle yes, thankyou!
@muted parcel https://community.bistudio.com/wiki/getUnitLoadout
wouldn't that be better?
Why?
I mean with loadInventory and saveInventory I have everything I need
The problem now is that the script does not work by running it with init.sqf, initServer.sqf or initPlayerLocal.sqf
Wiht onPlayerRespawn.sqf it works but thats not a good solution
can you detect if an AI (civie) is in a panicked state or has spotted a hostile ?
no sorry, seperate question
you might check their combat mode, Katsu
{!isNull gunner _x} count [car1, car2, car3, car4,car5,car6] >= 4
i wanna this to work only with a especific group and count only the amout alive inside of the group
so, if a group have 4 units, 2 of they die this trigger must work for those 2 units left
And they all have to be gunners?
this trigger will ativate once there is 4 gunners inside in one of those 6 vehicles
in case 2 of the units that are supouse to in die i wan it to still trigger by the amout of units in alive on that group
@still forum as DEMANDED by you i utilized select.
http://i.imgur.com/EuKmJsr.jpg the result isn't perfect tho
all objects are placed correctly on the carrier i copy the data from, and i tread all objects in the same foreach loop. so i don't know why the position in Z is off for like half of them?
At that res it looks perfect
maybe they sit on "invisible" carrier parts like here: http://i.imgur.com/g3uwThP.jpg
its not only the res, steam compresses screenshots to death with jpg
Even so, looks like you shot that at 1280x720
its 1920x1080
despite armas ability to scale UI, 4k downsampling doesn't work properly.
Any reason why this wouldn't work as an if statement condition?
(typeof getConnectedUAV player == "C_IDAP_UAV_06_antimine_F")
No looks perfect. @Nutter#5134
Yippee
@waxen tide 4k almost looks akward without antialiasing
what. downsampling 4k -> 1080p is high quality antialiasing
You should be terribly ashamed of yourself.
Don't doubt it one bit, crying myself to sleep tonight.
according to the log my planes all share the same Z height. sigh
@waxen tide I used to get Z offset issues all the time until I realised I needed to use setPosASL to avoid any weird Z behaviour
if I used setPos it would ignore Z and try to figure out its own height - so I'd have NPCs on rooftops and stuff
could be something to look into?
oh yeah! lemme try
i don't setPos them at all, i just createVehicleLocal them and then attachTo
hmm, that's not something I've really used π¦
i can't spawn an aircraft carrier with 20 planes on it, glue it together with attachTo, and then have a loop move it 0.2m as fast as the loop will go for 6000 iterations, AND send this pile of a mess to every connected client.
so i'm doing all that rubbish locally.
:S
so what I'd do is...
_planePos = _accObj modelToWorldWorld [x, x, x];
_plane setPosASL _planePos;
where [x, x, x] is the position on the plane relative to its local centre
ahh wait, i forgot to add the vectordiff of the carrier.
so i set them to around 0,0
okay now the ones that were at proper height? they're still there and at proper height. but the "too high" ones are gone.
@ionic orchid i have no clue what your command seems to do?
which one?
the one in your second last message... modelToWorld ...
okay that's a way to turn an object space position into a world space position...
so like, if you know the top of a player's head is at [0, 0, 2] ...you can use that command on any player to find the top of the head in world coordinates
so if that player walks around, you can always track the top of their head just by doing
_headPos = player modelToWorld [0, 0, 2];
and the same goes for your air-craft carrier....if you know where you want the planes to rest, you can use that command to find exactly where they need to be in the world, no matter where you put the ACC
i see
i've used setPosASL now to nail them into place
thats what my logging throws out
half of the planes are visible, half isn't
i'll try modelToWorld
those negative Z values will place them under the sea
since the ASL is measured from sea level ( http://community.bistudio.com/wiki/Position )
@ionic orchid you is of genius! it wΓΆrks!
I don't see why my approach didn't work but whatever.
now i need to get the landing gear of the supersonic jets retracted and i can finally put this script to rest
How can I create an array with x number of empty elements. For example, if _number = 3 then I get ["","",""]
_my_empty_array = [];
_number = 3;
for "_i" from 1 to _number step 1 do
{
_my_empty_array pushBack "";
};
oh wait you wanted strings.
i'm sure dedmen will come up with something thats 10x faster and requires only 1 line of code.
private _array = [];
_array resize 3;
_array = _array apply {""};
0_0 genius
dark voodoo magic.
if (isnil _pylons) then {
_numHardpoints = count (configfile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons");
_pylons = [];
_pylons resize _numHardpoints;
_pylons = _pylons apply {""};
};
{
_vehicle setPylonLoadOut [_forEachIndex + 1, _x, true, -1]
} forEach _pylons;
Can now either clear or set a vehicles pylons w/ an array... If anyone was interested in my end goal
do we have a way to do something continue like in loops yet? π
Seems to work without quotes when I try...
No, marcel, only breakOut/To and exitWith.
bleh π¦
wasn't there some breakOut/To trick to break to the top of the current scope?
The syntax is:
isNil STRING
with the string being the variable name.
nvm breakOut "" apparently mimics exitWith
No.
is it possible to do a waitUntil along with onPlayerConnected to remoteExec a function to that client once he has picked a slot and spawned in?
Why though?
initPlayerLocal.sqf
or
initPlayerServer.sqf
is what you're trying to reinvent.
im trying to make a server addon pbo for a phone system im working on for my server, im just trying to hide as much as i can server side.
What does a phone have to do with onPlayerConnected?
Then make it a CfgFunctions function with postInit set to 1. The player will exist.
gotta set the players number to the player.
Don't have to set it onPlayerConnected
i have a query that runs on the server when the player connects to get the players number from the database.
Using CBA?
vanilla
CfgFunctions
postInit = 1
That should be enough for vanilla.
Yeah
"But 'muh Dark RP server"
ADT_OnPlayerConnected = compileFinal "
params [""_uid""];
waitForClient = _uid spawn {
_clientNotFound = true;
while {_clientNotFound} do {
{
if (getPlayerUID _x == _this) exitWith {
[_x]remoteExec [""ADT_Querynumberserver"",2];
_clientNotFound = false;
};
}forEach playableUnits;
};
};
";
``` would that work ? @little eagle im just trying to hide as much as i can
This is just an assignment. It does nothing.
But I can call this function with onPlayerConnected ?
It looks unnecessarily complicated.
probably, just at the moment all of the functions are server side, only 1 of the functions are being published to the client