#arma3_scripting
1 messages · Page 361 of 1
i shared them on the wiki but someone reverted it sorry
They're too dumb for irony.
🍿 I love #arma3_scripting
🆗
Nooo! We've been defeated by the anti-SQFGod.
last time i made a joke i got banned.
#rekt
@waxen tide Did it involve racially / sexually profiling scripting commands? Because if it did, then you did deserve it
no it didn't. i don't believe in such concepts.
🍿
currentWeaponMode is supposed to return a string. For nul objects it reports 0, a number.
currentWeaponMode is a female scripting command.
does that mean every second scripting command i use must be currentWeaponMode otherwise my code is sexist?
i can already see it ... equal opportunities scripts that don't discriminate commands for their gender or race
@little eagle What happends when it returns 1? currentMagazine ? 😉
setPosASL2 never works. It's a black scripting command.
setPosASL2 was an april fools joke
It never does, Midnight.
someone came across the page explaining the 9001 parallel existing coordinate systems in arma and found it funny to add another one
recently someone asked me "ehh arma scripting can't be that bad, now can it?" and i linked him that page and the discussion was over.
Ahhh mannn...
wow...
I liked the old one more.
lets change it.
Old one is better
🔨
At least remove the `"appears to be"
🖼
If something appears to be broken, then it probably is.
i actually remember trying to use setPosASL2 and despite always considering me making a mistake i immediately suspected its broken.
i dont remember that warning being there
setPosWorld is the working version of it.
Description.ext, Functions, is it possible to have subfolders? If I remember right, when I tried it errored out unable to find the functions. Figured somebody here probably knows.
I have categories, I'm looking for subcategories.
You can only have categories, but you can have two of them that do stuff in different sub folders of a common folder.
Does anyone know why it won't work?
[rpHmmwv] call ace_medical_fnc_isMedicalVehicle;
If I'm understanding you right, I would have my main categories in the base folder, then another description.ext in a sub folder? Or am I misinterpreting?
No, you can only have one description.ext.
And you can only have categories in the config.
Got it, you just mean making more categories. Which I already did. Thank you though.
But the folders you can change to whatever you want.
Yeah I figured that much out, I've got things divided but I wanted to subdivide them if possible. It seems the only way to do that would be to specify the function file exactly.
And that's not worth the hassle.
Anyone using ACE3 that knows why this command won't work?
[rpHmmwv] call ace_medical_fnc_isMedicalVehicle;
thats perfect syntax, so the error is somewhere else
rpHmmwv is not nil / objNull?
the line is actually executing?
ace3 is loaded?
What even is the error?
did you put it in a watch field in the debug console while previewing the mission?
What do you think it's supposed to do?
Make a vehicle a medical vehicle
No.
does remoteexec behave as expected in eden MP mode?
You might be a pioneer on that subject.
looks at commy2 over his glasses
but thats something EVERYONE must be doing all the time?
i would test it on my dedicated server but my last attempt to get a script to fetch workshop mods properly left me scared with PTSD so i'm in somewhat of a recovery period.
Try it locally hosted first. You don't need a server for that.
I dont think remoteexec will behave unexpectedly in eden
Doubt it.
I never even used 3den MP. You can have multiple machines edit the same mission?
well first you can't expect arma servers on windows & linux to behave the same. so i would have to set up a VM with linux first. have you ever tried to set up VM network with windows host?
asdfghj, you can open multiple instances of the game and just alt tab between them.
Anyone aware of UI types that do handle onMouseEnter but you can't just click them (Which pulls it on top of other controls and seeing arma doesnt have decent z-order shit gets fucked up)?
using ctrlEnable false will also disable onMouseEnter
my remote execution isn't being executed. no error output. i run the following code in a script which was started by initserver:
_zone remoteExec ["deploy\carrier_cutscene.sqf",-2,true];
if i interpreted it right, remoteexec from the server -> client doesn't require whitelisting?
Does it work with filepaths? I don't think so.
oh.
[_zone, "deploy\carrier_cutscene.sqf"] remoteExec ["execVM",-2,true];
😳 thanks commy
wait, whats that magic.
is that the syntax from the last params example: https://community.bistudio.com/wiki/remoteExec
// <params1> someScriptCommand <params2>;
[<params1>, <params2>] remoteExec ["someScriptCommand", targets, JIP];
?
that strikes me as unintiuitive
How else would you've done it?
It's a bit clunky for unary commands with an array on the right side, but otherwise...
titleText ["Test Message", "PLAIN", 1];
[["Test Message", "PLAIN", 1]] remoteExec ["titleText"];
[[ ]]
yeah that dawned on me, i guess 2 params is all you need and then it starts making sense
Yeah. Commands can only have up to two arguments. One on the left and one on the right.
but the wiki says
params: Anything
and then i read param1
param2
and i think what if i add a param3 ?
confusion.
I wish it would be more consistent and just call the arguments the same everywhere.
Better avoid param, because it could be confused with param(s).
args
arg1 arg2
eezzzz just write a replace script and throw it at the wiki.
*revert*
so anything else i'm missing out on with remoteexec?
(first line in the script is a systemchat so i'm kinda thinking the script isn't executed at all)
Tried with systemChat ?
[_zone, "remoteExec test"] remoteExec ["systemchat",-2,true];
[_zone, "remoteExec test"] remoteExec ["systemchat",0,true];
nope.
well now that worked
Therefore, remoteExec works fine.
0 Yes. -2 on all clients except the server
it only send one chat message.
@little eagle Is this correct?
remoteExec ["command"]; // no parameter command
[] remoteExec ["command"]; // no parameter command
rightParameter remoteExec ["command"]; // unary command
[leftParameter, rightParameter] remoteExec ["command"]; // binary command```
I've never used remoteExec yet to remotely execute commands directly
Right
also
[rightParameter] remoteExec ["command"]; // unary command with array parameter
Okay I didn't specify that because going from the logic "binary" I assumed an array on one side of the command is treated as one parameter
It is, but it needs this special syntax.
@robust hollow @GeekGuy884#0311 @tough abyss sorry I didn't respond last night I fell asleep lol. Anyway the object it self is created by the server via init.sqf after the clients stop executing (using if (!isServer) exitWith {}; to stop them). The solution @robust hollow provided works with the action being added but the amount doesn't work with the way I have it set up. That is because of me experimenting with other potential solutions earlier, so that is fixed just fine, and I just tested it and everything appears to work as expected. Anyway, thanks for all your patience and help. Locality truly is a bitch
So [[1,2,3,4,5], [1,3]] remoteExec ["select"]; would theoretically return [2,3,4]
binary select with one array on each side
[1,2,3,4] remoteExec ["count"]; // == 4
myArray = [];
[myArray, 1] remoteExec ["pushBack"];
doesnt remoteexec return a jip code if anything?
Was just an example, I know it doesn't return anything that is connected to the actual operation thats being done
Hm well I think it's just my opinion then, would have found the bottom two examples more logical
"hello" remoteExec ["hint"]; // unary
[array, 5] remoteExec ["pushBack"]; // binary
["hello"] remoteExec ["hint"]; // unary
[array, 5] remoteExec ["pushBack"]; // binary
Or am I missing something here?
Oh well yeah overloads would be an issue
@tame portal remoteExec probably doesn't support pushBack and select, because those don't make sense when used with it.
Was just examples because I couldnt come up with other example parameters
Those commands have no effects.
Yes, pushBack is a binary command.
I think good examples are
systemChat (unary)
globalChat (binary)
Can't think of a nullary command : (
Why does this work? oO
["test2"] remoteExec ["hint", clientOwner]
I thought this is the syntax for it ```sqf
"test1" remoteExec ["hint", clientOwner]
One arg in the array. It just assumes it's a unary command, which is right.
I guess this is because of the same reason ["hello"] call function and "hello" call function are equal
Yeah. Under the condition that the function uses a version of param(s).
Afaik _this in the function will always be ["hello"] doesn't it?
With the function version of remoteExec, _this is whatever was on the left side of remoteExec.
I was referring to the simple call
Ah okay... So params is actually being smart when being used ^^
Can you come up with a unary command that takes a parameter real quick? 😛
Oh
titleText
Right
It kind of upsets me that ["text"] and "text" both work fine for remoteExec >_>
I think that works better for someone wanting to use remoteExec because when you see ["test"] and you kind of assume that [player, "test"] is how the usage of a binary command looks like then
Charts for slow thinkers?^^
*Charts for visual learners.
from "hint" to [player, "test"] it just feels like a crack in style for me
I'm part of the visual learner and you can use the term visual retard
😂
while [oneparameter] to [oneparameter, twoparameters] looks more logical to me
From now on I shall only speak in charts I guess
So many times I've had to draw shit out for myself to understand math or positions / vector
If it helps, why not?
Yeah, I can't understand without it. I'm like a caveman writing on a wall to understand the world
😂
Here is my next chart masterpiece
I'd like you to know that I despise you all (from now on) 😄
Paint or snipping OPTiX?
I don't get it.
hahaha
Noone insults my highly accurate and well fleshed out charts
Must be a physical/audio learner then commy
No one*
@subtle ore Paint, I am no amateur
Just steal Photoshop like everyone else.
I get it
@tame portal i see you are among the elite 🆒
But that's a glass and not a cup.
@little eagle Corrects me when I say noone instead of no one, then tells me to download Photoshop for free
cough
Commy, you belong in there either way
Took you long enough OPTiX
I think he belongs in the chalace of semantics
If you google trashbin, it's one of the first results to come up
Hey kids, want some free cc keys?
Not that I would know, but
Okay nevermind, google Mülleimer, then you'll find it 😄
there are certain methods out there of disabling trial limitations for all Adobe softwares
Is there an easy way to work on a PBO that contains scripts without closing the game, changing the script, relaunching, etc etc?
that's what I have heard, anyway
I can't believe they didn't make a :trashbin: emoji.
@tough abyss if it's config chnages use - https://community.bistudio.com/wiki/Arma_3_Diagnostics_Exe
With diag_mergeConfigFile
👁👃👁
👄
😂 wtf is that
no
🥃
jesus christ when you fixed the mouth it looked like it started smiling at me
So if I load the pbo using the diag executable, I can take the un-pbo'd version and merge it in every time I make a change using diag_mergeConfigFile ["PathToConfigOnDrive"]?
😂
Yea but it doesn't do deleting config values only changing and updating.
What about scripts inside the pbo?
This way
Should I just get them working as mission scripts and then repack them alter?
later?
farting cow
@tame portal 😂 Ow, my sides. They hurt
@little eagle I am a creative member of this society, stop the harassment please
You guys going to take it to HR?
poor @tough abyss trying to be relevant to the channel
that just broke a important trigger
The farting cow is probably more important 😃
@tough abyss no I'd just call those from outside the addon whilst testing ie mission? Or maybe use filpatching not 100% sure.
@astral tendon that would be an image that I can't see
Sweet. I'll check it out. I hate sqf :/
Can't load it either.
make sure it is public
It is public
imgur is being a bitch
I can see it
We all love SQF here.
link directly to the .png or whatever it is
I thought you posted a cat initially 🤔
I just come from python, so when I see class inside of class inside of class with if if if if if, I feel dirty 😦
So I got a permanent link for my masterpiece, someone please pin it
https://lloyd.cat/commysworld/1.png
I had this bug too three days ago. For some reason you can't select all the things in the edit trigger ui.
@tame portal bookmrk'd
👍
Also, is it like, taboo to ask questions in here about extending a script in someone else's mod?
You and your priviliges.
@tough abyss You mean patching a mod essentially? Yeah
I hate you.
how do i fix that?
@subtle ore - Yeah there's a mod that I would like to adjust the functionality of. But it doesn't have any docs or params. So my goal was to make my own mod or scripts that alters its functionality.
is there a way to know if other triggers got effected?
To be clear, I don't mean models, textures, sounds... I mean mechanics. Essentially just keeping the player from dying.
Make a mod that inherits the values of the other mod
That's my goal
Keeping the player from dying could be done in script
Hah
Problem is, they control the unconscious state with the HandleDamage EH. So I would have to remove theirs to use mine.
No, why?
I read in the BI docs that if there are two HandleDamage EH that alter the players damage, only the last one gets used.
Yes. Make yours the last one.
Essentially, here is what I'm trying to do. Veteran mod has a whole medical system that controls damage. I want to implement a "prevent instant death". But even when I attach a handledamage EH directly to the player, their mod seems to set the value.
It seems like if I do get my EH to work, their entire system for handling that goes unused.
I'm just trying to keep the players total damage below 1.
That's a problem then.
Exactly
But there is no easy fix.
So I have two options that I know of right now. Don't do any of this and just come up with a different respawn mechanic for my group. Or modify the script in their PBO. Which seemed like I good idea, until I remembered this was arma. Not my day job 😃
Everything we use is open source. And the arma mod community seems kinda indifferent. I guess I can look at the license of that mod.
Which is something I should have done before I opened my fat mouth. But I'm kinda spitballing here 😃
They don't specify a license. So does that mean it automatically inherits a default license from BI or something?
player addEventHandler ["HandleDamage", {
params ["", "", "_damage"];
if (_damage >= 0.9) then {false};
}];
tried this?
is it possible to get a dead unit's side using typeOf?
I've tried similar stuff. I don't think my syntax was wrong. I just think that specific mod is taking priority over mine.
@little eagle Will that work from the init box of a unit or do I need to fire it from a script?
You have to ensure that your is added later than theirs.
Also, idk if false or true work in handleDamage. Might also try:
player addEventHandler ["HandleDamage", {
params ["", "", "_damage"];
if (_damage >= 0.9) then {0.89};
}];
damn #logic
init box might run before their script.
@runic surge what do you mean? Why not just get the side before death?
k
Better try with 0.89. Can't remember if 0.9 head kills you or not
It is an event handler for a local unit so those values don't pass properly to everyone
= .9
Crap. I would need another player to shoot me I think. Can I change player to all units instead of ai?
Step on your nade.
Smart man
I have a fnc at hand to nuke me from orbit to test that kind of stuff
I miss the scud launcher : (
Lol, yeah.
One of my favourite units in CCG.
Instantly killed :/
Is there any way to get a unit's side after death?
"Shall I push the button?"
getText maybe
I am assuming veteran runs their medical system in a loop. That's the only way I can think of that won't let me override from the debug console
Or maybe their script just kills you with setDamage or something like that.
Oh yeah, it actually does. I see it in there all over the place. _unit setDammage 1; With two m's 😃
Yeah, setDamage 1 == dead. No matter if you allowDamage false or have a million other handleDamage events.
x_x
So that means I would have to modify their script. Which is a no no I guess?
I still can't find a license for it.
Do they store the eventhandler id? You could just removeEventHandler it and replace it with a copy paste that is adjusted for your purposes.
I'll check
Otherwise you could guess the id. It's probably 1 or 2. 0 is for BI damage feedback pp effects and piss filters.
Shoud be the same every time...
Again though, if I remove theirs, then I imagine I lose their entire system. So I'd have to re-implement it in mine.
Cool. Well I guess I'll get to work. Thanks for your help man. Their script is huge so I'll have to figure it all out.
First step is to copy paste it all and get the stuff around it to work.
Yep. I was hoping for a quick spot to plop in if (_damage >= 0.9) then {0.89};
They've got like 8 sqf files that handle everything
The 0.89 would be the damage return btw
Yep. Seems like .89 is just under the threshold to keep people from dying.
Well technically 0.99999 is too.
I'm still not clear on the total damage vs part damage thing
Like a part can be 1. But you can still be alive because your total damage is .6 or whatever?
So each part has a threshold for death?
Left leg?
And somehow contribute to the total damage? Or is the total damage just the sum of all the parts damage?
No, HitHead, HitBody and structural damage (total) have.
Like if one leg is .5 and the other is .5, I'm dead because the total is 1
No.
🤔
Limbs can be 1 and you don't die.
In fact, they are either 0 or 1 most of the time anyway.
Very low armor.
So in the hit part index, -1 is total, 0 is face_hub, 1, is neck
Is there a list anywhere for that?
total is not the sum. It's the received limb damage times a passThrough multiplyer.
Because I see they have a lot of if statements `if (_index in [0,1,2])
Don't try to make sense of it. It's a horrible system.
I'm just going to do a find replace of these scripts. Everywhere where it says setDammage 1 I'm going to make it setDammage .88. But then I still would have to make the vitals not an insta-kill
Jeeze. Might be easier just to have people respawn back at base and have a delay before they can get back in the fight. All I'm trying to do is implement a perma-death system. Where if you die, you are done for the night. But to make that kinda fair, I want to give them a chance to get revived.
As unrealistic as that sounds.
They use decimal dots in English and programming.
29.50
Because anglos are weird.
scripting is weird
Are multi / signle line comments included in the character / element cap of arrays?
like, if I have
myArray = [
/* Lots of commented stuff
blah blah blah
*/
actualArrayStuff, moree stuff, stuff
];
will the comments count towards the cap?
Just wondering whether omiting comments in arrays is a good practice. Might have to make a really big array for something...
_source = "#particlesource" createVehicleLocal getPos (_this select 0);
_source setParticleParams
/*Sprite*/ [["\ca\characters2\OTHER\FLY.p3d",1,0,1,0],"",// File,Ntieth,Index,Count,Loop(Bool)
/*Type*/ "spaceObject",
/*TimmerPer*/ 1,
/*Lifetime*/ 4,
/*Position*/ [0,0,0],
/*MoveVelocity*/ [0,0,0.5],
/*Simulation*/ 1,1.30,1,0,//rotationVel,weight,volume,rubbing
/*Scale*/ [0.03,0.03,0.03,0],
/*Color*/ [[1,1,1,1],[1,1,1,1]],
....
So, X & Y equal your position on the map, correct? What does getPos return as, in the terms of an array?
x, y and z?
Z is your ASL though.
No.
AGL?
No.
??
lol
AGLS
.... 😐
It's different from AGL
That's the z value used in the editor, right?
setPos uses AGL
getPos reports AGLS
This is why
player setPos getPos player
Moves you on the ground when standing on a roof or in a watch tower.
So if I was to, have sqf player getPos; select 2; // this would be Z?
What z do you want?
coords not height. However. I do want to then create an object with a height.
Let me rephrase.
Where should z be 0?
The terrain?
Sea level?
Waves?
The roof below you?
Sea level
ASL != age sex location??
Thanks @simple solstice
So, I want to have a script that finds the Pos of the player. then uses that information to make another Pos based from the player, but with a minor difference of a few 100m's. At that Pos, there will be a helicopter spawned (with an attached (sling loaded) box, which (for now) has the asrenal on the scroll option. Which then a waypoint is made (assigned) from the helicopter, to the players location. The object would be unloaded from the helicopter and then a new waypoint created for a "dismissed" point then the deleteVehicle command being called.
_unit getPos [100, random 360] vectorAdd [0,0,200]
Something like this?
uhm
No.
Also, _unit is that player avatar
before it
It would already know
no
Idk if it right
I know that
You need createVehicle to create a vehicle. https://community.bistudio.com/wiki/createVehicle
Yeah. So with this: sqf _unit getPos [100, random 360] vectorAdd [0,0,200]
That's a position to spawn the helicopter.
//in one line?
_heli = "B_Heli_Transport_03_F" createVehicle position player [getPos [100, random 360] vectorAdd [0,0,200]];```
```sqf
code
```
I knew. Just had a space after sqf
Jeep is no classname in A3.
It's an example.
Also, position is wrong here. You already have getPos.
I know a classname
And you'd need parenthesis. And this binary syntax of create vehicle ignores the z / height, so the heli would just sit there on the ground.
Parenthesis are the round brackets.
And position is still wrong.
^^
You're just guessing.
0_0
player getPos; // How do I turn this into a variable?
_heli = "B_Heli_Transport_F" createVehicle position playerPos1;
So like
_thing = "classname" createVehicle _unit getPos [100, random 360] vectorAdd [0,0,200];
?
Why is _ x and _unit different?
private _positionATL = player getPos [100, random 360] vectorAdd [0,0,200];
private _heli = createVehicle ["B_Heli_Transport_03_F", _positionATL, [], 0, "FLY"];
private _playerPos1 = player getPos [100, random 360] vectorAdd [0,0,200];
private _heli = createVehicle ["B_Heli_Transport_03_F", _playerPos1 , [], 0, "FLY"];```
Oh wait no
Silly me
I like the ATL for non-ASL coordinates, but personal preference.
Oh yeah... I guess the special param is needed to have it flying isn't it.
Or spawned falling :/
Something like that
That's why you need the unary version of createVehicle and not the binary one.
private _playerPos1 = player getPos [100, random 360] vectorAdd [0,0,200];
private _heli = createVehicle ["B_Heli_Transport_03_F", _playerPos1 , [], 0, "FLY"];```
Random radius around that position.
Array of markers where the vehicle should spawn in or something. I never used it.
Not everything has to make sense or be useful.
Oh okay. Thanks guys.
private _playerPos1 = player getPos [100, random 360] vectorAdd [0,0,200];
private _heli = createVehicle ["B_Heli_Transport_03_F", _playerPos1 , ["Miller"], 0, "FLY"];```
Just don't^^
"player pos" is a bit misleading, isn't it? it's a position a hundred meters away from the player and 200 meters above the ground.
private _playerPos1 = player getPos [100, random 360] vectorAdd [0,0,200];
private _millerPos1 = createMarker ["Miller", position _playerPos1];
private _heli = createVehicle ["B_Heli_Transport_03_F", _millerPos1 , [], 0, "FLY"];```
createMarker reports the marker and not the position.
So this will error.
expected ARRAY encountered STRING or something like that.
Unrelated,
Is there a reference list somewhere of all pylon weapon classnames? Wiki maybe?
I don't feel like picking through the entirety of cfgMagazines...
pylon?
Aren't they all tagged with "pylon"?
Never heard of it? What gun/weapon?
Some are tagged w/ PylonRack_x but others arent
Probably, but I was looking for an easy list of actual pylon compatible weapons 😛
I guess I could do this getCompatiblePylonMagazines ""
and copy the returning array down
Oooo pretty
'isText (_x >> "pylonWeapon")' configClasses (configfile >> "CfgMagazines") apply {configName _x}
Huh?
Isn't this what you talked about?
Just parsing...
so
_list = 'isText (_x >> "pylonWeapon")' configClasses (configfile >> "CfgMagazines") apply {configName _x};
copyToClipboard _list;
?
Yes.
Error Generic error in expression D:
Same error for
_list = "B_Plane_Fighter_01_F" getCompatiblePylonMagazines 0;
copyToClipboard _list;
Ahh, all good
Im over complicating things now xD
Remaking BIS_fnc_guiMessage to match the tablet xD
is there a way to get the absolute path of the script you are in ?
not bad, but it's relative to arma :/
what do u mean?
to mod hierarchy
i still dont understand 😕
"x\surface_painter\addons\sp_mode_surface_painter\events\fn_surfacePainter_init.sqf"
i try to programmatically find out where my mod is located
D:\zgmrvn\Arma\mods\built\@surface_painter\addons
something like that
i see.
split the string at \addons\
use https://community.bistudio.com/wiki/PreProcessor_Commands#FILE then use SplitString on the return of that.
he wants a full filepath from the drive to the script, not the one that starts at the arma directory?
right, full path
hmm
i guess you would need to do that within the dll
Or define the path from hdd to arma in a config. then use File.
I don't think there's a way to find system filepaths within arma scripting... All the file paths are relative to mission / mod / A3 root directory
while {true} do {
testguy2 domove (getPos testguy);
sleep 5;
};
what is the generic error?
is the script scheduled?
Sleep in unscheduled
how i do it?
spawn instead of calling the script that loop is in
_null = [] spawn {
while {true} do {
testguy2 domove (getPos testguy);
sleep 5;
};
};
this one works
i use it to place objects relative to another. it takes into direction too so its better than getpos obj vectoradd [0,5,0] in that regard.
let's say your object is in [1000, 1000, 0] and facing north
_object modelToWorld [-100, 0, 0]; // [900, 1000, 0]
getpos obj vectoradd [0,5,0] // 5 meters north of obj
obj modeltoworld [0,5,0] // 5 meters infront of obj```
👍
so modelToWorld displaces the positions of the object with respect to the objects position in worldSpace??
no, it just returns the relative position without moving object
refferences or defines position relative to center of an object
_attachVehTo setPosATL (_spawnPosition modelToWorld [0,0,200]);
yes
when I createUnit on the server passing a group owned by a client, does the client becomes the unit owner?
yes
thanks Jigsor
Arma 3 doesn't like non explicit commands when it comes to spawning parachute objects
"B_Parachute_02_F" createVehicle pos;
doesn't play nice with parachutes
"Cannot create non-ai vehicle"
test_fnc = {
params ["_paraType","_vehType","_spawnPos","_zHeight","_attachVehTo"];
private _paraObj = createVehicle [_paraType ,[(_spawnPos select 0),(_spawnPos select 1),((_spawnPos select 2) + _zHeight)],[],0,"CAN_COLLIDE"];
_vehToAttach = createVehicle [_vehType,[0,0,0],[],0,"CAN_COLLIDE"];
_vehToAttach attachTo [_paraObj,[0,0,0.01]];
_attachAtPos = getPosATL _vehToAttach;
_paraObj spawn {
waitUntil {
diag_log _this;
diag_log (getposATL(_this) select 2);
(getposATL(_this) select 2) < 3;
detach _this;
};
};
};
["B_Parachute_02_F","C_Offroad_02_unarmed_F",getPosATL(player),200,cursorTarget] call test_fnc;
Any reason why the waitUntil isn't working?
It also ends up going into the ground geometry
This makes no sense.
@cloud thunder
Vehicles glitching into the ground?
After they reach the ground?
On Tanoa
Thats some serious screwer BIS
(_this select 1) setPos [position (_this select 0) select 0, position (_this select 0) select 1, 0]
From your own code.
Obviously shit was glitching into the ground for them too
ur detaching the parachute inside the waituntil?
Now my code is doing some weird stuff
Like making vehicles fly within the waituntil
Not even sure why.
test_fnc = {
params ["_paraType","_vehType","_spawnPos","_zHeight","_attachVehTo"];
private _paraObj = createVehicle [_paraType ,[(_spawnPos select 0),(_spawnPos select 1),_zHeight],[],0,"FLY"];
_vehToAttach = createVehicle [_vehType,[0,0,0],[],0,"NONE"];
_vehToAttach attachTo [_paraObj,[0,0,0.01]];
_attachAtPos = getPosATL _vehToAttach;
[_paraObj,_vehToAttach] spawn {
waitUntil {
((getposATL(_this select 0) select 2) < 3 || isNull (_this select 0));
detach (_this select 0);
(_this select 1) setPos [(getPos(_this select 1) select 0),(getPos(_this select 1) select 1),0];
};
};
};
["B_Parachute_02_F","C_Offroad_02_unarmed_F",getPosATL(player),200,cursorTarget] call test_fnc;
The vehicle is shuddering rapidly.
waitUntil {
((getposATL(_this select 0) select 2) < 3 || isNull (_this select 0));
};
detach (_this select 0);
(_this select 1) setPos [(getPos(_this select 1) select 0),(getPos(_this select 1) select 1),0];
waituntil the condition is true then proceed
waituntil runs on almost each frame (or something like that)
oh...
it must return true or it wont exit
Right it's inside the waitUntil
it should be outside it.
facepalm
Nope still glitching into the ground...
Literally falls through the map
@robust hollow
setposatl instead?
Nope
Stiil glitches into the map
test_fnc = {
params ["_paraType","_vehType","_spawnPos","_zHeight","_attachVehTo"];
private _paraObj = createVehicle [_paraType ,[(_spawnPos select 0),(_spawnPos select 1),_zHeight],[],0,"FLY"];
_vehToAttach = createVehicle [_vehType,[0,0,0],[],0,"NONE"];
_vehToAttach attachTo [_paraObj,[0,0,0.01]];
_attachAtPos = getPosATL _vehToAttach;
[_paraObj,_vehToAttach] spawn {
waitUntil {
((getposATL(_this select 1) select 2) < 3 || isNull (_this select 0))
};
detach (_this select 0);
(_this select 1) setPosATL [(getPos(_this select 1) select 0),(getPos(_this select 1) select 1),0];
};
};
["B_Parachute_02_F","C_Offroad_02_unarmed_F",getPosATL(player),200,cursorTarget] call test_fnc;
Look wrong?
God damn headache...
and the car is attached to the chute
so detach the car?
yea tried it, works fine
the chute isnt attached to anything
the car is
Hrm... So I'm using (bigArray select _forEachIndex) select 0; to get an element from a rather large array... It seems to work when there are no comments within the array, but as soon as I add either a single-line or multi-line comment to the array I start getting missing ; errors...
were is the keyboard configuration in Eden?
Top menu > Settings > Controls... > Editor Camera
I think those are the only editor controls that can be changed...
Hey I want to get into voice acting my scenarios but I don't know how to do that So how do I make it on the bottom right-hand corner the hq talking to you?
Like "HQ to Paladin We need you on point A through Z now"
in the chat?
Yes
depends what channel u want it in. look at sideChat command (i think its called) and it should link the other chats versions of it.
I wanted to be like when you activate a trigger it tells the player what to do next type of a thing
yea, this should do that
Okay I'll look into it
if not ill have a look when im back home.
Why does the GUI editor break text size
How Does time triggers work again, like what if your first objective is Defend a base for 5 minutes How would that work?
I've been getting this bug every now and then, where vehicles get bugged and once a player gets in, no other players can
I believe this might have to do with the command to add editable objects to a zeus
can anybody confirm that, or has anybody experienced a similar behavior?
try blocking tab with keydown evh?
display displayaddeventhandler [“keydown”,{(_this select 1) == tabKey}];
or isthat not what umean
Yes you need to return true with the eventhandler keydown, so this will override the key
Why do I get Error: Member already defined for my dialog on a line that is just };
just the end bracket of something
it means that you have too many (or too few I guess) braces in the config
but I don't
the number of { should match the number of }
well show us the config then ^^
what's the span stuff at the top?
ah weird
it's probably the colorBackground in BTH_RTS_Group_Options_Formation_Dialog
don't think they can be strings
yes they can be
alright 😃
copied right from the default
I can't spot anything else
what line does it say the error is on?
could u screenshot it plz, it fine for me but i cant check with the inherited classes
yeah one sec
it works now so I guess not
I didn't change anything
I am very much confused
It loads into the GUI editor just fine as well
I must have done something without fully reloading the description.ext
That is the only thing I can think of
cant say im a fan of the gui editor.
It is unusable on it's own
also it fucks up random bits of code for seemingly no reason whatsoever
Hello, just a quick question guys
if i do :
_potatoes = player;
if (isNull _potatoes) then { hint "this is null";};
i dont know what the isNull function is testing, the variable _potatoes or the "player" ?
The value of the variable
🌮
B-both?!
do you guys know a good scricpt to loap a music and can be stoped? the one i have here does not work that well...
you sure this is a #arma3_scripting question and not #arma3_scenario related?
Well yeah I'm pretty sure, I mean it sounds like they would be scripting to it
Is there a way to disable "fire action" on fireplace object? But I want to add custom action to it with addAction command.
Yes. #arma3_config can probably do it.. With a Mod.
hmm, so no way without mod, like with some script commands. I wonder what removeAllActions will do.
https://community.bistudio.com/wiki/removeAllActions
Removes all unit's user added actions.
Fire action is not a user added action
Where can I find the dialog options for the hint box (NOT: hint / hintc)
Where you press H to bring it up or down.
This is a small thing, but does anyone think BIS would add in a ++ operator in sqf to increment a variable?
Also =+ and --
if only
#arma4goals
By the looks of it, ArmA 3 has a long future ahead
i'm kidding 😛
In all their dev diaries they have said ArmA 3 will stay for many years to come
I would indeed like it too
And I don't think we will see ArmA 4 in the coming 5 years
Afterall, they need a new idea for A4 and what would that be ya know?
A3's last major update will be Tanks though, so post Q2 2018 I don't expect all that much except bugfixes
But yeah, i do hope stuff like ++, --, =+ etc are supported day one in Enfusion
Yeah, I guess after Q2 2018 A3 will slowly start dying
@rotund cypress That's not as easy as you think it might be
dunno how easy it is with RV4/SQF though
_v1 = 1.0;
_v2 = _v1;
_v1++;
That would also increment _v2 sadly
which you probably don't want
-- the same.. += should be doable.. I guess
@rotund cypress Not sure what dev blog you were reading. They are pulling devs off arma so they can work on dayz engine.
I wouldn't start asking for sqf commands we don't really need
https://dev.arma3.com/post/sitrep-00202
"This is simply because, even though we still support Arma 3 with a dedicated team of developers, we also need to steer some of our efforts into the direction of developing key new technologies, such as the Enfusion engine."
Not really news though
What's the in-engine screenshot command
screenshot @peak plover
I haven't seen a community like this big for DayZ, so I am not sure why they're prioritizing DayZ over ArmA 3
They are not
they're not, they're working on the DayZ engine
i.e. Enfusion
Which will probably end up powering the next Arma game
because RV4 and SQF is really old and creaky
It is, and yes enfusion and this new language will be nice for ArmA
But I don't see this happening in the next 5 years
More like, DayZ will stay shit for another 4 years
ArmA 3 will keep all its bugs, cause all developers are working on Enfusion
/ DayZ
And it will just be a blatant mess
Well, not really - DayZ devs will keep doing whatever they've been doing
Some A3 devs will continue to support A3 until the end of 2018 at the very least
While the other folks continue to work on Enfusion/Next Arma Game
But enfusion is intended for DayZ at first
Not necessarily
It's basically UE4/CryEngine equivalent for BIS
Just like Argo was made on RV4 while A3 continued doing its stuff
And things that benefitted both were cross ported between both games
should be the same with DayZ and Next Arma Game
I mean BIS probably know how to manage multiple projects at the same time 😛
[
_myLaptop,
"Hack Laptop",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"_this distance _target < 3",
"_caller distance _target < 3",
{},
{},
{_this call MY_fnc_hackingCompleted},
{},
[],
12,
0,
true,
false
] remoteExec ["BIS_fnc_holdActionAdd",-2,_myLaptop];
How can I retrieve the Action ID from this, so I can BIS_fnc_holdActionRemove?
On all clients
from this? you can't.
So I would have to write a function
doesn't hackingCompleted func also get the actionID in a variable?
Code executed on completion; arguments [target, caller, ID, arguments]
So i guess the third one is the action ID?
Well, true @inner swallow but I still think it's gonna hurt the ArmA community a lot
Then again, I am very butthurt cause ArmA is dying, since my love for the game is undescribable
The problem is this is going to be used for a revive scripts.
script.
So I need to delete the action, when player respawns
I could use a condition to it so it only shows up when a player is dead I guess
i changed the idea on the music loop, how about a looping trigger that i can also stop with another?
you guys know any good setup?
if (lifeState player == ("DEAD","DEAD-RESPAWN","INCAPACITATED")) then {
player addaction ["Collect Gear", "fn_take_gear.sqf"];
};
would this be valid or do i have to go about the lifestats diffenterly ?
music = true;
nul = [] execVM "music.sqf";
this setup works and me music loop
but when i use music = false
it does not stop the music immediately
it waits until the music finish
reason for that is because i have a long music
any ideas how i make it stop immediately?
i think you'll have to playMusic "" to get it to stop
nice!, i did not know that you could let that empty
You should probably visit the wiki more often then... https://community.bistudio.com/wiki/playMusic
To stop the music execute playMusic ""
funny that also does not broke the music that plays in the same trigger
So erm
I had something commented
And it ran???
Was this a cosmic ray hitting my computer or is there a chance the comment escaped?
cosmic ray
my_music_handle = [] spawn
{
while {true} do
{
playMusic "loop_22";
sleep 77
}
};
this music is not looping
it have 1:27 length
so i put sleep 77
but over 30 it does not loop
Guys, do you know if it's possible to make an picture ctrl start shaking?
I guess I can create a somwhat good thing by changing the positioning and shadow myself, but that seems like a bad way
Hi guys, how do i reset the set target of a camera when i use camSetTarget ?
@onyx geode you cannot.
You have to set a new target or go back to old one
Create the camera again or store the last one in a variable and use that
@rotund cypress you could use ctrlSetAngle to make a picCtrl shake. I created a shake fnc for this dialog. https://plays.tv/video/592db0736a28527bb4/de100-team-elan-lockpick-system?from=user
Hmm, what a coincidence, I just used ctrlSetAngle myself a few minutes ago, I will try that, cheers!
now i see the problem, the game for some reason dont wanna play the music full
it only plays half of it and cuts
how i fix that?
why spawn it?
nvm i guess you're putting this in an init box or calling it from the debug console
@little eagle Spam
Is there a way to play the gunshot sound that is attached to a weapon without firing the weapon? I was looking at CfgWeapons and see sounds attached but am unsure on how to use them.
@frail zephyr playSound should be able to do it just fine
I guess the better question is, how do I properly retrieve the sound from there? Haven't done much with the Cfg files other than functions.
getText / getArray
You can't fully emulate gun shots anymore though. All those environmental effects and sound filters are not supported by any SQF command.
They'll always sound a bit different.
Im just making a "Do Not Enter" area, and inure the player when they enter; wanted to add some effect to it.
Use the ricochet sound. Really really loud.
I'll try to find it, ty
POP POP YIKES!
Hey guys, does anyone else here ever got a problem with BIS_fnc_initListNBoxSorting function? I get a error zero divisor error.
i need some help finding a random position to spawn an enemy group in an area, but making sure its x meters away from all players in said area
ideas?
thinking SHK_pos
cba in area
erm, additional ingo @peak plover ?
So, has anyone ever had the case where if you print the value of a variable it doesn't come out as "true" or "false" but "bool"?
thats probably the boolean Null-type
or youre accidentally logging the typename but lets not assume that
I see.
I'm trying to switch our missions from using a homebrew revive system (SWS) to BI's revive system. I have discovered that if 2 players die next to each other one of them gets a script error every 0.05 seconds.
13:43:28 Error position: <_canUseMedikit]; if (!_canUseMedikit && > 13:43:28 Error Undefined variable in expression: _canusemedikit 13:43:28 File a3\functions_f_mp_mark\revive\fn_reviveAllowed.sqf [BIS_fnc_reviveAllowed], line 316
does anyone here know their way around the arsenal function? i was wondering i one could trick it into loading the stuff of two units instead of one. like when you make it open with only what you carry yourself
I looked "everywhere'. can anyone confirm the proper classname changing from "Male05GRE" to "Male01ENGA". I want american English is that properly written?
depends what kind of american english ur after. 05GRE translates to 05ENG but there are 12 or so american english voices to choose from what i can see.
ok so what I need to confirm is teh extension,.....GRE or ENG and so on. I need the american english ectension and thought Iread somewhere that it might be ENGA
are you saying that it is just ENG and not ENGA ?
https://community.bistudio.com/wiki/createUnit
in case one passes empty group to this, will the command error out or?
Error
no i dont think, but if it is passed a group that hasnt been created it will error
@subtle ore you tested? or you just remember?
Yes I tested
hmm, midnight ive tried it with an empty and it didnt error
can you send me the err msg?
it is either created like this (createGroup west) createUnit [];
or it has to exist beforehand
Check rpt
nah ... mean the group as positional parameter
Positional param? It doesn't use groups as a form of retrieving positions even in the alt syntax
group: Group - Existing group new unit will join
_grp = createGroup west;
_unit = _grp createUnit ["B_Soldier_F", _grp, [], 0, "FORM"]```
position: Position, Position2D, Object or Group - Location unit is created at. In case of Group position of the group leader is used
I see
Well, I would say yes
wouldn't see wy not
Haven't tested that in particular
lol ... says the same msg as when one passes empty array
gotcha
that's kind of odd though
I think I brought up the confusion regarding this in the wiki channel the other day
@sage flume yea, just ENG is american english. ENGB is british english, there is no ENGA https://i.imgur.com/MfBpSlH.png
thank a lot !
Does anyone know how I can lock/disable a sector then unlock/enable it later? I have multiple sectors that I want to be taken one by one instead of all being available. I've tried
enablesimulationglobal false
which in turn does lock the sector from being taken, but using
enablesimulationglobal true
won't re-enable the sector to be taken.
I tried toying around with Unlock and Lock logics but to no avail
Sector?
Don't think you can use enablesimulationglobal on them and achieve much. Modules are just tools to execute a script and those don't care about the simulation of a game logic.
That might be a possibility, I'll see what I can do
Pretty sure there is a fnc for sector creation
tracked apcs are class Tank.
Best thing is to check if they have cargo space for soldiers.
Would list the Not-Merkava as APC, but it technically is...
The namer?
Slammer
Ah.
An APC with a machine cannon and grenade launchers is arguably more dangerous than a MBT with machine guns for infantry.
I remember my first mission in a Leopard in A2 shooting down a Hind with the main gun. 👌
simulation
They both have TrackedX
TrackX ?
Something like that.
TankX!
It's TankX for all tracket physx vehicles.
There is BIS_fnc_itemType where BI decides arbitrarily what a machine gun is and what a sniper rifle is etc. Maybe they have the same for vehicles?
nameSound is the entry that decides how AI calls a vehicle.
veh_vehicle_APC_s
Btw, that parachute problem... How fast does the parachute move compared to the wind?
And how fast does it drop?
If you can figure that out then the solution should be:
P(-vx/vd*h, -vy/vd*h, h)
vd is the velocity of a dropping parachute. Should be constant in Arma, but idk the value.
vf is parachutes horizontal speed
This assumes that the plane isn't too fast (or the box carries over no momentum from the plane) and the wind isn't too fast, so the acceleration phase of the chute in wind direction is quick.
I'm working on a complete solution (assuming airfriction works for parachutes correctly), but it's a dumb differential equation with e.
It is for real life, but Arma physics is demotivating.
I'm going with P(-vx/vd*h, -vy/vd*h, h) for now, but I'll test how much horizontal speed the chute picks up from the wind.
drop speed of the parachute.
It should be constant.
vertical speed
how fast it falls : P
Anyone know if it's possible to see how Eden work for the movement of object
I can't achieve something smooth when moving object with cam like Eden
I think it's hardcoded in the engine, but if anyone have a solution , i'm open
Is there any way to reference scripts in the config.bin that are outside of the pbo?
That way I can work on the script without replacing them inside the pbo?
yes. If you mean outside of any PBO then you need to enable filePatching
So like, I can have a pbo with config.bin inside it. But the scripts are outside of the pbo just in the addons folder?
Because I see they are all referenced like /functions/whatever
/ seems to mean the root inside the pbo. Can I reference them outside of the pbo?
Oh wait, I might understand this filepatching thing. So basically with filepatching enabled, I can make a folder in my arma 3 directory like mod_namespace/functions/whatever.swf and it will override the script inside the pbo on mission start?
yes
/ is also Arma directory if file is not in pbo
so /myfile/file.sqf
would be either inside your pbo. Or Arma 3\myfile\file.sqf
yes
Amazing. So enable file patching and reference the files outside the pbo and I should be able to make a script change, restart the mission and see the changes.
That should save tons of time having to restart arma over and over.
Is the namespace inside of the %prefix% file?
maybe.. Don't know where you got the word "namespace" from and what that's supposed to mean
An addon has a prefix or a "namespace" from what I understand that is registered in the $PREFIX$ file
At least from my understanding
That way mod1 doesn't use the same namespace as mod2
Yeah inside the prefix file is the same name as the pbo I'm messing with
that's called pboprefix
namespace pboprefix tomato tomäto
It just is a path prefix to your file.
so if you have file.sqf in your pbo it will be <pboname>\file.sqf because if you don't have a prefix it will use the pboname by default.
if your prefix is z\ace and then your file.sqf will be at z\ace\file.sqf
Sweet
And does it only look in the arma root if it's not in the pbo? Or does it do it anyway if filepatching is enabled?
with filePatching enabled afaik it first checks outside
does isPlayer return false for null objects?
Has anyone used the rhs scud missile script? Mine goes out with a rather underwhelming puff of smoke
Hello all sory for the noob question
i want to move players into a plane with a flag pole i tried everyting (noob mission maker)
now i know i have to use addaction
i named the plane cargo_1 and the flage pole pole_1
how do I quickly resolve the following rpt spam in basic.cfg?? 14:38:54 NetServer: trying to send too large non-guaranteed message (1360 bytes long, max 1348 allowed) 14:38:54 Message not sent - error 0, message ID = ffffffff, to 405059591 (Capt J. "Night" Howlett)
@midnight idol maybe try using https://community.bistudio.com/wiki/setFlagOwner or https://community.bistudio.com/wiki/forceFlagTexture instead
ty
Hey guys, do you know if theres any possibility to open a link, like you could do with href in a structured text control, but just with a regular button?
That would be using a CT_StructuredText
Which I do not want to do
Of course it would work, it would use the control I am avoiding to use.
However, there wouldn't be any reason to use ctrlActivate
Well, sure that would work, but I want to avoid using CT_STRUCTUREDTEXT
No
Maybe that is what I have to do in the end, but i'd rather use a native way
can someone give me a hand with a sound script? I read that if I delete the object that a sound is attached to, the sound will stop playing, but that doesn't seem to be working for me: https://pastebin.com/raw/a4aPFDqN
when I play 4 sounds in a row, there's only 1 attached object, but all of the sounds are playing (so they're not deleting?)
when you DELETE sound source (object) sound (your track) will stop
you can try moving it to [0,0,0] before deleting
nope, still not stopping the sound
How did you create the sound? Try a different method
_soundObj setpos (position _vehicle);
_soundObj attachTo [_vehicle];```
just added the setpos
when I try the full parms for the playsound3d, I don't hear anything
playSound3D [_track, _soundObj, false, getpos _soundObj, 1, 1, 5];
_soundObj ="Land_HelipadEmpty_F" createVehicle (position _vehicle); rewrite
_soundObj ="Land_HelipadEmpty_F" createVehicle [0,0,0];
_soundObject setPos (position _vehicle);
it is actually quicker to create object on [0,0,0] and setPos after than creating at exact position
alright, I'll try and remember that in the future
still no sound thugh
well I'd like to be in audio range of it
so I'd like it to follow the vehicle
the sound plays with just the [_track,_soundObj] parameters
but not the full paramters
playSound3D needs the full path to the file
did you try say3D?
You can also have a emply sound file and just play that
nvm I experimented witht he parameters
playSound3D ["ed4\ed4_sounds_a3\data\audio\radio\Track_1.wav", player, false, getpos player, 10, 1, 20];
worked
I know it needs the full path, my script accounts for that
okay
for some reason, 5m as the max distance didn't want to work
well, back to the original issue lol
movng it to [0,0,0] after detach doesn't seem to work
current state: https://pastebin.com/raw/Y5ggqTbS
alright, so I'm doing this:
_radio = vehicle player getvariable "CurrentRadio"; deleteVehicle _radio; and its showing that the object becomes null, but the sound still plays
playSound3D is not linked to the alive state of the object at all
its wont even move along with the object, it just uses its' position
well that would explain the issue
according to killzonekids note, that is
what's the solution?
say3D?
thats probably it, thanks
I'll let you know how it works out
alright, it works
just kind of strange how low volume it is at 1 (with .wav extension)
does anyone know if .wav or .ogg makes a difference for volume values?
alright, I've got good parameters now, thanks for all the help!
What's an easy way to test if a player is the pilot / driver of a vehicle?
if (player == driver vehicle player) ... ?
Boring question. Ask yourself what the most complicated one is.
I think a hilarious thing would be for bohemia to host a competition to do something really simple in the most complex way possible
There never is a most complex thing without further restrictions.
I mean sure, with some rules like length doesn't necesarilly mean its more complex
It's probably possible to include every operator/function/command in making any given calculation.
Hey there im trying to make a hold convoy, then move when a trigger is activated by im having some difculties. any suugestionsÉ
i figured it out
Ohh okay
i was over tinking it
setconvoyseparation and limitspeed are cool for convoy
One thing I figured out how to do for making convoys stay more uniform is have the vehicle in front of the very back one go 1km/hr less than it, and the one in front of that 1 less, and so on until you get to the front
using limitspeed