#arma3_scripting
1 messages · Page 640 of 1
it isnt missing from that snippet. the error should show you where it thinks the issue is.
btw, diag_log already turns arrays into string
ahhh im bad with diag_log plz let me live xD
so
diag_log ["i","am","an","array"];
works fine
didnt know it till recently too
dedmen let his holy light shine into my skull
_please = (count (allPlayers - entities "HeadlessClient_F")
if (_please == 0) then {
["ALIVE_MIL_OPCOM"] call ALiVE_fnc_PauseModule;
} else {
["ALIVE_MIL_OPCOM"] call ALiVE_fnc_unPauseModule;
};
Thats the code that i have an im beinng told this. I think
2020/12/18, 15:52:27 Error position: <if (_please == 0) then {["ALIVE_MIL_OPCO>
2020/12/18, 15:52:27 Error Missing )
do

no semicolon after _please is defined
also a missing ) on the end of that line
this is why i am an idiot
you got the VSC extensions for SQF?
visual studio code has some very nice and helpful extensions for SQF
@robust hollow just to check _X is a short way to define a variable? ive been slightly off on that for a bit
_x is a magic variable in some loops
thank yo ironsight, i will go look into that now
oops
i was using X instead of "_car" "_bus" "_etc"
.
i know that _x is used for the current element in an array. that was one i did learn
_x is the element of for loops in arma
yeah ive read it a few times on the wiki when i get confused late at night haha
theres a bunch more of these magic variables
what are you working on rn?
btw did you get the alive collisions to fix?
kinda, supergaunlet did some class work and they now blow the fuck up wayyyyy less
ive been trying to get the auto pause to work with HCs as none of the code or code snippets i can find actually work
and this way i can intergrate it hopefully
(it is also the last stage in completeing my alive powered gamemode)
👍 sounds good
Hello everyone, does anyone know about text display?
For my mission I would like some text to appear in the center of the screen, and that one of the sentences goes to the line, but stick to the first
So far I can only go to the line, but always center on the screen, while I would like to shift it a notch to the left
Yes I saw this page, but I did not manage to reproduce what I expected
_please = (count (allPlayers - entities "HeadlessClient_F"));
if (_please == 0) then {
["ALIVE_MIL_OPCOM"] call ALiVE_fnc_PauseModule;
} else {
["ALIVE_MIL_OPCOM"] call ALiVE_fnc_unPauseModule;
};
is there something i need to be doing on lines 3 and 5 to call this function on the server? This is what im executing and im not getting either of these two functions to do its stuff
if it is executing in the onPlayerConnected event then it should already be on the server.
have you tried the _uid suggestion yet for the condition?
havent yet as i havent wrapped my head around that yet
ill go try that or attempt to now
private _isPlayer = _uid find "7" == 0;
What is this for?
_uid is an argument passed to the event. 7 is because steam uids always start with 7, and dedicated servers and headless clients dont start with 7. they also dont start with any number which is why parsenumber is an option.
i guessed it was to do with always starting with 7
while it isnt arma, why is every uid start with 7?
im just uploading a version using UID now. im lost as to why in my above code, why does it seem like the if statement isnt doing anything and is being skiped?
So, I really like this mod called Ravage, and me and some friends are going to make a ravage server, but if you run out of ammo mid fight and a zombie is after you, it really takes away from the game because in a real life situation you would try to fight it, but arma doesn’t have a melee system, so we got this mod that adds some melee weapons in the game, but I dunno how to add it into the game itself,
Is there a way to just add it to your inventory when u spawn
I have 0 scripting experience
i imagine the string used to calculate the steam64 id always starts with the same characters
if you put the logs back in those then and else code blocks do they show in the rpt?
im currently working out my error using the UID option
this has scrambled me haha
@robust hollow im trying this
if
(private _isPlayer = parseNumber _uid != 0)
then {
["ALIVE_MIL_OPCOM"] call ALiVE_fnc_unPauseModule;
};
...
private _isPlayer = parseNumber _uid != 0;
if _isPlayer then {...```
i feel your face is your icon atm
oh fuck sake
i get what you meant by it, i got so damn confused
i thought you meant use that to get the number of players (and yes i had the brackets around the UID part before but i just gave up after not having a clue where i was wrong)
ahh, no. if it returns true then you have at least one player in the game, which is what the threshold of the original count check was.
this channel is made for spamming, but sure
welp if its ok to do it im happy to
ill just post what i have as i think ive managed d to just confuse myself.
I have this being called in my initserver.sqf
_APcon = addMissionEventHandler ["PlayerConnected",{ _this execVM "Script\autopausecon.sqf" }];
I understand that calling a script from here may be bad practice (not sure if it breaks it) but im doing this because it makes editing the auto pause stuff easier.
in that .sqf file im doing this.
private _isPlayer = parseNumber _uid != 0;
if _isPlayer then {
["ALIVE_MIL_OPCOM"] call ALiVE_fnc_unPauseModule;
};
diag_log format ["autopausecon.sqf done"];
again i know that the diag_log is crap but it works.
have i got the wrong idea?
I think i have
you arent defining _uid
put params ["","_uid"]; on the first line
would an easier alternative for you be to use initPlayerServer.sqf instead?
probably wouldnt make much difference either way i guess. this just seems too simple to be having such a hard time with 🤷
at the end or beginning of that line? im assuming at the end? as it would first make it then define it?
thats what i thought
put it as the first line, move everything else below it
because ive managed to get it to fire the EH when players connect, and disconnect but i have only ever managed to get it to auto pause on disconnect
rgr
which is why im confused, i basically have very similar code for disconnect but it is just checking if it =0 and when it does it pauses like i want it to
but it wont work when i connect but if then run the same damn code in the debug and excute on only the server (which is the same as the way im making this EH, it only fires on the server) and when i do this it also works
i tried having the first clause as
if (players - HCs) != 0 then....
which also didnt work
yea thats because the connect event fires before you have a unit in the world.
the connect event fires the after you have selected a slot and you hit OK to go into the map loading screen from my testing (could be the same thing?)
and if what you are saying is true, it is what i had in mind originally and i got having a look around online. this is still what came up? I could just have an array that is added to everytime someone joins and everytime someone disconnects it removes one? or when someone crashes does it not go through a playerdisconnect EH?
AHHHH I GET WHY THE UID ONE WORKS IN EXCHANGE OF THIS
and it worked
now to make it work on disconnect, @robust hollow thank you so much for your patience and time! very much appericated
This is usefull to you? https://community.bistudio.com/wiki/setObjectScale
It's so "WTF".
"I will create a 10X housa!"
May be for rocks
Question about hashmaps: what happens if I do this?
_hm = createHashMap;
_key = [1,2,3];
_hm set [_key, _value]:
_key pushBack 1;
_hm get _key; //<- what does this return?!
is _value still retrievable?! in otherwords, when I change the array by reference, does the new element get hashed?
I'll test this in a few hours myself but wanted to see if anyone knew. (maybe Dedmen?)
returns nil
the key doesnt change, it doesnt seem to be an array reference to the original
ah, that's too bad. thanks for testing! 🙂
IIRC Dedmen said it hashes arrays element by element, so I was kinda expecting that.
yea. it makes sense, seeing as keys can only be "static" data types.
Uh you can set a whole array as the key?
yes, as long as it only contains the supported data types:
https://community.bistudio.com/wiki/HashMap#Key_Types
Code can be a key? Whats a use for that one?
Whatever you want it to be!
How can i make when a task is finished it adds something to ace arsenal
Alpha 1-1 two players,
instead of
moving second buddy to leader's vehicle,
how to rewrite this code to
"move leader of squad to second buddy's vehicle?"
_playerGrp = group player;
_groupLeader = leader _playerGrp;
_vehicle = vehicle _groupLeader;
player moveInGunner _vehicle;```
_playerGrp = group player;
_secondBuddy = select 1 in units player;
_vehicle = vehicle _secondBuddy;
player moveInGunner _vehicle;
something like this?
_secondBuddy = select 1 in units player;
_vehicle = vehicle _s>
15:17:46 Error position: <1 in units player;
_vehicle = vehicle _s>
15:17:46 Error Missing ;```
you should read the wiki if you dont know how a command works. no sense sticking commands together hoping for the best.
I’d use param instead of select, just incase there is only one unit in the group.
_secondBuddy = units player param [1,objNull];
_playerGrp = group player;
_secondBuddy = units player param [1,objNull];
_vehicle = vehicle _secondBuddy;
player moveInGunner _vehicle;```
Works flawlessly, thank you so much @robust hollow!
start of steamid64 is the universe, where there is only one public one.
Then there's the account type, which is probably also the same for most people.
Thus the start is basically always the asme
depends on who you mean by "you"
noone requested it, noones asked for it. I just thought it was funny and interesting so I made it a thing
array key is deep-copied on insertion
also array keys that you retrieve via keys or forEach, are read-only and will/should error when you try to write
Was https://community.bistudio.com/wiki/Arma_3_CfgRemoteExec created to prevent hacks ? Its it something I really want to use in Multiplayer to make sure someone doesn't use a forbidden script ?
i believe one objective of it was to be more secure than the old public variable eventhandler method of remote execution. in my experience i dont think it has prevented too many script based hacks but i certainly felt better for using it.
functions library is to prevent someone overwriting a public variable (aka function) with his own code i believe
it probably doesnt prevent code execution in the first place but can stop altering already running code
altering already running code
not possible via SQF at all
you can do thta without functions library too
if my function is a public variable, i can overwrite it and the next iteration will use the new code is what i meant with "altering running code"
it is to be used in a mission:
"I know my mission doesn't use this and that and only use this and that, therefore I forbid everything else to be used"
way safer, but can also break mod compatibility so to be used with caution.
Yes CfgRemoteExec was intended as a security measure.
Configuring who is allowed to use what, and blocking the rest.
So you can constrain it to a safe environment
unless you make your variable un-overwritable, which is what the functions library does and what you can do too
In my scripts, the only public variable I have are the Team Score, Time
not sure I really need any "protecting"
compileFinal protects a variable (code) deosn't it? (which is what I had in mind when I said that)
you can protect all variable types from overwriting on server, by using localNamespace for them to prevent publicVariable overwriting it, and CfgRemoteExec to make sure clients can only do on the server what you want them to do.
or you can use CfgDisabledCommands to block publicVariable command I guess
it sets it to read only yeah, it sets the variable that you assign it to to read-only.
I was hoping all variable types could be protested (as I asked before in a feature request)
it was attempted once. ended badly.
It was tried to do things like "server has the highest authority" even with read-only variables
and I don't want to try that stuff again. Even if you try, you'll have arrays and stuff that you can modify by reference which is hard to handle
Ah I think my new-ish idea was to allow setting variables read-only, but ONLY in localNamespace
Or only at game start maybe... but that can cause issues so maybe not
It was tried to do things like "server has the highest authority" even with read-only variables
I was hoping you could allow modifying with an alt syntax, likelock ["var", player]to only allow the variable to be modifiable on the system where the player is local (likeremoteExec). or maybe the other way around (lock ["var", player]locking the variable on this system only)
you'll have arrays and stuff that you can modify by reference which is hard to handle
yeah this is probably not optimal either.
What for tho
Tbh... Only functions really need to be read only, so other mods and scripters May not override your stuff
For values, either use macros or nothing
Tho I agree, having a way to define constant values on a language Level would be nice
Might add that to sqc one day 🤔
Hey, is there any way to play sound only inside vehicle or for crew only? say3d or playsound3d are not working
Point is, I want to play hit sound when tank is hit
you can use a command with local effect (e.g. playSound),
then remoteExec that only for the crew of the vehicle
say3D too is local
I don't know why you say it isn't working
_title = "<t color='#00ff00' size='2' shadow='1' shadowColor='#000000' align='center'>Kavala Secured</t>";
_text = "<br /><t color='#0000ff' size='1.4' shadow='1' shadowColor='#000000' align='center'>All enemy units in the area have been eliminated, good job. Await further orders from HQ</t>";
[parseText (_title + _text)] remoteExec ["hintSilent", 0, false];
``` Do _title and _text have to be global variables for this to work?
no
thanks
So Im working on a script to make a blackout on a certain area. Disabling all street lamps and the like is no issue as there are several different codes floating around.
The problem is that some buildings in the CUP mod have lights that are integrated into the building object itself. One can disable the lights on those by inducing damage to the building itself. If anyone here has ideas of a more elegant solution compared to damaging all buildings in the blackout area which might induce new problems please share.
Have you looked into the building config?
Perhaps the lamp has a hitpoint-thing that you can apply damage to directly
Hitpoints are indeed the most promising solution. Im currently working on a solution that gets all the hitpoints from the config, then filter those that have '#' (which seem to indicate light sources AFAIK). Then its just a matter of putting damage on those parts.
I'm trying to script a system where you can slingload anything. Basically what I want to do is use setMass to change the vehicle's mass only when it is attached to a sling rope. Then when it is detached it sets it back to the default mass for the vehicle. Anyone know a way to do this?
ooh yeah, a tricky one this
the original mass of the vehicle isn't stored in the config
so you have to a getMass on the vehicle
before you lift it
and remember that value so you can set it back after you un-sling it
Ah jeez this sounds difficult
Would that first solution by the other guy work?
I could make that into a function to call pretty easily
which post?
TBH, when Grumpy Old Man posts a solution, it's rare that it isn't the best solution
The one by Mr. H
apologies for the double negative 🙂
Yes, the guts of what needs to be done is in the post by Mr H, just as I described earlier
Oh I understand Grumpy's now
So you dont have to get the initial mass, just enter the slingloaded weight in the array
Ah yes, he's used a premade array
but the getmass command will give you the info
you just need to store that on a variable on the slingloaded objects before you change it's mass
He uses getMass
yes
The mass arrays are what it is changing to when it is slingloaded
its the only way afaik
Yeah that's not a problem
oh, is that what he doesn? I didnt look too closely
Yeah the comment says that the class name and the number next to it is what the mass is while slingloaded
ah right, uyes
dont forget each helicopter has it's own max payload
last time i looked, the Taru is the most powerful
Changing it to like 20 for each one will make it quite irrelevant lol
yeah, but if you make it too light, you can make it behave wierd
Would that really matter while sling loaded?
yes
heavy things are harder to lift
and lighter things tend to lurch aroundmore
are you doing this in multiplayer?
Yes
OK, here's a tip..
change the locality of the slung load to the same as the pilot of the lifting helicopter
you'll have much less glitching that way
_actionid = _plr addAction ["Spawn vehicle", "scripts\spawnvehicle.sqf"];
{
_playerGrp = group player;
_groupLeader = leader _playerGrp;
if (vehicle _groupLeader isKindOf "Air") then
{
_actionid1 = _plr addAction ["getAsGunner1", "scripts\getAsGunner1.sqf"];
};
};
{
_playerGrp = group player;
_secondBuddy = units player param [1,objNull];
if (vehicle _secondBuddy isKindOf "Air") then
{
_actionid2 = _plr addAction ["getAsGunner2", "scripts\getAsGunner2.sqf"];
};
};
{
if (vehicle player isKindOf "Air") then
{
_actionid3 = _plr addAction ["Change pylons","[player] spawn GOM_fnc_aircraftLoadout"];
};
};```
im totally newbie in codding, thats wrong here? Nothing in .rpt
only this work ```sqf
_actionid = _plr addAction ["Spawn vehicle", "scripts\spawnvehicle.sqf"];
=================
if (vehicle _groupLeader isKindOf "Air") then
{
_actionid1 = _plr addAction ["Зайти как стрелок к тиммейту 1", "scripts\getAsGunner1.sqf"];
};
_playerGrp = group player;
_secondBuddy = units player param [1,objNull];
if (vehicle _secondBuddy isKindOf "Air") then
{
_actionid2 = _plr addAction ["Зайти как стрелок к тиммейту 2", "scripts\getAsGunner2.sqf"];
};
if (vehicle player isKindOf "Air") then
{
_actionid3 = _plr addAction ["Изменить пилоны на авиации","[player] spawn GOM_fnc_aircraftLoadout"];
};
{ }; wrong placed, found
does anyone know a script/mods where i can choose a insignia with ace, but without an arsenal
You could set an empty arsenal, and only have the insignia's 🤔
Can I safely assume a vehicle that has been dead for some time has no crew?
But then i can choose every Insignia and not only some specific. I want something like a menu where i can choose only insignia from my own mod
For that you'll have to build something yourself, can't think of a mod which has that specific feature
any idea how i can do that with a module?
🤔 a module is just a script, nothing else
I am realy new to modding, this is why didn't knew that sry but thanks for your help
Opening vanilla Arsenal in missions doesn't allow for insignia selection anyways.
But ACE Arsenal does, and chances are high that it supports white- / blacklisting, so it might be worth to look into using the ACE Arsenal (or using their code if the license permits it).
ah it is nearestObject [Vulture21VHC, ("Helipad_base_F")]
reading the wiki a second time solved my problem
is there an effective way to check a given variable if it is an object, coordinates or a marker? Tried typeOf but that doesn't seem to work on markers.
I basically just need to know what if an object, a marker or some coordinates where passed through
@hollow lantern your question seems to show a lack of understanding of the fundamentals of scripting in this game, but nevertheless...
if its "coordinates", then it will be an array, if its a marker then it will be a string,
I know that coordinates will be a array lol. Yeah typeName was what I was looking for
maybe I phrased my question wrong, but thanks
hi drunk, I'm dad!
if you only want to know a type, use typeName
if you only want to know if typeA equals typeB, use isEqualType
if you want to restrict a function's argument type, use params
@finite sail not drunk enough :b
i know, got to work tomorrow, so am being sensible
@hollow lantern due to the Nature of those types, markers are strings (can probably be checked using eg. _val isEqualType "" && { getMarkerType _val != "" }), Positions are three scalars in an array (_val isEqualType [] && { { _x isEqualType 0 } count _val } and the only actual existing type of that list is object (_val isEqualType objNull)
for the position you could also do _arr isEqualTypeArray [0,0,0]
instead of the count
possibly instead of isequaltype too 🤔
Think the isEqualType still is required
Unless isEqualTypeArray also checks for array too 😂
Not sure tho
i imagine it starts by checking if it is an array at all, if not then false
ill check
yep, because it might throw an error as well
you're right, it errors. seems kinda weird to me because isEqualType is for comparing different data types, so i would have thought isEqualTypeArray would be an extension of that.
input must be an array, so it is understandable
should 1 isEqualTypeArray [0] return true or false?
i thought it would return false because 1 isnt an array, but no 😢
if i know the name of on object and have in it in string format. how can i delete that vehicle?
If you have named the object with a variable, you can use the following:
_string = "some_object";
_object = missionNamespace getVariable [_string, objNull];
deleteVehicle _object;
missing semicolon 😱
people should never C&P anyway 🤣
but fixed it
ok sick, thats what ive got and i think i know whats wrong
Hm, any ideas for a method to create a suppression system for the player? I think Laxemanns is good, just would prefer a different type of effect. How would I go about having a detection for impacts near the player(s) ? 🤔
there is a new EH landing in the next patch
Oh wow just what I was looking for I guess 😅 thanks,
note, it is dev branch only for now
_veh = [[getPosATL _namepos select 0 , getPosATL _namepos select 1 , _staticheight], _posdir, nameclass, sideEmpty] call bis_fnc_spawnvehicle;
_veh setVehicleVarName _staticname;
_staticname = _veh;
should this be?
_veh = [[getPosATL _namepos select 0 , getPosATL _namepos select 1 , _staticheight], _posdir, nameclass, sideEmpty] call bis_fnc_spawnvehicle;
(_veh select 0 ) setVehicleVarName _staticname;
_staticname = _veh;
what im trying to do is create a vehicle at the pos of a helipad and have it named so that i can delete it again, the next time the script is run.
i am struggling to get the vehicles to name proplery (i had it before and have fried myself on trying this)
and if i have it right in the last one, why is _veh an array and not an obj?
because that is how the function works: https://community.bistudio.com/wiki/BIS_fnc_spawnVehicle
and instead of accessing the name of the object, you can also use the object itself from _veh select 0 in other commands/functions to reference the vehicle
i understand why the select thing works!
thanks
is there anywhere that goes more into what objects are than this page?
An Object in the scripting language is a generic reference for a soldier, vehicle or building.
Can't think of a better description than that
i mean like for a soldier, what is stored? it is a very basic question (i think?(like i dont know if its a basic question)) and i havent really been able to find out
it's the object of the unit, which by itself doesn't contain anything, but can be used to reference all the attached data to that object.
thanks!
that makes alot of sense
i am trying this and the name of the created vehicle isnt test
_staticname = "test";
_veh = [[getPosATL _namepos select 0 , getPosATL _namepos select 1 , _staticheight], _posdir, nameclass, sideEmpty] call bis_fnc_spawnvehicle;
(_veh select 0) setVehicleVarName _staticname;
ooooooh wait
_staticname = "test";
_veh = [[getPosATL _namepos select 0 , getPosATL _namepos select 1 , _staticheight], _posdir, nameclass, sideEmpty] call bis_fnc_spawnvehicle;
_veh select 0 setVehicleVarName _staticname;
should it be that bottom one? i dont think so
check https://community.bistudio.com/wiki/setVehicleVarName
When a vehicle is created and named in the editor, the name becomes both the variable containing the vehicle object and the string representation of the vehicle object. vehicleVarName on the other hand is only string representation of the object. So if you want to refer to the actual object by its vehicleVarName, an extra step needed to assign the object to a variable of the same name. For example to see and refer to offroad as myFerrari:
_offroad setVehicleVarName "MyFerrari"; MyFerrari = _offroad;
yeah so i tried that before with
_veh = [[getPosATL _namepos select 0 , getPosATL _namepos select 1 , _staticheight], _posdir, nameclass, sideEmpty] call bis_fnc_spawnvehicle;
(_veh select 0) setVehicleVarName _staticname;
_staticname = (_veh select 0);
and it wasnt working
just… what do you want to do?
just define a global variable, or use format ["%1", _vehicle] or something?
because vehicleVarName is not a variable definition
private _spawnPos = getPosATL _namePos;
_spawnPos set [2, _staticHeight];
private _vehicleInformation = [_spawnPos, _posDir, nameclass, sideEmpty] call BIS_fnc_spawnVehicle;
private _vehicle = _vehicleInformation select 0;
MySuperVehicle = _vehicle;
_vehicle setVehicleVarName "someName";
MySuperVehicle setDamage 1; // will work
someName setDamage 1; // does not exist
im trying to create a turret when opfor walks into an area and delete and replace it with a blufor turret after they walkout of that area.
my current thinking, and it kinda worked but i need to make it more reliable, is to have trigger that fires a fnc that spawns a turret at all invisble helipads that a synced with the trigger. in that trigger i am passing a classname of the turret and
posary = synchronizedObjects ThisTrigger;
to the function.
in that function it deletes any current turrets THEN replaces them with ones named the same. this means i can just delete and replace it with a new turret named the same, ETC
i hope that makes some sense
@winter rose ignore the spawn vehicle and all its params. they work. i simply can not name it what i want/give it a reference that i want, then delete it later from that same name/reference
aaah, problem simplification, I like that
MySuperVehicle = _vehicle; // works
then deleteVehicle MySuperVehicle will work, and you can recreate another one with such name
that is with your code above or mine? im just checking so i dont confused myself
mine
your code```sqf
(_veh select 0) setVehicleVarName _staticname; // sets vehicle var name, does not declare a variable
_staticname = (_veh select 0); // assigns the object to _staticname
// solution with your code:
MySuperVehicle = _veh select 0;
is there a way for the respawn module to respawn a specific version of said vehicle? like a light grey version of the AC130
As posted before: https://www.reddit.com/r/arma/comments/692yms/scriptingquestion_vehicle_respawn_with_custom/
And since it's just the texture which needs to change, you probably just need to set that for the vehicle itself (see: https://forums.bohemia.net/forums/topic/171254-setting-vehicle-texture-with-vehicle-respawn-module/)
The thing already has preset textures tho...
to be fair, this reddit post does not answer anything, only redirects towards https://forums.bistudio.com/forums/topic/171254-setting-vehicle-texture-with-vehicle-respawn-module/ ^^
The post explains step by step how to customize vehicles in the respawn template, and has the link to do the same for textures.
Can't think of a better link/source than that 🤷♂️
To me it looks like setting custom textures, instead of changing preset textures like in the virtual garage either I'm dumb or I'm not getting it
thanks Lou, can you just confirm that i have this right, im fairly sure i understood everything just there
_namepos = posary select _c; // this is a loop, each element of posary is a helipad (object) and where _c is the counter
_staticname = [str _namepos,_c];
_staticname = _staticname joinString "_";
_posdir = direction _namepos;
_staticheight = getPosATL _namepos select 2;
_staticheight = _staticheight +0.4;
_veh = [[getPosATL _namepos select 0 , getPosATL _namepos select 1 , _staticheight], _posdir, nameclass, sideEmpty] call bis_fnc_spawnvehicle;
_tempveh = _veh select 0;
_tempveh setVehicleVarName _staticname;
pretending posary is a single helipad with the name of test.
this should produce a vehicle of "nameclass" type at the helipads location 0.4 m up with the name of test_0?
nope, im wrong
wait
mi think i have it
I recommend you name your variables for you to get what they are on the first look 🙂
see https://community.bistudio.com/wiki/Code_Best_Practices, it can really help 😉
yeah i really should, im not great at that
see thats the issue, for sure ill do this
private _unit = player;
but it doesnt say why this is worse;
_unit = player;
(i do know why for the most part, the whole keeping your variables seprate to others incase of naming schemes crossing over or if your change it in the wrong locality by accident)
if you call your code/function from another one, if this upper-scope code has a _unit variable, it will be overridden:
private _a = 0;
call { _a = 1 };
_a // 1
``````sqf
private _a = 0;
call { private _a = 1 };
_a // 0
that's the main, if not the only reason
yeah ok, i should rubber duck more. it just hurts my stupiditiy sometimes
i only need to define it as private once or until i want it as something other than private?
just checking
and thanks
use private on variable creation, once is enough yes 🙂
sick
you cannot private later without overriding:```sqf
_a = [5];
private _a; // throws error
private _a = [6]; // previous _a cannot be accessed, only this one now (if in the same scope)
https://community.bistudio.com/wiki/Variables#Local_Variables_Scope is another go-to ^^
yeah i think it was today that i was on tha toage haha
im confused, in your above code. what is MySuperVehicle?
a global variable
anything not starting with an underscore _ is a global variable
private _abc = player; // local
_abc = player; // local
abc = player; // global
setDir = player; // error, reserved keyword (setDir command)
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
THANK YOU
i was literally about to ask
ive been wondering for ages
it is explained here: https://community.bistudio.com/wiki/Variables#Scopes 😬
(and here, more precisely: https://community.bistudio.com/wiki/Identifier)
did you try?
i have definitely been looking for an explaintion but ive been learning alot and the way you said it just kinda made it make sense
well, glad I helped then 🙂
@winter rose I don't know how the rip the .paa file for the plane
no need to rip anything?
well, place a grey plane and use getObjectTextures on it? it should list them
Eden
good reflex! and good night
so this is now the sequel to my last question. Im now trying to delete the vehicle i created but it isnt the scope of the script im using. how do i get it into the scope. This is my current thinking
private _helipadinuse = posary select _c2; // gets the current helipad stored in posary that is in use
private _staticnametobe = [str _helipadinuse,_c2]; // makes an array of the name of the helipad that is inuse in string and of the current loop coutner
_staticnametobe = _staticnametobe joinString "_"; // joins the array into one string name
veh = missionNamespace getVariable [_staticnametobe,objnull]; // gets the object from the missionnamespace and returns it into the script as a global variable
deleteVehicle veh; // deletes the obj?
yes
veh could even be a local variable! (_veh)
private _staticNameToBe = format ["%1_%2", _helipadInUse, _c2];
```and don't forget to properly case your varnames 😉
(for readability!)
so
private _staticNameToBe = format ["%1_%2", _helipadInUse, _c2];
=
private _staticnametobe = [str _helipadinuse,_c2];
_staticnametobe = _staticnametobe joinString "_";
but better
yeah much easier i like that
and since you will not want MySuperVehicle as variable, you will need (on creation) to use```sqf
missionNamespace setVariable [_varName, _vehicle];
so this is my final creation script i think
private _helipadinuse = posary select _c;
private _staticNameToBe = format ["%1_%2", _helipadInUse, _c];
private _posdir = direction _helipadinuse;
private _staticspawnheight = getPosATL _helipadinuse select 2;
_staticspawnheight = _staticspawnheight +0.4;
_veh = [[getPosATL _helipadinuse select 0 , getPosATL _helipadinuse select 1 , _staticspawnheight], _posdir, nameclass, sideEmpty] call bis_fnc_spawnvehicle;
missionNamespace setVariable [_staticNameToBe, _veh];
staticnametobe = _veh select 0;
then i can delete that vehicle with
private _helipadinuse = posary select _c2;
private _staticNameToBe = format ["%1_%2", _helipadInUse, _c2];
veh = missionNamespace getVariable [_staticnametobe,objnull];
deleteVehicle veh;
I might soon be off for the nie though 😄 don't worry if I don't answer at one point, I might have passed out then 😸
for sure! i first tried this script about 5 months ago when i was starting to make a mission, now my mission is done im coming back to make it better
and thanks!
minus last line for the first script
and private _veh for the second script
does this only work once? i have both of these statements in foreach loops
nope i just had a counter in the wrong stop
thank you Lou!!!!
I'm having a bit of issue with making a hold action. I'm wanting the condition to be within 10m and having a NATO UAV Terminal I've got this
"(_this distance _target < 10) && ([_caller, "B_Uav_Terminal"] call BIS_fnc_hasItem)"
but it's returning an error about a missing square bracket. Any advice?
use single quotes inside the main string 'B_UAV_Terminal'
Hey i'm having trouble getting ppEffects to 'fade away' and return to normal screen. I can have the effect fade in with; ```sqf
PP_colorC ppEffectEnable true;
PP_colorC ppEffectAdjust [0.1,1,0,[0,0,0,0],[1,1,1,1],[0.33,0.33,0.33,0],[0.35,0.45,0,0,0,0,4]];
PP_colorC ppEffectCommit 0.50;
PP_dynamic = ppEffectCreate ["DynamicBlur",500];
PP_dynamic ppEffectEnable true;
PP_dynamic ppEffectAdjust [1];
PP_dynamic ppEffectCommit 0.50;
but I am struggling to get the effect to dissipate, in my head I would try using sleep but it won't work with this, so I tried; ```sqf
PP_dynamic ppEffectAdjust [0];
PP_dynamic ppEffectCommit 1; PP_dynamic ppEffectEnable false; PP_colorC ppEffectAdjust [1,1,0,[0,0,0,0],[1,1,1,1],[0.33,0.33,0.33,0],[0,0,0,0,0,0,4]];
PP_colorC ppEffectCommit 1; PP_colorC ppEffectEnable false; ppEffectDestroy PP_colorC; ppEffectDestroy PP_dynamic;
This turns the effect off + destroys it but doesn't 'take the time' to fade it out first, after it is destroyed it can be created by the first part again.
Didn't write their conditions for being fired but i'm not sure it matters? Although I am executing this in an eventhandler on a player. 2nd part not in main EH, just for experimenting.
why wont sleep work?
you need to delay ppEffectEnable false and ppEffectDestroy until after the effects have committed. a 1 second sleep would work, or in my test i used waituntil.
[] spawn {
PP_colorC ppEffectAdjust [1,1,0,[0,0,0,0],[1,1,1,1],[0.33,0.33,0.33,0],[0,0,0,0,0,0,4]];
PP_colorC ppEffectCommit 1;
PP_dynamic ppEffectAdjust [0];
PP_dynamic ppEffectCommit 1;
waitUntil {ppEffectCommitted PP_colorC && ppEffectCommitted PP_dynamic};
PP_colorC ppEffectEnable false;
PP_dynamic ppEffectEnable false;
ppEffectDestroy PP_colorC;
ppEffectDestroy PP_dynamic;
};
well at least I tried sleep and it wouldn't work, I can't remember why now, I've been awake for quite a while now 😅 I might have missed something
if it was a script error then its possible you were testing it in an unscheduled environment. there arent many scenarios where sleep doesnt work but that'll do it.
Yeah I was being stupid, still new to how scheduling works. Thanks 🙂
Hey, is it possible to convert a string of a function "my_fnc_hello" and then call that function?
What i mean is something in the lines of
_stringVar = "my_fnc_hello";
call _stringVar;
_stringVar = "my_fnc_hello";
_fnc = missionNamespace getVariable [_stringVar,{}];
call _fnc;```
Oh that works, never knew missionNamespace could be used for that. Many thanks Connor
missionNamespace is where functions/variables are usually saved as it is where most scripts run by default. so that snippet is the same as calling the fnc directly:
call my_fnc_hello```
Ah cool, I'll keep that in mind
@still forum sorry, i was just curious to know what people will make with that, i will try to add setObjectScale to my construction system, at least for walls. boundingBoxReal also get updated? Thanks for your answer.
you know, you can also try and see for yourself 👀
Hmm, I need to figure out a way for a trigger to activate as soon as its activation condition returns true, but only deactivate once its activation condition has returned false for 10 seconds
Im trying to have a trigger start spawning units as soon as it detects a player inside, but only start deleting units once no player has been detected for 10 seconds or so
I have a function written for the evaluation condition, so I guess I just need to wrap it in another condition to handle the timing
as soon as its activation condition returns true
not possible with triggers. there's always some delay
only deactivate once its activation condition has returned false for 10 seconds
very easy. use setVariable
start deleting units once no player has been detected for 10 seconds or so
not possible with triggers
unless the code is scheduled and runs separately
example:
activation code:
[thisTrigger] spawn {
params ["_trigger"];
while {triggerActivated _trigger} do {
..//spawn AI
};
sleep 10;
if (!triggerActivated _trigger) then {//delete AI
}
};
or you could do the sleep 10 and the rest in onDeactivation code, but this way is better
found a cba function that should work CBA_fnc_waitUntilAndExecute
should be able to use that to return true once the function evaluating activation returns true, and return false a set period of time after the activation function returns false
right now I just have the trigger calling the activation evaluation function as its activation condition, in this particular mission its every three seconds
it won't return anything for you
yeah I realized that
and the only difference between that and spawn is that it's unscheduled
which could be bad, depending on how CPU intensive your code is
the upside is it won't be affected by scheduler load
It seems this script uses waitUntil to suspend the script until the trigger is activated, then it runs the code to spawn everything, sets a private variable to true and uses a while loop to constantly check if the trigger is deactivated while the variable is true
and then once the trigger has been deactivated it runs the code to delete everything
runs in a scheduled environment
And once the trigger is deactivated, pretty much schedules the script again and returns to the waituntil
no it doesn't
if you mean CBA_fnc_waitUntilAndExecute
Sorry I meant this script that is handling the creation of the triggers and spawning/despawning AI
which script?!
Right now its a variation of the Enemy Occupation System
Which is a collection of scripts that handles AI spawning based on markers you place in the editor
Basically it executes a core script on every marker from a list, and this core script sets up a couple different triggers on these markers and creates units when they are activated, based on a couple different parameters that are passed to it when it first initializes and from previous trigger deactivations
So every trigger has its own scheduled script running that handles the unit creation when it activates and unit deletion when it deactivates
What needs to be updated about bounding box? If you mean if it also scales. Dunno didn't try.
any option to mute chat for unconscious players?
surprised that it is not by default
nvm solved lmao
thank you. I was starting to do loop with checking player status and enableChannel
@winter rose i tried to getobjecttextures command and it kept getting me errors
how did you try?
use the debug console
and see the doc
https://community.bistudio.com/wiki/getObjectTextures
uhhhhhhhh so if i go into the virtual garage i get this for the vehicle
[
_veh,
["LightGrey",1],
true
] call BIS_fnc_initVehicle;```
the get object texture just doesnt wanna work
are you sure that texture source even exists?
it works when i use the debug console in the actual game and not eden
i dont think it has a .paa texture
Hey guys! I’m looking for a script or something in arma 3 that lets me hide the hull of a vehicle. For example hiding the hull of a tank while keeping the turret visible for if I wanted too make an in ground turret as an example
if your tank has hidden selections for both the turret and the hull, you might be able to usesetObjectTexture command.
otherwise there's no way to do it via scripts (so you'd have to make a new vehicle, which needs modding)
A bit of an example as to what I mean is. I was thinking of using the m7a2 Bradley from the cup vehicles mod. Hiding the hull of that vehicle and attaching it too a ugv using both zues and eden
check if the vehicle supports retexturing: getObjectTextures
if it does, use a hidden texture (e.g. #(rgba,8,8,3)color(0,0,0,0)). otherwise, mod it, as I mentioned before
Alright. Thank you very much mate!
I’m brand new too scripting in arma 3 so far and it seems that the options that scripting has for making new vehicles (compositions) and interesting things is quite large
It's very unlikely that you'd be able to do it with scripting.
Also I've never worked with compositions, but afaik you can't make dynamic entities with it.
You can do a lot with scripted compositions, but you can't modify models on the fly and merge them together...
is there a more efficient way to get all items in a vehicle's inventory than
private _items = getItemCargo _box;
private _magazines = getMagazineCargo _box;
private _weapons = getWeaponCargo _box;
private _backpacks = getBackpackCargo _box;
?
no
does allowing -filePatching allow you to overwrite core BIS functions?
don't crosspost 👀 #rules (I deleted your message in #general_chat_arma)
ty
was going to go back and delete that one cuz it's not really relevant to there
ill be faster abt the delete next time
ctrlSetText str _killsInfantry + -(_killsInfantry);
is that correct code to count teamkills as a kill?
ohh abs
_ctrlKillsInfantry ctrlSetText str _killsInfantry + abs(_killsInfantry);
Hello. I'm trying to make a unit "flicker" by using hideObject and sleep while also repeating at random intervals.
ok... i'll assume you are having some trouble with it, here is an example of that in action:
[] spawn {
private _duration = time + 5;
while {time < _duration} do {
unit hideObject !isObjectHidden unit;
sleep random 0.25 + 0.1;
};
unit hideObject false;
};
Hm, is it posible to use a script to delete one of the vanilla tripwire mines, after it get triggered, but before it explodes?
deleteVehicle?
but how would I trigger it?
maybe check mine's damage… or animation?
true, I'll have to play around a bit and watch what it does when it gets triggered
No. You need to do more. I think cfgFunctions allowFunctionRecompile=1 or smth like that
Oof..
I think trigger=explo? No?
@still forum ok! I read online that editing system BIS functions isn't possible anymore, is that true?
I wouldnt be surprised if it getting triggered jut setDamage = 1'd it, but I havent looked at how it works
and as a followup, would editing BIS_fnc_spawn change how every spawn keyword call works?
It should afaik not be possible. It has code to protect it against that, but I found out they just don't work a while ago
No. Script functions have no relations to script commands
gotcha. I looked at the functions page and 'spawn' showed up and I thought it was the same. I assume there's no way to override script commands short of modifying the executable?
or like, working at bohemia? 😛
Intercept can do it. But you need a certificate from Intercept makers to enable that "feature"
ah. Which means I'd have to get in contact with bohemia to get a cert?
It's blocked off because security and humans safety
yeah it makes total sense why
oh ok. So if I talk to the intercept guys, I could build an addon that, say, modifies how spawn works to run scripts in a thread pool?
Yeees.... But Arma would crash as scripts cannot run multithreaded
like, there's too much communication between scripts or?
Not really. Complicated stuffz
If you know c++, you can maybe roll your own solution though.
You cannot run scripts in parallel, but maybe you can rewrite your script in c++, and that code can run in seperaten thread then
oh, this is why the concept of a headless client even exists isn't it
because the easiest way to run multiple scripts at the same time is to just run multiple copies of the game
I guess so yeah.
Mainly it was built for AI I think, not scripts. But it does the same for scripts too
yeah, I was looking at the docs for HCs and there's nothing saying you can't run scripts on HCs
Yeah you can do that. Big scripted servers like Life stuff do that
If you know c++, you can maybe roll your own solution though.
so I take that Dedmen doesn't know C++ 😬 😁
I wonder what kind of perf++ could be expected if multithreading were applied to Arma
I mean, using moar cores etc
from what I can tell (obv. not an expert and don't work at bohemia so haven't seen the actual code) the performance issues in A3 generally are 1. scripts 2. AI 3. object count in that order
About 10-15% for average script load (CBA+ace)
Scripts is a relatively small part of frametime
FSM?
If you look at the whole picture.
wasn't AI a big part of it?
interesting. Maybe I'm going down the wrong rabbithole, I should probably take a look at that frametime capture stuff in the debug build and see what's actually killing my frames in my missions
Yeah.
Yes do that!
that's why HCs make such a huge difference for server performance right
bc they help offload AI from the main thread
so FSM does not run in scheduler, but if I understood it well, they are always on the same core? why not more?
There are some pretty bad bugs I've seen lately. AI units out of map, physx blobs at 0,0,0 coords are the most common big time issues I encounter
FSM runs in scheduler too
Well, right next to the scheduler, they are handled in the same place
You cannot run anything script on more than one thread, because they all use some shared stuff
iirc the script parts of FSM run in the scheduler right?
but the decision logic runs separately? is that correct?
The scheduler has 3 seperate parts.
SQS, SQF, FSM
argh - the root cause of the issue I suppose!
It also depends on what specific FSM.
They can function differently depending on where they are used
execFSM runs in scheduler
Actually multithreaded script should be possible on Linux, but I never actually tried it out
@winter rose yeah that makes sense honestly, lots of engines as old as RV have the problem of being written in a time when multicore processors just didn't exist at the consumer level
And it's on my list to fix the reason for that, as it hurts performance on linux
"You can not modify this object's position as it is currently being used in another script"
so they made a lot of decisions that assumed one core and now that a 4 core CPU is the minimum standard for gaming it's a problem
but this could… bring a 400% perf gain?
lmao
lemme dream
what are the other funnels?
And I still have 5-10% stuff laying around for next year
20% is still a lot
yyyes, I am not refusing that for sure! 😄
@still forum ok now here's a real crazy person idea: what if you made an addon that spawned HCs and then overrode spawn to remoteExec stuff on them, round-robin?
I mean this is ofc assuming that scripts are actually the problem and not something in the graphics/rendering pipeline or AI or something but
You cannot in general override spawn
Locality is a thing, and you need to have some things run locally
oh true!
yeah short of figuring out every change that some script makes and then also doing those side effects locally that's not gonna work
You can create a new command with intercept.
And name it spawnAnywhere and let it be handled by a remoteExec to a random HC
right
Intercept let's you create your own script commands. And call your own c++ code directly from SQF and the other way around.
yeah I looked at their repo briefly, it's super cool
The new Hashmap stuff I just did. I already built years ago in Intercept as a experiment
nice
See Intercept_CBA as example.
I think the Hashmap code is also there
@winter rose I figured out why none of the stuff worked, USAF does something every different for textures and it's weird
ah well, yeps
[(_this # 0),["Base_Black",1],true] call BIS_fnc_initVehicle;
^ that was my final product
Ooh I have an idea, just emulate the mine by having a simple object tripwire mine and a trigger that activates when the mine exists and a person enters the area
then on activation I can delete the mine and do my own stuff
You can configure trigger check interval, might want to turn that lower to have it check not often for small trigger area
@still forum how do the numbers on the profiler mean? Like it'll say something like gsEva (6.178ms : 2.473 ms)
what are those two numbers?
Trying to get Virtual Garage to work on a dedicated server so the player can spawn in a Vehicle without having to place them in the Editor or Via Zeus, Problem i'm having with the code provided on BI Wiki is only allowing the client to see the Vehicle & not the other players in the server!
Dose anyone have a line of code that works?
it looks like itl take more than a line. the virtual garage isnt designed for mp use. the easiest way is probably to use the garageClosed scripted event handler to recreate the selected vehicle.
I think one is time since start of frame, other is self-time
yeah that makes sense
it's going from frame time 1.973ms for an fsACh call to 77.946ms for an evGet call
thats really odd, there's just nothing in between - does that mean it's stuff that's happening in the main call?
Sure you don't see the in-between stuffym
?
Look in the graph on top of the UI and just click on the things, and find the thing in-between.. except if there is an empty gap :u
Yeah I have tried a few scripts using creating .sqf files in the mission file and still haven't been able to get anything to work properly
Howdy folks....
I found this piece of code that checks if there's a LOS with the informer...
if ( [player, "VIEW"] checkVisibility [eyepos player, eyepos informer] > 0) then {
hint "bla-bla-bla";
}```
wich works. What I'm trying to do is this.
1)-An undercover player is following the *informer* but has to keep a line of sight on it.It can lose it for no less than 10 seconds, or mission will fail.
2)-The *informer* will get in a vehicle and drive away; the player has to use a drone to follow the dude to a house. Once there, a Task will be complete, but I want it to be fulfilled ONLY if the drone camera has LOS with the house/informer/anyobject.
How to do that?
You can assume drone pos == camera pos
When the play... Mh
Yes you want to use a different check while the player is in drone view and check from drone to target
But, that might not take camera direction and FOV into account correctly?
Ive try to play around with "CameraOn" but I got lost...
The idea is that if the drone camera is looking a certain object, it fire a script..
from there I'll take care of the task state and other things..
Does camera on return the drone? Never tried that
it should yes
If you want to check where the camera is looking you could try
cursorObject
screenToWorld [0.5, 0.5]
getCameraViewDirection (gets the direction vector)
If cursorObject works, that's probably the easiest.
If cursorObject == house
If you want to check if object is on camera screen.
worldToScreen
Will return something special if object is off screen I think.
Should save you complex maths with direction and FOV
Or rather let's it do the math for you
if (_newVeh isKindOf "Plane") then {
_newVeh setDamage 0;
} else {
_newVeh setDamage 0.7;
};
Where the hell ; missing here?
I like that!!lol
Why u so anti-car oof
i want tanks to explode, not their crew ejecting
I don't see missing semicol.
Maybe above or below the code you posted?
Missing semicolon can also be a typo in a script command name
isNil {
private _newVeh = createVehicle [_type, [0,0,0], [], 0, _respMode];
if (_newVeh isKindOf "Plane") then {
_newVeh setDamage 0;
} else {
_newVeh setDamage 0.7;
};
_newVeh allowDamage false;
private _autonomous = (getText (configFile >> 'cfgVehicles' >> typeOf _destroyed >> 'vehicleClass') == 'Autonomous');
if (!((_pos nearEntities [['landVehicle','air','CAManBase','ReammoBox_F'],(0 boundingBoxReal _newVeh) #2 /2]) isEqualTo []) && !surfaceIsWater _pos) then {
_pos = [_pos,0,100,(0 boundingBoxReal _newVeh) #2,1,0,0,[],[_pos,_pos]] call BIS_fnc_findSafePos;
_pos set [2,0.1];
};
_newVeh setDir _dir;
_newVeh setPosASL _pos;
_newVeh lock (locked _destroyed);
if !(_varName isEqualTo '') then {
[_newVeh,_varname] remoteExec ['setVehicleVarName',0,true];
missionNameSpace setVariable [_varName, _newVeh, true];
};
[_newVeh,_destroyed] call MGI_fnc_setVehicleLoadout;
...
if i just leave _newVeh setDamage 0.7; all works
but my a-10 and su-25 insta eject
heli's fine tho
could you PN me the whole file @quasi sedge
Awesome, the drone part is done with the "if cursorObject == house"...
How I resolve the "follow the informer" part?
most important is the "fail mission" if player lose LOS for more than 10 sec..
Follow informer is maybe doable with worldToScreen
worldToScreen eyePos informer
Check what it returns when you look at him, vs when you look away
This code working
isNil {
private _newVeh = createVehicle [_type, [0,0,0], [], 0, _respMode];
_newVeh setDamage 0.7;
_newVeh allowDamage false;
private _autonomous = (getText (configFile >> 'cfgVehicles' >> typeOf _destroyed >> 'vehicleClass') == 'Autonomous');
This don't
isNil {
private _newVeh = createVehicle [_type, [0,0,0], [], 0, _respMode];
if (_newVeh isKindOf "Plane") then {
_newVeh setDamage 0;
} else {
_newVeh setDamage 0.7;
};
_newVeh allowDamage false;
private _autonomous = (getText (configFile >> 'cfgVehicles' >> typeOf _destroyed >> 'vehicleClass') == 'Autonomous');
I paste this code to trigger "On activation" BTW
it returns a pos
[0.534007,-3.70759]
this isnt perfect but it is a start to what you need. run it somewhere in a player's init.
[missionNamespace,"garageClosed",{
private _localVehicle = bis_fnc_garage_center;
if (netid _localVehicle != "0:0") exitwith {};
private _class = typeOf _localVehicle;
private _position = getPos _localVehicle;
private _vector = [vectorDir _localVehicle,vectorUp _localVehicle];
private _customization = [_localVehicle] call BIS_fnc_getVehicleCustomization;
deleteVehicle _localVehicle;
private _globalVehicle = createVehicle [_class,_position,[],0,"CAN_COLLIDE"];
_globalVehicle setVectorDirAndUp _vector;
[_globalVehicle,_customization#0,_customization#1] call BIS_fnc_initVehicle;
bis_fnc_garage_center = _globalVehicle;
}] call BIS_fnc_addScriptedEventHandler;
It needs to be between 0-1 otherwise off screen
I'm pointing the cursor right at him but I get a pos no matter what..
Thank you anyway..it seam more complex than I thought....don't even know if is worthed..
And Is late at night here..so I better come back at this with a fresh brain tomorrow..lol
yeah looks like ive got a big performance issue with my custom HUD but I have no idea how to make it run well
something about preloading rsc but I genuinely don't understand the way controls/displays work in arma at all
dwbi, was just going to ask if anyone had an example mission with a custom HUD that was easy to understand
peace out dedmen!
If you use configs, they are already loaded and only need scripts to display.
If the HUD is fully scripted the problem is most likely in the scripts themselves, and for that it would help to see what you're trying to do
ctrl is made this way
private _ctrl = findDisplay 46 ctrlCreate ["RscStructuredText", -1];
_ctrl ctrlSetPosition [0.103165 * safezoneW + safezoneX, 0.007996 * safezoneH + safezoneY, 0.778208 * safezoneW, 0.0660106 * safezoneH];
_ctrl ctrlSetBackgroundColor [0, 0, 0, 0];
_ctrl ctrlCommit 0;
_ctrl ctrlSetStructuredText parseText "";```
which is passed in along with player to this script: ```SQF
if (!hasInterface) exitWith {};
private ["_textX","_display","_setText"];
disableSerialization;
_player = _this select 0;
_ctrl = _this select 1;
while {alive _player} do {
private _text = format [
"<t align='center' valign='middle' size='1' shadow='2'>" + "VISIBILITY: %1 | UNDERCOVER: %2</t>",
_player getUnitTrait "camouflageCoef",
captive _player
];
_ctrl ctrlSetStructuredText parseText format ["%1", _text];
sleep 1;
};
_ctrl ctrlSetStructuredText parseText "";
ctrlDelete _ctrl;```
(there's a bunch of unused variables and such, need to go through and clean it up once I get it actually working)
aside from format ["%1", _text] which is completely pointless, that doesnt look heavy at all.
what makes you think it is a ui issue?
yeah it needs a lot of cleanup
honestly I'm not sure, but just going off the profiler that's what it seemed to be
let me do some cleanup and test it again on my server
In the above code I also don't see anything which could cause issues.
Of course, looping code every second can cause issues when it's a lot or written badly, but that doesn't seem to be the case.
maybe try dedmen's arma script profiler (if it works on 2.00?). ive found it very helpful to determine which specific scripts and commands are going slow.
thats what im doing yeah
gsEva; 0.74347; 76.42487;"["onUnload",_this,"RscDisplayMPInterrupt"
this has to be a bug in timing right? because if you do 1/0.074 that would imply the game is running at 13.5 FPS
does that code cause the vehicle able to been seen and used by anyone in the server? i dont know much about coding
yes. the virtual garage spawns vehicles locally (only exists for you) but that code takes the vehicle info when you exit the garage and recreates it as a global vehicle (exists for everyone)
like i say, it isnt perfect, but it might be enough for what you need it to do.
so i need that to every character i want to be able to spawn a vehicle
yea, but you should only need to put it in one place. initPlayerLocal.sqf for example.
@robust hollow oh ive never seen this one before thanks!
Hey guys! I got to find a safe position, which works fine with this:
_safePos = [_obj, 0, getpos _obj select 2, 7, 0, 20, 0] call BIS_fnc_findSafePos;
My only problem: The found safe position is often near the sore. (Position is searched from 150m above water). Is there a way to have the safe position a minDist away from the shore line?
if hardcoding is an option then you can add the shore line area as a blacklisted position
blacklistPos argument
What is hardcoding? But I will have a look. Thank you.
writing something into the script that is only good for a specific use case, in this case, coordinates.
or... one of the other types that argument accepts.
Ah, thank you for clarification
Ok so I use the classic onPlayerKilled.sqfSQF player setVariable ["Saved_Loadout",getUnitLoadout player];
And onPlayRespawn.sqfSQF player setUnitLoadout (player getVariable ["Saved_Loadout",[]]);
And for some strange reason the players respawn will all their gear BUT the rifle. Any ideas? We're using RHS weapons, and the players can respawn in a vehicle or back at base and have the same issue
players drop their gun when they die.
That's what I thought but I've never had an issue with it before this mission. Would it be the ACE ragdolling?
does anyone know if it's possible to launch the utils dialog without the utils command? Like is there a function or something?
yes
gimme a sec leopard
[] execVM 'A3\Functions_F\Debug\Utilities\utility_moonPhases.sqf'
[] execVM 'A3\Functions_F\Debug\Utilities\utility_jukebox.sqf'
[] execVM 'A3\Functions_F\Debug\Utilities\utility_printConfig.sqf'
[] execVM 'A3\Functions_F\Debug\Utilities\utility_cfgDisabledCommands.sqf'
[] execVM 'A3\Functions_F\Debug\Utilities\utility_scriptCommands.sqf'
thanks! 🙂
yw
btw, if I want to launch the main utils window, which file do I execute?
is it index.sqf?
or header.sqf
good question-
Let me check
a3\missions_f_oldman\systems\scripts\utility.sqf
this should work 🙂
oh wait no
I think it's index.sqf
hi everyone. I need advice...again.
In a mission, I want a speaker with an addaction to play a sound. I used this command
speaker2 addAction [ "Play message", {
speaker2 say3D ["hades", 50, 1];
} ];
problem is that every single player had to activate the addaction. Which command I use so that if one player activate the addaction, every player hears the sound...thanks for help.
I figured out that I need to execute the addaction in mp to every client. I just need help how I type the command in the init of the speaker, the sound source. In the inet I found this command:
Say3dMP = { _speaker = _this select 0; _sound = _this select 1; //if (isDedicated) exitWith {}; //if ((player distance _speaker) > 100) exitWith {}; //you probably don't need this, not sure _speaker say3d _sound; };
Do I just write this in the init? Or do I need to change some words? The distance in meter for example...
remoteExec the command
speaker2 addAction [ "Play message", {
params ["_speaker"];
[_speaker, ["hades", 50, 1]] remoteExec ["say3D"]
} ];
Does anyone know how to open the function viewer?! (function / script name)
nvm, found it
BIS_fnc_help
@little raptor Tanks. I will try it
My profiler doesn't give you these numbers, so don't think you're using mine.
If it doesn't work in 2.00, there is a new DLL in the discord for it. It's probably linked on the steam page?
Is it possible to store, lets say NVGs in an array, and then delete one of them? tried that one so far:
private _removableStuffArray = ["rhs_1PN138", "rhsusf_ANPVS_14", "rhsusf_ANPVS_15"];
_items = items player;
while{true}do{
if ("_removableStuffArray" in _items) then {player unlinkItem "_removableStuffArray";};
};

hears whip getting slacked in the distance
Do you want all items in inventory? Or is item in NVG slot enough?
I want to remove NVGs, Radios and GPS
the script should check if the player has one of those items and then removes it if its true
Doesn't answer my question.
Do you need to check in-inventory ones too? In addition to the one in the specific slots for them
I think in slot should be enough, the peeps arent that smart^^
{
If (_x in _removableStuff) then {
Unlinkitem
}
}
forEach assignedItems player;
And add a sleep to your while loop.
However much you can tolerate
Yea, wanted to do that as a last step. For testing I like it to hard-loop
_x represents the selected item from an array, right? So it doesnt need to be modified
It just keeps dropping me _x is an undefined variable
post your code
private _removableStuff = ["rhs_1PN138", "rhsusf_ANPVS_14", "rhsusf_ANPVS_15"];
while{true}do{
If (_x in _removableStuff) then {
Unlinkitem
}forEach assignedItems player;
};
I feel like someone`s gonna kill me for that code xD
private _removableStuff = ["rhs_1PN138", "rhsusf_ANPVS_14", "rhsusf_ANPVS_15"];
while {true} do {
{
If (_x in _removableStuff) then {
player unlinkItem _x
};
}forEach assignedItems player;
sleep 0.1;
};
Ah ok, so the if line itself has to be in curly brackets too
sleep 0.1 at least
I know, dont worry bout the sleep^^
the issue is something unlinkItem _x
and a missing } as well
let's indent what you sent```sqf
while { true } do
{
if (_x in _removableStuff) then
{
unlinkitem
} forEach assignedItems player;
};
aah, I see
forEach takes a {}, not an if () then {}
so with the {} around the code before the forEach I declare that the forEach takes that part of the code
it would work, if you returned a code inside the if
…thanks, but not useful here to explain code flow and scopes 😄
yeah. not useful for beginners
it says "run this code for each element of the array. element is _x"
Okay
Is there an OOP tutorial on the Wiki or somewhere on the web? Cause I couldnt find any up-to-date ones
aint OOP just Object Oriented Programming? So not code binded?
Woops, blind me -_-
don't use that.
SQF is not OOP, the above is an abominable attempt to make it so - do not, I repeat do NOT engage the target with that
ah, alright
What am I doing wrong here? (I'll shorten it all for ease, there are no undefined variables, just the LB doesn't get populated:
_VTT_Basic_Settings_Display = findDisplay VTT_Basic_Settings; //#defined as the IDD of the display
_ctrl_Players_Side_Combo = _VTT_Basic_Settings_Display displayCtrl 2100;
{ _ctrl_Players_Side_Combo lbAdd str _x } forEach _sides; //doesn't do this, no error.
```I am in the middle of switching from createDialog to createDisplay so perhaps my display just cant be found?
I personally don't see any problems with getting the control, but I am most likely missing something
#define VTT_Basic_Settings 348567
yeah saw that
Thats the problem right?
no
if isNull _VTT_Basic_Settings_Display exitWith ?
did you try a systemChat or something to make sure it exists?
grrrr 👀
No error msg
if (isNull _VTT_Basic_Settings_Display) exitWith {systemChat "can't find display."};
_ctrl_Players_Side_Combo ?
check all of them:
systemChat str [_VTT_Basic_Settings_Display , _ctrl_Players_Side_Combo ,_sides]
Also second thought, could I just assign the variable on the first line here:
findDisplay 313 createDisplay "VKN_Template_Tool_Basic_Settings";
_VTT_Basic_Settings_Display = findDisplay VTT_Basic_Settings;
im doing the same thing on the second line right
check your variables to see if you are using values or ghosts yeah 😄
I got the bunch of numbers [int, int, [sides]]
Int is just a bunch of unrelated numbers.
but nothing is empty
so they exist
scr shot??
what does this give you?
systemChat str findDisplay 0;
display 0 as intended
oh I think I got it
your IDD is probably too big
try a smaller number
maybe that's the issue
no, I've tried up to 5 digits. not sure about the rest
👍
_VTT_Basic_Settings_Display = findDisplay 313 createDisplay "VKN_Template_Tool_Basic_Settings";
it returns the display. you don't have to "find" it
Yeha I thought so
Returns the same
those weird numbers
with the switch as well
But this time
the lb gets populated
Im so confused 
_VTT_Basic_Settings_Display = findDisplay 313 createDisplay "VKN_Template_Tool_Basic_Settings";
if (isNull _VTT_Basic_Settings_Display) exitWith {systemChat "can't find display."};
_sides = [West, East, Independent];
_ctrl_Players_Side_Combo = _VTT_Basic_Settings_Display displayCtrl 2100;
{ _ctrl_Players_Side_Combo lbAdd str _x } forEach _sides;
and changed IDDs yes
so it was likely they're too long then
well if you did both there's no way to tell
_VTT_Basic_Settings_Display = findDisplay 313 createDisplay "VKN_Template_Tool_Basic_Settings";
this just returns the display. even if the IDD was really big it wouldn't matter
My guess is the idd because there was never than a msg to say it wasn't found (line 2 above)
but thanks bud didn't know there was a cap
there's no cap (at least not that small), it just gets rounded due to floating point accuracy
Oh right
6 I think
@still forum I will check out your profiler and report back if I still get performance issues, thanks so much for your help!
I have been scripting for almost 15 years now in OFP/Arma and somehow this simple thing I have never ran into:
INIT.SQF
if (!DC3_arived) then { {_x moveInCargo DC3} foreach (units playergroup);};
INITSERVER.SQF
DC3_arived = false; publicVariable "DC3_arived";
Why do the units from playergroup not move in the cargo of DC3 on a dedicated server?
works in SP (but that doesnt say much)
init.sqf runs once, perhaps clients that haven't connected yet dont get applied it?
maybe try in the initPlayerLocal.sqf
init.sqf runs for every client/server
oh... well you learn soemthing new everyday
mission event scripts are boring anyway, addons are where the fun is at
😄
how dare you disrespect them, and in the #arma3_scripting temple!!

oh no
you will be now cursed with a Curious addRating -(rating Curious + 10000) è_é
Runs to #arma3_config
haha but now i got your attention, I need help... 😄
_side = toUpper (_ctrl_Players_Side_Combo lbText lbCurSel _ctrl_Players_Side_Combo); I need the text from an lb, but the line doesn't work, I tested its output and it gives the control., but using the same line above to compare with "" works just fine:
waitUntil { _ctrl_Players_Side_Combo lbText lbCurSel _ctrl_Players_Side_Combo != "" }; //this gives me something
_side = toUpper (_ctrl_Players_Side_Combo lbText lbCurSel _ctrl_Players_Side_Combo); //this gives me the control id: control #2100
private "_text"; // one of the rare cases a private string is good
waitUntil {
private _cursorIndex = lbCurSel _ctrl_Players_Side_Combo;
_text = _ctrl_Players_Side_Combo lbText _cursorIndex;
_text != ""
};
private _side = toUpper _text; // toUpperANSI?
you can, but it's cleaner and more readable this way
lbText returns String, so I don't see how you get a control
I did symcht str _ctrl_Players_Side_Combo lbText lbCurSel _ctrl_Players_Side_Combo short cuz lazy
my guess is that it only did the variable
yeah well, use ()
otherwise it does```sqf
systemChat (str _ctrl_Players_Side_Combo) lbText lbCurSel _ctrl_Players_Side_Combo
Yeah that'll explain why
hence why temp vars can help in a debug situation 😛
Think you've told me that before, it'll get hammered in eventually 😄
https://community.bistudio.com/wiki/Code_Best_Practices again 🔨 and again 🔨 and again! 🔨

I need to start using private more i've noticed.
😄
Should I be using it more in a scope inwards rather than the outermost scope?
exam 4
_myvar = 123;
systemChat str [_myvar]; // [123]
call {
systemChat str [_myvar]; // [123]
private "_myvar";
systemChat str [_myvar]; // [any]
_myvar = 345;
systemChat str [_myvar]; // [345]
};
systemChat str [_myvar];
Like so?
I got it from the wiki
I have been scripting for almost 15 years now in OFP/Arma and somehow this simple thing I have never ran into:
INIT.SQF
if (!DC3_arived) then { {_x moveInCargo DC3} foreach (units playergroup);};
INITSERVER.SQF
DC3_arived = false; publicVariable "DC3_arived";
Crie you're gonna get told not to copy/paste so quickly
and to wait
😄 if someone knows they'll help
ok.I had the idea I was stepped on
Well its open to all 
playergroup is defined in the init of all units of the playergroup
plagersgroup = group this
DC3 is de name of the aircraft
why didn't you put it in the init of the group?
good point.
since I never did that I think
also, for safety, do this instead:
if !(missionNamespace getVariable ["DC3_arived", false]) then {
allright ill try
I meant the variable name of the group.
not its init
also, no need to publicVar DC3_arived in the server init (or even define it)
only publicVar it when you change it to true
or use setVariable with public flag
ok
Yeah I never did that. Because that wasnt possible in the old days
Or atleast not that I know of
@umbral nimbus also, moveIn... commands take local arguments
you can't use forEach units playergroup
unless the other units are AI
ah damn 😆 thats where I made the mistake
hmm...
now to rethink how Im going to do this
start in the dc3 instead
force eject and setpos
what?!
since the arguments must be local
…you can drag and drop units in the vehicle
also, since 15 years, commands have been added: remoteExec for example
yeah but how is remoteExec going to help
in any case the player or the DC3 is not local
I believe only the unit must be local
not the vehicle
I want the playergroup to start in the DC3. Unless Dc3_arived is 'TRUE'
are there respawns?
why not just put them all in it, then move them out if true?!
thats what I just said
I mean put them in your plane in the editor
you mean this? #arma3_scripting message
yes and then force eject them and setpos if dc3_,arived is false
ok, so do that
yes. and JIP
so "everyone should spawn in the vehicle as long as it flies", ok
right
initPlayerLocal.sqf
if !(missionNamespace getVariable ["DC3_arived", false]) then
{
player moveInCargo DC3;
};
```that's it
(PS: arrived)
yeah. other than missionNamespace I tried that
(yes also initplayerlocal)
so Ill try it this way
my bet is that DC3_arived = false; publicVariable "DC3_arived"; ran after client init
serverinit goes before playerinit
BUT
init.sqf goes before init.sqf
and
ik init.sqs goes before ik init.sqf
init.sqf goes before init.sqf
it's the other way around, actually 😬
…you wrote sqf twice
He's just trolling you
but see https://community.bistudio.com/wiki/Initialization_Order for info
Just in SP
then it is written, init.sqs before init.sqf
ah yeah ok
I edited the page so it does not say "all" but "Multiplayer" where needed
Anyone happen to know if its possible anymore to only run ACE3 advanced ballistics on specific weapons?
seems like ace_advanced_ballistics_simulateForSnipers used to be a setting but not anymore
I would like to have it for snipers only, not so much every cannon round from an A-10
it isnt as far as I know
the weapon should be configured for it
weapon/ammo
I've got an other one.
Anyone had some clever workarounds to use UnitCapture on a car? So you can see the wheels rolling and such.
@little raptor one quick question. With remoteexec, will the sound not be played twice? From the server AND the clients???
depends on the command
say3D has local effect
so no
@little raptor Check. Thanks
I need some help with event handlers in RscInGameUI functions, I have a custom one based on RscWeaponZeroing and it has an onLoad event handler, is that event handler supposed to only fire the first time that UI is created and never again, even if gets removed and created again?
I think the infantry ui doesn't dissappear like that no
It's been years since I touched that though
I'm adding some event handlers when a certain weapon's RscWeaponZeroing is loaded, but I can't figure out a way to remove those EHs
if I add an EH that removes them when the weapon is dropped, the onLoad doesn't seem to always get called when I pick the weapon back up
if I make them get removed by onUnload, it doesn't always seem to trigger
so then if I pick up the gun again it adds them again
I don't understand when the onLoad and onUnload events actually trigger
It's funky for rscingameui
_actionid3 = _plr addAction ["Change aircraft loadout",{"[_plr] spawn
GOM_fnc_aircraftLoadout;_plr removeAction 0;"}];
_actionid3 = _plr addAction ["Change aircraft loadout","[player] spawn
GOM_fnc_aircraftLoadout"];
i give up
_actionid3 = _plr addAction ["Change aircraft loadout",{[_plr] spawn
GOM_fnc_aircraftLoadout;_plr removeAction 0;}];
string to a script file path, or code which is what you have ^
though keep in mind _plr is not defined inside the action
i think it is called _target inside
yea. check the script argument
https://community.bistudio.com/wiki/addAction
nah, i just give up and put removeAllActions player; in GOM_fnc_aircraftLoadout
thanks, Connor!
_plr addAction ["Change aircraft loadout",
{
params ["_target", "", "_actionId"];
_target removeAction _actionId;
[_target] spawn GOM_fnc_aircraftLoadout;
}];
Is it possible to check if a file exists in the Arma 3 root folder with https://community.bistudio.com/wiki/fileExists ?
-filePatching is the solution
fileExists behaves same as loadFile
And #if __has_include works same as #include minus the error
ok, so I wait for #if __has_include
hey guys, getting an error saying there is an undefined variable, however it still picks up this variable and it works. The variable is defined in my config.cpp so I'm guessing the function isn't seeing it straight away. Is this something to avoid in the future?
//Displays IDD define in config
#define VTT_Basic_Settings 348567
//then in my function
findDisplay VTT_Basic_Settings displayAddEventHandler [
undefined variable VTT_Basic_Settings
Should note I have already changed to a variable that gets the display in a script form, but would like some information on what I was doing before.
however it still picks up this variable and it works
🤔 sounds unlikely.
scripts dont see macros defined in the config.cpp.
if you define the macro in a separate defines file you can include that in the config and script, that way both get to use it
Oh I see, wasn't aware of that. Do you have a quick example of doing so?
of including a file?
no no like you said define it in a separate file, is it just a case of including in both config and the function?
yea
In terms of resources what sort of savings would agents provide over regular AI?
they don't use visibility ray casts, so a lot if there are lot of targets in the area
but naturally, they're dumb
yeah, I am considering them for civilian ambiance so really they just need to react to getting shot at most of the time
I guess they can't be suppressed either, so that has a small performance gain too
they don't afaik,
also, they can't take cover like the vanilla AI
I wonder if I could just script them all to run inside the nearest building as soon as someone fires in their vicinity
there are a couple of stuff you might be able to use, like firedNear EH and suppressed EH (not in stable branch yet)
because really they just need to stand around and look pretty until battle starts, then they just need to leave or hide somewhere
and I guess if they do happen to get hit with a weapon they need to fall over
how to check
if gunner turret is empty then
_vehicle addMagazineTurret ["rhs_mag_M829A3",[0]];
Such code obv not working
if [] == (_vehicle magazinesTurret [0]);
_vehicle addMagazineTurret ["rhs_mag_M829A3",[0]];
isEqualTo
I'm confused. Are you referring to the gunner (unit)? Or do you mean the turret itself? (because what you do and what you ask are two completely different things)
abrams turret
if gunner turret is empty
if the turret has no more magazines (could be understood as "no gunner in it")
while {true} do
{
_vehicle = vehicle player;
if [] isEqualTo (_vehicle magazinesTurret [0]) then
_vehicle addMagazineTurret ["mkk_1Rnd_105mm_HEAT_MP_T_Green",[0]]; //M60A3
};
105mm gun is empty, this turret have m240 with ammo
i guess i need to check if _vehicle magazinesTurret not contain mkk_1Rnd_105mm_HEAT_MP_T_Green then
_vehicle addMagazineTurret ["mkk_1Rnd_105mm_HEAT_MP_T_Green",[0]];
if !("mkk_125mm_SABOT_MAG" in (_vehicle magazinesTurret [0])) then
{_vehicle addMagazineTurret ["mkk_125mm_SABOT_MAG",[0]];};
is that correct?
When setting text with ctrlSetText in a ctrlEdit class, adding a line break is the same as structured text right?
It doesnt work...the if statement works but the command doesnt
however the moveInCargo DOES work in the Debug console, executed Local
is DC3 declared in the object itself, or by script later?
in the object itself
oh - also, for JIP, waitUntil not isNull player
yeah ok. but this is even without JIP
just starting the mission
(on a dedicated server)
brb afk
back
front
😝
whats the typo here? .rpt is empty
_BotsRespawn = execVM "scripts\BotsRespawn.sqf";
if (isServer) then {
sleep 5;
while{true} do
{
if ((count allPlayers) > 15) then
{
{
{if ((side (effectiveCommander _x) == independent) && (!isPlayer effectiveCommander _x)) then {deleteVehicle _x}} forEach vehicles;
{if ((side _x == independent) && (!isPlayer _x)) then {deleteVehicle _x}} forEach allUnits;
};
terminate _BotsRespawn;
hint "Bots are deleted!";
};
};
};
and no sleep...
and if this script isn't spawned it will return an error regarding the sleep
yeah, found error, it was caused by extra { };
That's correct in terms of performance?
_BotsRespawn = execVM "scripts\BotsRespawn.sqf";
BotsOnServer = true;
if (isServer) then {
while{BotsOnServer} do
{
sleep 5;
if ((count allPlayers) > 0) then
{
{if ((side (effectiveCommander _x) == independent) && (!isPlayer effectiveCommander _x)) then {deleteVehicle _x}} forEach vehicles;
{if ((side _x == independent) && (!isPlayer _x)) then {deleteVehicle _x}} forEach allUnits;
{if ((side (effectiveCommander _x) == west) && (!isPlayer effectiveCommander _x)) then {deleteVehicle _x}} forEach vehicles;
{if ((side _x == west) && (!isPlayer _x)) then {deleteVehicle _x}} forEach allUnits;
terminate _BotsRespawn;
hint "Боты убраны";
BotsOnServer = false;
};
};
};
no
you have duplicate forEach loops that iterate thru the same array
merge both forEach loops for allUnits and allVehicles
also, I recommend that you put this script in the "Botsrespawn.sqf" file too
no need to create a separate thread for this
hello! maybe someone can answer me my quesiton here:
we use Exile, and as you may know, the vanilla Arma 3 HUD ist disabled in favor of Exile's HUD. sadly nobody there could tell me, how to re-enable the vanilla HUD, thats why I'm here 🙂
I don't know how Exile removes the HUD.
If it's done via scripting, then use: https://community.bistudio.com/wiki/showHUD
if it's done via config, you'll have to use a mod and "unpatch" the config
well, then its done via config, because I already tried showHUD
so ask in #arma3_config
So im running the arma 3 profiling build but diag_captureFrame 1; does not seem to work?
Just trying to capture the first frame after execution
I can vaguely remember there is a command or script that forces a server to load a certain mission from a running mission.
What I want to achive technically is like traveling from Stratis to Altis, in a somewhat fluent way. (preferably with a text overlay saying "2 hours later")
In MP on a Dedi

