#arma3_scripting
1 messages · Page 409 of 1
_TargetSpeed = 20;
^^ int
so?
(_vel select 1) selects the forward velocity with also is an int
the part that adds speed (_vel select 1) + ( _speed) works correctly
waitUntil{speed vehicle player > 20} < Bool
Maybe you shouldn't be using waitUntil for tjis
but I want to smoothly change the velocity
waitUntil will not smoothly change the velocity anymore than what you have inside the condition there
Literally all the code in there can be outside waitUntil and it'll work as intended
Do you have the ability to pastebin your entire script?
Then loop it, sleep it, or condition a variable inside the loop
while{!isNull _testVeh} do
{
if(_coolStuf) then
{
//code
};
};
No, waitUntil is a oneshot event that suspends the script until a condition is true
That is why you need the condition to return a boolean
false Suspends execution of function or SQF based script until given condition is satisfied. This command will loop and call the code inside {} mostly every frame (depends on complexity of condition and overall engine load) until the code returns true. The execution of the rest of the script therefore will be suspended until waitUntil completes.
from the wiki
That's exactly what i just said Taro....
This command will loop and call the code inside {} mostly every frame It will loop the velocity change until the (_vel select 1) == _targetSpeed; returns true (ie. the forward velocity reaches target value).
waitUntil {
if ((_vel select 1)> _targetSpeed) then {
_speed = _speed * -1;
};
_veh setVelocityModelSpace [
(_vel select 0),
(_vel select 1) + ( _speed),
(_vel select 2)
];
(_vel select 1) == _targetSpeed;
};```
Lopping the condition, once it becomes true, it will exit
thats the point
i'm tempted to say "because you can"
because I can
Not actually aware of any downsides to doing this tbh
also the script does not need to do anything above that
It's not very clean suicide king
like, you could also do while {do stuff; condition}; i think
While{} do{};
yeah i know, in which case it would be while {do stuff; condition} do {};
Yep
(don't know if it's possible to drop the do{} at the end)
Maybe in c but not in sqf
but yeah apart from "not very clean" i don't know of any down sides to the waitUntil thing
No sleep?
@inner swallow
private _veh = vehicle player;
_targetSpeed = 200;
_vel = velocityModelSpace _veh ;
_speed = 1;
waitUntil {
if ((_vel select 1)> _targetSpeed) then {
_speed = _speed * -1;
};
_veh setVelocityModelSpace [
(_vel select 0),
(_vel select 1) + ( _speed),
(_vel select 2)
];
sleep 1;
(_vel select 1)== _targetSpeed;
};```
trying to get this one working, I get generic expression error in the if statment and the final check in the waitUntil
hmm yeah, wot midnight said
i think you have to remove the semicolon at the end?
(_vel select 1)== _targetSpeed should return a bool otherwise from what i can see
although given what you're doing, might be worth using while-do instead
see if it still gives you a generic error
If error, check the RPT. It says the line number and additional information.
@little eagle doesn't preProcessFileLineNumbers display error line number?
private _veh = vehicle player;
_targetSpeed = 200;
_vel = velocityModelSpace _veh ;
_speed = 1;
while {(_vel select 1)> _targetSpeed} do {
if ((_vel select 1)> _targetSpeed) then {
_speed = _speed * -1;
};
_veh setVelocityModelSpace [
(_vel select 0),
(_vel select 1) + ( _speed),
(_vel select 2)
];
sleep 1;
};```
crashed arma 😦
No, but it puts #LINE commands inside the string that compile can turn into error messages with line numbers should the executed script error.
No, waitUntil is a oneshot event that suspends the script until a condition is true
That is why you need the condition to return a boolean```
half wrong. It is looping (until cond. is true). So basicly you could add as much stuff in it as you want and add a false at the end. A while loop would still be better (with an exitWith), but it's doable ¯\_(ツ)_/¯
@jade abyss i was referring to after waitUntil condition has been met
Doesn't loop after met
and that is the point
Taro - Today at 12:30 AM
Doesn't waitUntil act as a loop?
I used it like that before
Midnight - Today at 12:30 AM
No, waitUntil is a oneshot event that suspends the script until a condition is true
That is why you need the condition to return a boolean```
Never thought of actually looping via waitUntil
Well that is not what i meant to convey
You still can use it as looping (shouldn't do it, but it does work)
Understood
🤷
Its a small code snipped, that why it can sit there until it does what it has to do. At least waitUntil didn't crash arma 😄
But why? What is wrong with using a traditional loop?
No clue ¯_(ツ)_/¯
I suck at coding and waitUntil was something I knew 😛
Taro likes it overcomplicated 😄
while(true)do
{
//YourCodeStuff
if(conditionMet)exitWith{};
};```
OR:
while(!conditionMet)do
{
//YourCodeStuff
};```
private _veh = vehicle player;
_targetSpeed = 200;
_vel = velocityModelSpace _veh ;
_speed = 1;
while {!((_vel select 1)== _targetSpeed)} do {
if ((_vel select 1)> _targetSpeed) then {
_speed = _speed * -1;
};
_veh setVelocityModelSpace [
(_vel select 0),
(_vel select 1) + ( _speed),
(_vel select 2)
];
sleep 1;
};```
! = NOT
So:
{!((_vel select 1) != _targetSpeed)}
is the same as:
{((_vel select 1)== _targetSpeed)}
Yep, correct edit =}
Still no error message from RPT giving the line and instructions to fixing the issue. ¯_(ツ)_/¯
kinda got it working. I accidentally seem to have also discovered the absolute max speed a vehicle can go, its 3500km/h
private _veh = vehicle player;
_targetSpeed = 60;
_vel = velocityModelSpace _veh ;
_speedChange = 1;
while {!((_vel select 1)== _targetSpeed)} do {
_vel = velocityModelSpace _veh ;
if ((_vel select 1)> _targetSpeed) then {
_speedChange = _speedChange * -1;
};
_veh setVelocityModelSpace [
(_vel select 0),
(_vel select 1) + ( _speedChange),
(_vel select 2)
];
sleep 1;
};```
got it
I got hte hangar thing,I just looked at the animationSource,thx for everyones help
Told ya =}
D(vere)scha strikes again

.Michael Dschackson > .Dschannifer Lawrence in less than 3 minutes 😄
nice change btw
@jade abyss want me to point out some more models with dvere for you ? 😛

Anyone know best way to get inventory items of an interacted object? With on opened EH
Yup using that, trying to use cargoItems command or read info from LB
Giving me issues when it seems too straight forward to be not working
anyone know how i can find xyz cords of models.
From the model itself? Model above Land? Model above Sea? Model Pos in world Coords?
the model itself
boundingBox might be helpful for that
boundingBox
boundingBoxReal (closer to the "real" measurements of the Model)
boundingCenter
does that give a spot inside or around the model
it is for a vehicle spawn for a house. so the vehicle spawns outside each house
kk, done then
Yes
ight thanks tho
@unreal skiff Do you need to spawn a vehicle at some point of the static house, or for any house, even vanilla?
How does player initilization work in multiplayer?
what happens when a player joins a server?
Did anybody anytime had used addEventHandler called Local? The thing is any simple code inside this handler results in nothing but yet another spam alike
11:16:12 Client: Remote object 4:2 not found 11:19:26 Server: Object 4:7 not found (message Type_121)
Handler called on the server after vehicle being spawned.
[(allCurators select 0), ["\a3\ui_f\data\igui\cfg\simpleTasks\types\move_ca.paa", [1,1,1,1], (cursorObject), 0.5, 0.5, 0, "Cached", 1, 0.05, "TahomaB"],true,true] call bis_fnc_addCuratorIcon;
draw3d does not work for zeus, just map marker
All forms of draw3d seem to not work with zeus interface
damn it !! 😦
[allCurators select 0, ["A3\Modules_F_MP_Mark\Objectives\images\CarrierIcon.paa", [1,0.702,0,1], getPosATLVisual player, 2.0, 2.0, 0, "", 0],true,true] call bis_fnc_addCuratorIcon;
It works https://gyazo.com/7c081d88e7cd483ed6f255453bf22b7c @peak plover
¯_(ツ)_/¯
@jade abyss wasn't your iCloud hacked?
@still forum Yes, i am still ashamed about those leaked pics 😢
Thanks @meager heart It was a mod apparently
class RscDisplayStart:
editing this caused 3dicons not to work in zeus
Makes total sense, there's 0 connection
is there a possibility to override arma actions for specific objects? like takeweapon for example
What code editor do you guys use? I currently use Atom, but am considering switching to Visual Studio Code
When a player joins the server, the 1st thing that happens is player avatar is created on the server. It is empty and server “owns” it. Then the server assigns some random default AI identity to the avatar, so it has face, voice and name. The avatar’s “init” is executed, if there is one. At this point server already knows for whom this avatar is prepared. Copies of the avatar are created on all connected clients including player’s client. When the avatar initialisation is finished on player’s PC, player identity gets moved into this avatar, at which point server transfers the ownership of the avatar to player’s PC, and player’s copy becomes the master copy.
Is the statement still true?
sounds goodish
random default AI identity
Doubt it
Probably reads class
and gives from the unit class
@shut flower what trying to do?
ehm, remove the take action from a weapon holder
and the inventory action too if possible
Also default side will be west for "some time"
I created an own holder inheriting from Weapon_Empty and tried to define empty user actions
because the config doesn't contain any actions
you actually need to disable them in CfgActions and re-add them manually to the ones you need
Does anyone know why createUnit gives a null object, when used in a player connected EH for a JIP player.
quite overheat when I just want to exclude one holder
@south rivet Are you using the createUnit syntax that doesn't return the created unit?
it is, but iirc the take and open inv actions are added by engine to anything with a inventory
private _logic = ZeusGroup createUnit ["ModuleCurator_F", [0,0,0], [], 0, "NONE"]; That is the line I use
yeah think so too
What items does the player have when it spawns in the game if I put the following code in unit init?
It works for non-JIP, but it returns null when used for JIP
you could however abuse the lock of the weaponholder or add an inventory/take eventhandler to reverse the action
removeUniform this; //arg:global/eff:global
removeVest this; //arg:global/eff:global
removeBackpack this; //arg:local/eff:global
removeHeadgear this; //arg:global/eff:global
removeAllWeapons this; //arg:local/eff:global
this addBackpack "B_Kitbag_mcamo"; //arg:local/eff:global
this addMagazines ["9Rnd_45ACP_Mag",3]; //arg:global/eff:global
this addWeapon "hgun_ACPC2_F"; //arg:local/eff:global
yeah this is the solution I first thought of
@stable wave All his items because syntax error I think
idk if the lock state removes the take action tho
@south rivet I guess you might need to wait a frame.. Otherwise I don't know why that would happen
I'll try a bit of sleep
Good night
hmmm, it already waits 5 seconds from when the player joined.
@still forum Code corrected
@stable wave backpack with 2 magazines and a loaded pistol in hand.
Additionally maybe Map/GPS/NVG/Watch/Compass
Is the group sideLogic?
work*
come on wizard
What are you exactly trying to do @shut flower
A weapon holder that you can't get items out but you might let people take items out of it?
weapon holder just for showing a weapon
can I still use setVectorDirAndUp then?
yes
awesome
But as to the statement I posted earlier, the init should first be executed on the server then on the prayer's PC. Shouldn't it have 5 mags in the backpack since addMagazines is arg:global?
all of them are global?
((createGroup sideLogic) createUnit ["ModuleCurator_F", [0,0,0], [], 0, "NONE"]);
//L Charlie 1-6:1
((createGroup sideEmpty) createUnit ["ModuleCurator_F", [0,0,0], [], 0, "NONE"]);
//<NULL-object>
🤦
Some are. Some aren't. Please refer to the comments in the code I posted.
I have no Idea
if !(local this) exitWith {};
//ADD MAGAZINECARGOGLOBAL HERE
I don't know why you would execute inventory scripts anywhere where the unit isn't local anyway
If you wanna know I guess you have to try out.
Only execute on the server and if it's not local, remotexec where it's local 🤷
no need for that in init script
loadout scripts in init scripts are generally bullshit. If some other player JIPs he will execute your loadout script
👆
So.. I guess he might have 5 magazines.. But depending on the amount of other players he might have 200 magazines
The code is just an example. It is used to explain how player init work in MP.
Why not use something simpler
init script runs everywhere on each client for all units that have a init script
on the unit that has the script. On the server. On all other players
on the HC
if (!hasInterface) exitWith {};
[player] call loadout_fnc_unit;
Even worse
holder = createSimpleObject ["\A3\Weapons_F\Rifles\MX\MX_F.p3d", getPosATL player];
Any clue why this returns null?
still all players execute that
No
so one player now get's dozens of loadouts for himself
Just use that in init
?
gotcha
Well
DO NOT use 3den for loadout scripts
Having to write the same loadout function for every unit is a pain
Just write it once in a postInit
Mixed input
Sure
Optional
Let's just find the best option for Jermin
With the tools he's got at hand
If you want to tell people how it works. Just tell them to never use it except if they put if !(local this) exitWith {}; into the first line
👌 👆
According to the article, the player would have 2 mags in the backpack when he spawns. But whenever a new client connects, the player would have 3 more magazines in the backpack. I can understand the latter. But I can't figure out why player doesn't have 5 mags in the backpack on spawn.
Pasta your code
Maybe because the servers init script runs before the players
And the player clears the inventory before running his
Does the loadout script delete the inventroy too?
well calling removeBackpack will remove the backpack...
But it is arg:local
yeah
the server owns the unit though
before the client joins
I guess that depends on if you have AI enabled or not
in the lobby
if you do the server will spawn them first. Put a AI into them and run their init scripts
if not then it will get created. The server runs first and adds the magazines into the old backpack of the unit which get's removed when the player runs his loadout script
that however depends on how fast the server is. if it is too slow then the player might run first and the server might then really add the magazines
Also depends on how fast the client is. If the server is so fast that it spawns the unit and runs the init script locally before it transfers the unit to the client then the client runs his script later removing the backpack and thus ending up with 2 magazines
In short. Just don't run such bullshit scripts
^ trust this man, he knows C
I don't
any way to deny weapon take via Take evh? like you can do with ContainerOpened?
Oh and also depends on network load if the network is too loaded then the server might run the init script before the message that the client can possess his unit arrived at the client
Soomeone had the same issue once, what are you trying to restrict from being taken?
weapon holder
more specific: weapons out of a weapon holder
but shouldn't matter what kind of container
You don't want players to get new weapons
well you can use inventory opened EH and just close it again
You just have to put other stuff into the holder so that the Take weapon action goes away
nah, inventory opened can be denied by returning false
Yeah but it doesn't trigger when you do it via mouse scroll take
replace them with simple object
That's why I said do stuff to remove the take action?
just tell me how
Would you maybe just read what I write?
simple object of a weapon holder won't work
of a weapon won't too
since you cannot create a simple object out of a weapon model
You can create a simple object out of any model
just tested it out, I read what you write
no restrictions
I didn't mean that
You just have to put other stuff into the holder so that the Take weapon action goes away
Again. Read what I write.
But the unit init on the player's PC run before the server transfers the ownership.
Put some misc item into the holder and you won't have the take weapon action anymore
Use ace arsenal
export the loadouts,
use setUnitLoadout wherever you want
???
Profit
what should I put in? the action will persist afaik
@stable wave Could also happen when it isn't fast enough.
@shut flower Put some misc item into the holder
To get rid of the action you can drop another weapon there like binoculars
they will be visible then
good idea
would it be enough to just leave out the model in config?
I think then it uses the default pouch
wait, ace had a dummy model
at least I think there has been one
\A3\Weapons_F\empty.p3d
sounds like an idea
The createSimpleObject wiki page lists examples of weapon model paths though
"a3\weapons_f\Rifles\mx\MX_F.p3d" There. That is in the list of examples
You used "\A3\Weapons_F\Rifles\MX\MX_F.p3d" atleast what you posted above
any example on the wiki shows it without the \ at the start
I just took that out of config tbh
Did you try disabling simulation of the weapon holder?
Well I would recommend to you to read the wiki next time then
Optionally a weapon holder without simulation might also work
Disabling simulation leaves the action
but action does not work
It's unproffesional, especially for life mods
life pfft
You mean it's the perfect thing for life mods to do?
laughs in the distance
Because it perfectly reflects their professionality?
a non working action is enough for me tbh
U got cba?
brah
initPost EH that checks if the groundWeaponhodler has your non allowed weapon in it
and disables simulation
what does he want?
A simple object weapon.. Basically..
yeah
removeAllActions on the container ?
That shouldn't work
oh well, disableSimulationGlobal is not working for this case
removeAllActions only works for user added actions
^ has to be run on the server and command should be enableSimulationGlobal
Just add 200 take weapon actions and confuse the hell out of people
Does anyone know how to trigger the "take cover" order you have the access to under 1? I'm sorely missing a waypoint at with the AI takes cover and I want to kludge up a scripted one that has that effect.
ohh
Because they listen for clients to join
unlike speaking servers, that whisper to the ears of framerate
haha
wait dedmen are u making a new tfar?
no I just pretend
Fix it already *
Having to setup a keybind to toggle TFAR plugin in ts is a legit workaround to the current TFAR1.0 problems
Oh you can do that?
Yah
Good to know 😄
Any way to actually trigger orders via scripts or you would have to write something new from a ground up that mimics the order you want to trigger?
@thorn saffron there are a bunch of that procedures, alike
https://community.bistudio.com/wiki/commandFire
https://community.bistudio.com/wiki/commandSuppressiveFire
https://community.bistudio.com/wiki/commandArtilleryFire
If you meant that ofc.
@unborn ether I want to trigger the "take cover" order. Not that its a bit different from putting units into combat mode
@thorn saffron The order to "Find Cover" is some part of AI FSM and isn't an actual implemented scripted command.
listen server is a pretty common name for non-dedi
dunno where it originates from. at the very least from HL1
it sounds wrong 'tho
@thorn saffron The only thing supposedly will work is enableAI\disableAI with an option "COVER" and switching combat modes apart of this.
sure, but if most people know what it is there’s no issue
@peak plover yes i guess so
@thorn saffron The most likely result comes with switching combat behaviour mode to "STEALTH"
yeah listen-server usually means non-dedicated for some reason
Is it only me that exportJIPMessages crashes my server binary?
anyone knows where I find a extDB3 tutorial? searched for days in the BI forum and other sites. the connection is there but it does not want to execute the command to make an entry in the database for the player. only if I execute it via debug console on the server it executes but then the entry is useless . command: "extDB3" callExtension format ["0:SQL_QUERY:INSERT INTO main (steamID, lastUsername) VALUES ('%1','%2')",(getPlayerUID player),(profileName)];
Does it throw any error when it "does not want to execute the command" ?
no the log files don't say anything
if I execute the command in the debug console it makes an entry, steamID (getPlayerUID player) is empty and lastUsername (profileName) is arma3 because it got executed on the server
I tried to execute the command in many files init.sqf onPlayerRespawn.sqf initPlayerLocal.sqf initPlayerServer.sqf .... nothing works and no error in the log file
So you just try everything without knowing what you are doing?
The extDB connection is working on the server right?
if i try to connect via debig console it said connection is already there
If you try to use extDB on the client that is a completly different machine that has no connection to the database. So ofcause it doesn't work
and player doesn't work on the server
meaning you either execute the script on the server and it can't work because player doesn't exist. Or you execute it on the client where it can't work because there is no DB connection
so I have to create the connection from the player to the DB not from the server
NO
Well ofcause.. You can just give every player on your server all your database credentials so they can remotely login and do whatever they want
If that's what you want to do.. Go ahead...
no i try to execute the connection command on the player ofc i don't give all the player the DB password etc 😃
To connect to the database you need the password though
So how would you make the client connect using the password without giving him the password ^^
the password is in the file in the extDB3 mod
Make functiosn on server to modify it and then if the function is called on a client, remoteExec it on the server
I don't think going straight to DB without having an idea of scripting basics is a good Idea. initPlayerServer probably has the player unit in _this or similear. Use that. But profileName won't work on server
Or yeah. Do it properly by using remoteExec and letting the client call stuff on the server
ok i try remoteExec thank you
player isEqualTo (driver vehicle player) \\ true
Music from X-Files
P.S I am the unit
I did allPlayers today with 2 clients connected to the server. It was only returning 1 for a bit, then ~5 minutes into the game, the 2nd one popped up 😐
allPlayers unreliable in 2018 😦
That might be laggy client, since allPlayers actually returns the array of units which being occupied by a player (agent switchable unit being taken)
connected != playing
While playableUnits returns whatever player occupied or proxies (agents)
maybe he was stuck loading / in the lobby
So, it didn't lie to you 😄
quite sure TFAR uses allPlayers. Didn't see anything going wrong with that ever
Well, its reasonable, why would you even involve agents there.
Huh? Sure it's reasonable. I meant that I didn't have problems with allPlayers. Unlike what nigel is reporting
Hmm dno
Could have been anything
tried to
{
_x setpos (getpos player);
}forEach allPlayers;
Didn't teleprot the other player, so I put allPlayers in the watch field which only showed 1
🤦
A bit of offtopic, but: What servers allows doing a setPos from a client in 2018? 😄
98% of private servers?
No cheaters mass teleport involved for sure 😄
over 90% of public milsim servers. Atleast a third of other public servers
Well thats huge security breach, ouch
If a cheater knows how to circumvent battleye he doesn't need scripts
no it's not really at all
all servers who don't run battleye (allowed to setPos)
Well, BIS gave them a well done tool with CfgDisabledCommands
who ^ ?
Well its a nice workaround, since my framework doesnt use some kind of hint\hintSilent i just did kill them
not you :u you are a snail you don't use things
So script kiddies go away with that 😄
meh, you can just display text on the center of the screen, much more annoying
Well i just do use some specific RscStrucutredText tied as a layer to findDisplay 46, so I don't need hint
When utilizing the Arma 3 Revive system in a mission, is it possible to detect when a player force "respawns" when incapacitated? OnKilled only runs when they are executed by someone.
@tough abyss onPlayerRespawn*
https://community.bistudio.com/wiki/Event_Scripts
I am using that for other things, but need to detect the killer and if they choose to force respawn.
Which is why onKilled is useful.
@tough abyss If you use vanilla respawn system, there are arguments of the killer passed to Event Script
Figured it out. If I monitor player getVariable "#rev" when in the unconscious state, it holds the culprit.
What would happen if I execute am arg:global command on an AI soldier from a client?
Whatever that command does would happen.. I guess
"AI soldier from a client" doesn't say anything about whether it's local btw
the point of AG is to be able to pass non local objects to the command
otherwise it would be tagged AL....
Are AI players all local to the server?
ai player? Maybe playable unit ? or AI in playable slot?
Ahhh. That makes sense I guess
Maybe we are all AI's? Like.. How can we know if we are real?
What is real
inb4 you realize you're a neural network
Uhm.. I think I kinda am?
inb4 real does not exist and is just a concept made up by the human brain
Matrix
Btw is it possible to setPlayable backwards ? Like not playable ?
no
But you can use https://github.com/commy2/Arma-3-Scripted-Lobby
setPlayable and unsetPlayable are both not possible
Scripted lobby
0 spawn
{
_unit = createGroup west createUnit ["B_pilot_F", position player, [], 0, "FORM"];
setPlayable _unit;
selectPlayer _unit;
};
I have a quick question regarding locality in multiplayer. I have a script that is called from a trigger which will cause an AI to wave the player's convoy through a checkpoint. The script itself just calls BIS_fnc_ambientAnim__terminate, queues up a few playMove calls, checks until they are done, then calls BIS_fnc_AmbientAnim again. It works perfectly in the editor, however I have been reading about locality issues (which I am entirely new to), and I suspect that they will cause issues here. Specifically, the playMove command needs to be executed local to the object it is applied to, which in this case would be the server right? So if my understanding is correct, this means the script will not execute properly unless the host trips the trigger, correct? What is the usual way to get around this?
The trigger script should also run on the server when a player triggers it
afaik playMove locality is PLAYER locality, not entity locality
there's a global variant too
meaning playMove has to be executed anywhere
which is what the trigger script would do by default
oh wait, no that's an other command i'm thinking of
@thorny ferry Did you try it? Or are you just suspecting that it doesn't work?
playMove is indeed AL EG
Speculating, since I have no way to test it with just myself.
it should work if it's played on the server / where the AI is local
You can test that alone on a dedicated server
Ambient Anim may not work correctly in MP
It was very unreliable when i used it in the past
And I read through the entire script once, it seemed like it was a mix of MP compatible and incompatbile bits
Like some commands that need local args or have local effect used with global stuff
@Dedmen Guess I'll need to set up a dedicated server to test it out then.
@inner swallow I'm making an effort to make this mission compatible with everything, though I have no intention of hosting it on a dedicated server myself. Is there a more reliable alternative to ambientAnim?
well, no
But i mean if you're not going to host it on a dedicated server it should be fine
That said i only know that it works well in SP or if you're the local host
no clue how it looks like for remote clients to a local host
probably similar to dedicated for them
you'll probably have to use playMove etc manually
Alright. I know a few people I could probably get to test it with me. With playMove manual usage though, I would need to have a script that will loop playMove correct?
I wonder if theres a way to tell how many playMove commands are queued. That'd make this easier.
but yeah, for whoever's interested, my analysis of ambient anim resulted in this https://pastebin.com/eQdxTLvz
@inner swallow BIS_fnc_ambientAnim is a bad decision for MP, since it performs attachTo, createGroup and createUnit.
@inner swallow If you willing to staticly simulate an endless loop, i'd rather use single-looped script from server, sending switchMove\playMove via remoteExec by the timers. You also have and option to do it locally in mission.sqm, if accesible.
@inner swallow But this attachTo, and createUnit also has a huge reason. Since animation requires simulation to be enabled, your unit will have a PhysX simulation (ramming with car will push unit away). Thats why it is getting attached to a unit called "Logic"
@inner swallow So you decide - performance or visuals
@unborn ether I'm not sure I understand. You said that animation can be achieved using a loop and playMove or switchMove. However you also said that attachTo and createUnit are important. Where do those those commands factor into the animation?
@thorny ferry Unit must have a simulation enabled, since that PhysX of that unit is also enabled, which means it can be pushed/rammed with a vehicle. attachTo is done to disable the PhysX modeling, in that case you need a point to attach it to, BIS_fnc_ambientAnim is doing that.
Units have no PhysX btw
@still forum Well tell that to ragdoll simulation happening right when you get rammed or killed.
ragdoll yes. But normal unit doesn't
In a shorter version - attachTo disables simulating the ragdoll.
@unborn ether So BIS_fnc_ambientAnim disables simulation, but then partially reenables it so that animation can actually take place? Is there any particular reason to do this?
@thorny ferry It doesn't disable the simulation, it just a huge workaround to disable the ragdoll. This resulting in that unit has a collision model present (GEOM enabled), while touching this unit with any vehicle ,including units doesn't simulate PhysX -> Ragdoll.
@unborn ether Ah, ok. So it just makes it so that the unit can't get rammed out of position while it is animating.
@thorny ferry In a bare words - yes. 😄
@unborn ether Thanks for the explanation! Would you happen to know where I can find the source code for BIS_fnc_ambientAnim? I'm kind of curious to read it myself now.
Ingame function viewer is probably easiest
in the debug console there is a button for it
Is there any simple code that I can put in the init of a centurion to tell it to track by visual instead of radar so it doesn't kill aircraft across the map?
this setVehicleRadar 2;
maybe?
"So it doesn't kill a vehicle across the map", none of the planes/jets/helicopters do that
In real life you'd be much higher up unless you are CAS
I don't know what a "centurion" is
Radar range likely. But if the vehicle hides behind something then you're screwed
Ah it's fine, I just want immediate base defense
Base is at altis airport and I have a mk21 and a mk48
the preatorian
preatorian doesn't kill too far out
but the missles were hitting target across the bay
As they should
Altis is 2:1 not 1:1 iirc
So you may be shooting a closer distance than you realize
It was still a decent 8 km distance
It's good but like I said, I only want things shot 4 kms at best
that's 4.3nm, it's nothing
From the airport to the bay? I don't think it's that far
Config replacement would be the best thing to reduce targeting distance
across the bay, past pyrgros, by the mountain range
I've got a bit of a locality confusion. Anyone able to help?
Why does everyone have locality questions today
go figure :/
_obj = createVehicle ["Flag_UK_F",[790.990,12131.542], [], 0, "NONE"]; basically. I need to create this object on the server (obviously), but I need to reference it on each client to addaction etc.
@still forum because the answer wasn't broadcasted globally huehuehue
I was still typing.
Uh... Just.. set a variable and tell everyone?
global object? _obj
Why not just use _target special var in the condition
createVehicle is already global
my original script had everything in one file, with a if (!isServer) exitWith {}
@subtle ore but I need to reference it on each client to addaction etc.
private _flag = createVehicle ["Flag_UK_F", [790.990,12131.542], [], 0, "NONE"];
missionNamespace setVariable ["My_Flag", _flag, true];
🤔
Equiv of scummy
so you can do
private _flag = createVehicle ["Flag_UK_F", [790.990,12131.542]];
and not have an error !
also, fun fact, those 3 last params are optional now!
What?
I know commy. but who is that coimmy guy
HWAT?

Since when, alganthe? Same for CU and CVL?
OK, so if I have the onactivation of the trigger call this script first, then the other script it will work? 😃
Triggers, gross
no idea for the 2 others but it's fairly recent
Just don't use triggers
why would I not use one of the easiest things in the editor? Anyway.
I will try this and it will better work.
d_flag = createVehicle ["Flag_UK_F", position player];
oh, it's not on stable yet
If you want to use triggers you could also place a trigger over the location where you spawn it and then that trigger will fire for everyone and you will have the object in thisList
Tweaked: The 3rd, 4th, and 5th parameters in the createVehicle script command are now optional
december 19th
Only took them a decade.
@worldly locust Easiest doesn't mean best, don't go slacking on me here
Can I get the thing working first, then worry about making it rocket science?
Oh.. On the topic.. Slack is down
YES
Nice
RUN IN CIRCLES, ITS THE END OF TIME
inb4 first victim of Meltdown

it's up
Slack says
Massaging: Something's not quite right.
maybe just remove their ammo then 😄
they aren't OP
For my purposes they are lol
they aren't even remotely close to proper AA solutions
"For your purposes", go complain to the exile players. They'll chant with you
I know, real aircraft operate at atleast 1000m, i fly that way too, but in arma, aircraft fly at around 200ms
Not like we won't chant too
Maybe place a different aa.
so their easier to target because they enter the eclipse faster
that's what I was about to do
1000m? try 5km +
put down NATO AA vehicle and make it use cannons only without radar
200m? Amateur
Talking about the AI
it's not unusual for aircrafts to reach 32k feet, about 10km
hell, General Aviation aircrafts fly 6-18km higher than that
commy_fnc_fireMissile = {
if (!isNil "commy_missile") exitWith {};
params [
["_origin", objNull, [objNull, []], 3],
["_target", objNull, [objNull]]
];
private _type = "M_Titan_AA";
if (_origin isEqualType objNull) then {
private _size = sizeOf typeOf _origin;
_origin = eyePos _origin;
_origin = _origin vectorAdd ((_origin vectorFromTo getPosWorld _target) vectorMultiply _size);
};
commy_missile = _type createVehicle ASLToAGL _origin;
commy_target = _target;
private _fnc_guide = {
private _missile = commy_missile;
private _target = commy_target;
if (isNull _missile) exitWith {
removeMissionEventHandler ["EachFrame", _thisEventHandler];
commy_missile = nil;
};
private _vdir = getPosWorld _missile vectorFromTo getPosWorld _target;
private _vlat = vectorNormalized (_vdir vectorCrossProduct [0,0,1]);
private _vup = _vlat vectorCrossProduct _vdir;
private _speed = vectorMagnitude velocity _missile;
private _vel = _vdir vectorMultiply _speed;
_missile setVectorDirAndUp [_vdir, _vup];
_missile setVelocity _vel;
};
call _fnc_guide;
addMissionEventHandler ["EachFrame", _fnc_guide];
};
[player, heli1] call commy_fnc_fireMissile;
I also have this to kill an aircraft by scripted missile.
commie
😂
hm
vic switched to it's missiles even though i told it not too
this allowDamage false; this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}]; this forceWeaponFire ["autocannon_35mm", "FullAuto"]; this setVehicleRadar 2; this disableAI "MOVE";
Anyone got any ideas?
What do you think forceWeaponFire does?
Forces a vehicle to use the weapon I tell it too?
Yeah, but it can still switch back at any time.
oh
What's the classname of the turret?
"Muzzle"
I was about to say no idea
one sec
Yes commy which is still cosidered a muzzle.
No, a muzzle is something else in Arma scripting / config.
B_APC_Tracked_01_AA_F
this removeWeaponTurret ["missiles_titan", [0]];
This in init box.
would it conflict with the other script?
Because I have an infinite ammo script
in it
Well, remove that forceWeaponFire thing as it's useless.
Because I have an infinite ammo script
No.
Sure
okay question time form me yippie
*yippe
is there away to add a delay to the gbu? like idk a 5 sec delay after it hits the ground
Wat
Drop it from a greater height?!
Config and base class defines bombs and how they explode iirc
besides that
So it may not be possible
If i use the "Server Only" tickbox on a trigger, does that mean it automatically only runs the OnActivation on the server?
The whole trigger will exist only on the server.
@worldly locust Only evaluated on server, just like the tooltip says
only exist on the server, it's important to make the difference
So it's pointless having any thing in the sqf it calls that is meant to be client side.
OK.
slams hands on table, fine. Exists on server
does anyone know how arma populates the attached container for inventory?
which one?
Don't use triggers @worldly locust
Honestly idk if a server only trigger still exists as inert entity on the clients.
But it definitely does no checks and no activation etc.
Makes sense.
left container - main attached object such as weapon holder or vehicle etc https://i.imgur.com/c3EZxcA.png
Since we now have inAreaArray idk why anyone would use triggers. The only thing they have is the ui in 3den, and that is pretty clumsy.
in engine, like the entirety of the inventory screen
one with two ak
@subtle ore by all means point me in another direction but as I say, I'd rather just stick to basics and get it working
you can fuck around with the display but the filling is engine side.
Wait a sec, Andrew what's with the name "Silver" ?
man people need to chill with @ mentions 😄
it detects the closest ground container if that's what you were asking
@inner swallow
:thonk:
@worldly locust Make a script, basic execution local to player or execution on server.
Triggers are not the only way of executing at all
who said that O.o
@torn juniper 
are you fighting a strawman midnight?
I was trying to remove items from the LB on left side
Thanks for your concern

Thanks guys, it''s working
yea
basically "good luck" material :\
I only have one emoji left 💩 : (
@lone glade
@Midnight by all means point me in another direction but as I say, I'd rather just stick to basics and get it working
oh jesus
@little eagle 💩
💪 💩
✌ 💩 👌
💩 
NO BULLI
well
hiding it works kinda @lone glade except it breaks the inventory and everything unhides when switching filters
oh well
i tri
@peak plover 
"it works, except it doesn't"

yerp
I see you are putting nitro to good use
"you went full retard man, never go full retard"
Nitro is the best man, you know larger file size and uhhh emotes? Cool? Best 50 dollars spent
also, not using CBA / ACE is a crime punishable by frame drops
@lone glade Here, have a piece of cake 🍰 , i don't like dependencies and you shouldn't either.
So frame drops it is
It's apparently vanilla tasting cake
heretic detected
throws cookie at alganthe
fun fact:
CBA functions were added to A2
Fun fact: arma 3 had and has a different development plan
And uhh
KK had the most impact from community feedback
oukej best dev
And which ones are those?
Ill be missing KK much.
ah, yes, I too will be missing the debug console breaking and getting fixed each patch
💔
alganthe never makes mistakes.
I'm still having a bit of trouble.
I've got a trigger (yes, I know @subtle ore) with OnActivation [] execVM "sqfFile1"; [] execVM "sqfFile2"
sqfFile1 is server only via !isServer and creates the object as before with commy's variable bit _obj = createVehicle ["Flag_UK_F",[790.990,12131.542], [], 0, "NONE"]; missionNamespace setVariable ["Moray_Flag", _obj, true];
sqfFile2 calls the two clientside stuff ```if (isServer) exitWith {};
[Moray_Flag, "<t color='#009933'>Teleport to Base", "mkr_Teleport_Base"] call uk3cb_config_base_fnc_teleport;
_mkr = createMarker ["mkr_Teleport_Moray", [790.990,12131.542]];
_mkr setMarkerType "hd_flag";
_mkr setMarkerColor "colorBLUFOR";
[flg_Teleport_Base, "<t color='#009933'>Teleport to Moray", "mkr_Teleport_Moray"] call uk3cb_config_base_fnc_teleport;```
Both files are running as I get the second teleport action at base. But the one on Moray is not being created. I assume because the object isn't being passed correctly?
i'm not paid for them at least 😄
Well, I made some really hardcore stuff based on his script parts.
So you're salty?
Salt mines are the best man, loose all breathing air and dehydrate yourselt
I generate one salt mine, everytime i see HPP-based dialogs.
What
ctrlCreate dudes
class dialog {
name = "dialog";
idd = 84661;
movingEnable = false;
enableSimulation = true;
class controls {};
class controlsBackground {};
};
🤦
The only i use in configs
no, just pure stupid
plus it's not pixel perfect
and doesn't work on non 16:9 aspects
oh, let's not forget the use of comment instead of //
Does anyone know what display is the display that holds all the actions that are added with addAction?
I.e. what display IDD and what its called?
it's engine side simzor
@lone glade Tell me that next time you gonna compile your HPP by restarting the game/mission. Ok
and yes it's not pixel perfect considering it's not using pixel based values
@lone glade Ill be just pasting code to console
diag branch + reload config
private _pW = (pixelW * 5) * _scaleFactorCtrlW;
private _pH = (pixelH * 5) * _scaleFactorCtrlH;
Also, does anyone know what display 12 is?
Alright
@rotund cypress RscDisplayMainMap if to be correct
ctrlcreate to create the layout then transfer to dialogs.. win win
So I want to get all items from a crate and save them. Struggling right now with the correct way to save( of course I want to add them later with addCargo) . Problem is getWeaponCargo returns an array of array. How do I get that in something usable? ^^
started today with sqf, still rolling through the documentation ^^
Why is an array of arrays not usable?
_weaponCargo select 0 gives you a list of the weapons.
And _weaponCargo select 1 gives you a list of number of these weapons. In the same order as the weapon list
addWeaponCargoGlobal takes an array, so that means I have to split the information I got through getWeaponCargo
?
yeah
ah
addWeaponCargo takes the string from the first half of the getWeaponCargo and the number from the second half
kk ty, sqf scripting is weird
Kinda yeah. It's just not very consistent
Is it possible to add multiple weapons with one addWeaponCargo?
no
Welll....
If you do _box addWeaponCargo["laser_beam",1];
And switch the 1 to whatever. You'll get multiple
I don't think that's what he meant
Oh you mean like an array of weapons?
like getWeaponCargo
not really, I tried Box1 addWeaponCargoGlobal ["rhs_weap_ak104_npz","rhs_weap_m4_carryhandle_grip2",1,1];
nothing happened ^^
Incorrect syntax
where?
As I said not possible
and if you read the wiki page of that command you'll see that you can only pass one string and one number
mh, thought so
I searched through the functions and I can't find what function is attached to the Take UAV Controls action. I'd like to create an UAV and put the player into the driver controls right after it is spawned.
I wish we could set aiskill to be 1000% 😦
What?
there used to be the super AI config in A2 😛
super ai was just 100 on everything by default
So there is a command to get mags, weapons, backpacks.. Could be that I´m too stupid to find out, but how do I get vests from a crate? ^^
mh seems like vests are items
if its just for units and not vehicles / containers etc
https://community.bistudio.com/wiki/getUnitLoadout
https://community.bistudio.com/wiki/setUnitLoadout
you're looking for getItemCargo snackle
got that already its for containers
Can you get backpacks with items inside of it 'tho?
nah ....
nope did not work
yeah you can
for... reasons I guess?
@tough abyss how do I get vests from a crate? I think he wants crates and not units.
which is why I linked getItemCargo
holy fuck who made those commands
their return values are stupid AF
^
instead of [["classname", amount], ["classname", amount]] it's [["classname", "classname"], [amount, amount]
You REALLY think they cared about memory usage?
Maybe that intern that made these commands did
@snow raft you want getItemCargo & everyContainer
recommend you look at exile server code to figure out recreating the items.
Its abit of mind fck trying to recreate the items inside a container inside a container
I wish we could get getContainerContent and setContainerContent
or whatever they would call them
Well I doubt it's intern because it makes no sense. Only senior devs can provide stuff that makes no sense
Prove it
Started with sqf just today and I hoped there is something like this.. was disappointed ^^
@lone glade And what did KK do?
he gave us endl n stuff
What are tac-ops features?
Stuff like... eh... Things...
animated markers
Whoa gee
aka moving the markers, needing funcs with thousands of lines....
Why would you need thousands of lines to move a marker?
either i'm missing something crucial or it's the most overbuilt sqf funcs ever
@snow raft if your just starting i recommend you skip trying to save container contents inside another container & work on other things
yep im leaving that out for the moment ^^
nevermind, they aren't thousands of lines long anymore
Probably the editing functinality would take a bunch 'tho
[P1,ArsenalP1] call BIS_fnc_addRespawnPosition; with P1 being one player, is the respawn point which is created only accessible to that said player or his side? ^^
nice ty
i have a paper im writing and need to collect some data, if you guys here get a chance please answer these two questions https://goo.gl/forms/uUZGiXo3wzP5jGsx1 thanks in advance to those who answer
(sorry if this is the wrong section to post offtopic stuff but pretty much all of you readiing here are probably programmars 😛 )
How much do you sleep?
3-6 hours
3-6 hours here as well
Isn't the first question kinda superfluous then?
Too little homie
15 hours currently :3
15 HOURS? Yeah right Dedmen
@still forum well for here yes.
you'll die
Dedmen...
i posted it everywhere
8-13 hours here
your body can't sustain sleeping that much
8-13 Hours? WTF?
I'm ill sooo.. And if I can I also sleep that much
literally dead ^^
DEDMEN 😂
Though I don't sleep everyday
probably should also post that in general chat since they will be non-programmars
your body can't sustain sleeping that much```
Pff, you underestimate me
I want a universal markdown standard PLS
Dedmen with his dev drive broken catching up on all the sleep he's been missing on 😂
LEMME USE > TO QUOTE SHIT PLS
? ?
#offtopic_arma @lone glade
Hahaha fuynny guy
.Dschannifer Lawrence - Today at 12:37 AM
Since we got the Topic on another Server ( @Dwarden ) : Leave a vote there, to add native quoting.
https://feedback.discordapp.com/forums/326712-discord-dream-land/suggestions/15536655-quoting```
<https://feedback.discordapp.com/forums/326712-discord-dream-land/suggestions/15536655-quoting>
Hello. Is it a joke that quoting is unviable? It's 2018, dear developers; were you informed bout this?
LOL
Discord devs don't even know what year it is
Actually a joke
bulli
Wrong
"meme arrow" 🤦 
It's the meme arrow from 9gag

9gag, worse than lifers
My favourite forum
I knew it.
nothing is worse than lifers
9fag
tfw people don't know what > does in other markdown implementations
😭

^ that
You're just jealous nigel
>le 4chan meem arrows IKS DEDEDEDE
I guess linking to and quoting other posts on discrods would be nice 'tho. Linking an old text for a similar question woudl help a lot
🇾 🇪 🇸
eww
But hey... you can change the fkn Channeloverview to dark/different colors (ffs?)
Alright, final decisions here:
Gitlab,
or
Github?
For what
Arma 3 - Mission shiet
github
Probably lab 🤷
I don't see why you would lab
Some seriously productive feedback here guys
more secretive
I would use lab if I selfhost (Well actually I would use JIRA n stuff but.....)
But as you don't selfhost
Don't want people stealing your life mission
Hey Nigel, back off with that. You're the one with the lifer code not me
Alright, is JIRA any good then?
Didn't Github have a SizeLimit?
I don't see any reason why you would do that
So Gitlab > Github
github has size limit yeah
Self host as in?
Depends
Yes I do host it on my own server
If you run a Life-Mission, you might hit it 😂
@jade abyss 
Nope, never will.
ewww
Then why do you give me the friendly finger?
Gitlab has 10GB limit @jade abyss
Wut? Nah
I did help write SimZor write one line of code, but that was it. I guess I'm "affiliated" with a life server now.
The cloud hosted option does
I gave you the friendly finger for even thinking I would Dscha
We had wayyyy more than 10 GB Repos @still forum
If you want to host yourself.. The Github self hosted is not available for free right?
@jade abyss The free gitlab cloud host?
Yeah
I'm going to go ahead and use github for right now. I see nothing wrong with the toolset I have with it right now
News from 2015 😄
?


