#arma3_scripting
1 messages · Page 625 of 1
doesn’t mean anything it is a preset that is not applied
Is it not applied via the server.cfg?
yeah, show your cfgmissions
// MISSIONS CYCLE (see below)
class Missions {
class ins {
template="AltIns_39.Altis";
//template="TakIns_1L.takistan";
//template="AltIns_39.Altis";
//template="Coin.Takistan";
//template="LivIns_1.Enoch";
difficulty="Custom";
};
};
forcedDifficulty = "Custom"; ```
Also no mods used 😛
strange is this in 2.00?
Yeah
dedicated served?
Yezzir
1 sec, thought of something that could make me retarded.
also hint str missionDifficulty;
I may or may not have been editing the wrong profile on the server.
Gonna triple check lol
... yes. I am an idiot. Disregard.
Edited the wrong arma3profile

I may or may not have been editing the wrong profile on the server.
@violet gull Welcome to the club 👍
Hello, where are global variables placed? In missionNameSpace or CurrentNameSpace?
Thx
Debug tool in eden editor.
Test script in debug tool in editor or launch game then use debug tool is there any difference?
Depends on what you're testing
If what you're testing involves some of the mission entities, most of the time the script won't work (because they're not initialized yet)
In general, testing during the mission is better
Thank you that explains it
storing UI variables
As well as not being overwritten by publicVariable
A script that hides a vehicle..... BUT... Still allows it to be functional. Like a jet. Help....
There is a pilot camera on some plains. There is a flight horizon indicator at the lower left. Anyone ever tried to catch it with a script ?
@austere nimbus disables the vehicle, becomes unusable.
I don't know what you're trying to say
what? shouldn't iirc
yea me neither
@sudden yacht maybe try https://community.bistudio.com/wiki/setObjectTexture with an empty string?
That is temporary disabled, will be fixed soon tho
@tough abyss cannot be overwritten from elsewhere with publicVariable.
That is temporary disabled, will be fixed soon tho
That's the global version.
maybe try https://community.bistudio.com/wiki/setObjectTexture with an empty string?
It can't fully hide the vehicle (in most cases)
what? shouldn't iirc
HideObject disables the object's "world simulations". It will not move anymore
A script that hides a vehicle..... BUT... Still allows it to be functional. Like a jet. Help....
Your best bet is to remake the object and remove all of its textures.
It's a namespace, so yes
with everything that any other namespace can be used with
well besides publicVar and setVariable with public flag 🙃
Hi guys, I just don't know what to do.
I want to check if a position of an object is in an array which is defined in a config and retrieved with getArray.
My problem:
(getPos cursorObject) in getArray(missionConfigFile >> 'CfgPos' >> 'blacklistedPos')
-> false
getPos cursorObject
-> [15422.5,21984.7,-1.2359]
getArray(missionConfigFile >> 'CfgPos' >> 'blacklistedPos')
-> [[3263.08,12440,-0.907945],[8364.61,10745.3,0.159745],[15422.5,21984.7,-1.2359],[19399.7,14311.5,0.202263]]
[15422.5,21984.7,-1.2359] in [[3263.08,12440,-0.907945],[8364.61,10745.3,0.159745],[15422.5,21984.7,-1.2359],[19399.7,14311.5,0.202263]]
-> true
What can I do to fix this?
why do you define the positions in the config?
Because it's easier to edit and keep it up-to-date in multiple places.
(getPos cursorObject) in [[3263.08,12440,-0.907945],[8364.61,10745.3,0.159745],[15422.5,21984.7,-1.2359],[19399.7,14311.5,0.202263]]
-> false
There is no change to the getArray
Because it's easier to edit and keep it up-to-date in multiple places.
It is not.
Positions are floats. The chance that all 3 variables match is small
And I think you simply copied the results from the debug console
That's why they don't match (floating point accuracy)
But how can I fix it?
You can't. Positions are floats. You can't simply copy them to a new text file.
There is a slower way, if you want
I could check if the house is near the positions in the array
yeah, that's the slower way
Could toFixed help for those positions?
there's a very small chance it could. toFixed 20 maybe
@dim owl I hope you mean findIf
Hi :)
Is it possible to "lock" a listbox ? So the user can't make a new selection?
disable it maybe?
Will try ty 🙂
So using ctrlEnable on a listbox make every items of the listbox disappears
Does anyone now how I can get the contents of supply boxes like e.g. Basic Ammo [NATO] (Box_NATO_Ammo_F)?
I tried getItemCargo _box but the result was just [[],[]] even though the box was full...
Never mind, the answer is getMagazineCargo, getWeaponCargo etc.
Anyone know of a quick and easy way to return the player objects in a revive scenario? I have tried implementing the scripted event handler from this page (https://forums.bohemia.net/forums/topic/182228-scripted-event-handler-for-entering-and-exiting-incap-state/) to no effect. Specifically, I'm looking to return the object of the player who completed the revive on another player, but I cannot find it for the life of me.
I have been looking everywhere for an answer for this, but how do I get an array of items/magazines in a players vest. The goal is to have a script where the script will get the array of all equipment, then delete the old vest on the guy and give him a new vest with all his items in it still.
vestItems is the command you're looking for: ```sqf
_contents = vestItems player;
removeVest player;
player addVest "some_vest_class";
player addItemToVest _contents;
^
@wise frigate
getUnitLoadout ?
And vestitems will take even magazines and weapons that are inside the vest?
according to the wiki (https://community.bistudio.com/wiki/vestItems)
Get array with all items (of any kind, even weapons) from vest.
@compact maple You can use onLBSelChanged EH and prevent the change
Anyone had issues with bis_fnc_spawngroup? As my group is using the following to spawn AI in a mission and they are just frozen and won't move. groupsquad2 = [getmarkerpos "spawn_3", east, ["uns_men_nva_65_nco","uns_men_nva_65_rto","uns_men_nva_65_med","uns_men_nva_65_rf2","uns_men_nva_65_tri","uns_men_nva_65_mgs"]] call bis_fnc_spawngroup; wp = groupsquad2 addwaypoint [getmarkerpos "wpa_1",1]; wp setwaypointtype "sad"; wp setwaypointspeed "full"; I will add its on a Linux server.
Hi. I'm looking to expand my current loadout system to include steam IDs. At the moment, players load in with a specific uniform for their slot, go to the loadout box and select whichever one. That changes vest, helmet etc adds stuff to them but doesn't touch the uniform. I would like them to select a loadout that checks their steamID and if it's one that is listed, it gives them a specific uniform. If their steamID is not listed it gives them a default one.
Would someone be able to work with me on it?
if (getPlayerUID player in _permittedUIDs) then {/*special*/} else {/*default*/};
Could you simplify that for me?
Does that roughly translate to
if (gets the players UID and if it's in a different script/defined space of steam IDS) then (switch uniform to _____) if not (switch to ____)
Could you give me an example of the skeleton of it
So that I can expand with more steamids
like how that would be laid out
yea, one sec
is it just one uniform for specific ids or you have multiple uniforms for different groups of ids?
Long story short, we've got a lot of personalized uniforms - milsim unit stuff 70 people. When they load for example a rifleman kit from the box, I'd like to it detect their steamID and just switch their uniform to their personal one
@smoky raptor works perfect in vanilla, as:
groupsquad2 = [getPosATL player, west, ["B_Soldier_F", "B_Soldier_F", "B_Soldier_F", "B_Soldier_F"]] call BIS_fnc_spawnGroup;
wp = groupsquad2 addwaypoint [player modelToWorld [0, 50, 0],0];
wp setwaypointtype "sad";
wp setwaypointspeed "full";```
(also, private variables!!1! (_group, _waypoint))
So essentially connor I'd like a line that goes in with the script(s) that change the loadout to run a script that gets their steam ID and changes it to the uniform that matches their ID
you might prefer to do something like this then
switch (getPlayerUID player) do {
case "UID1":{/*special*/};
case "UID2":{/*special*/};
case "UID3";
case "UID4":{/*special*/};
default {/*default uniform*/};
};
it will let you define the default uniform and a specific uniform for each individual uid, and you can have multiple uids sharing the same loadout (if desired, for example UID3 will use UID4's loadout)
I have some scripts that work but to me they seem overcomplicated. Uses stuff from Squad XML etc
so script 1 would be ___?
that would contain for example
switch (getPlayerUID player) do {
case "UID1":{Uniform classname};
default {Uniform classname};
};
What would need to be added to the script that changes loadout to check the ID and assign uniform?
depends how you're defining the uniform to begin with. you can use the switch to define all uid-specific items at once, or use it to return individual classes like
private _uniform = switch (getPlayerUID player) do {
case "UID1":{"class_a"};
case "UID2":{"class_b"};
case "UID3";
case "UID4":{"class_c"};
default {"class_d"};
};
I'll hop on arma in a few minutes and start putting some stuff in and testing
What do yu mean by defining the uniform to begin with and switch to define all UIDs at once / individually
like if you define the default loadout fully to start with and then adjust specific items as needed or if you define each item in the loadout one by one.
either way is fine it just changes what you would do in the switch. to start with just give that a go and see if it works for you.
What would work best? 60 people turn up, 35 of those have their IDs listed for their custom uniform. They choose all scramble to box to grab kits and select different ones. Rifleman, NCO etc etc. For each individual person, I'd like it to check them and add their uniform.
i personally would list entire loadouts in the switch so you are copying uids less, but that may not work for you. it can be done however you want.
The best method is using an array
_UIDs= [UID1, UID2, ...];
_codes = [_code1, _code2, ...];
call (_codes#(_UIDs find getPlayerUID player))
*PS. we use a database to handle personal loadouts, but it should apply to non-DB solutions as well*
You could simply make a config or script with an array containing the UID and the uniforms/loadout for that UID.
And each time someone uses the arsenal, a container, or even dead body, simply check if the UID exists, if the current uniform is accepted, and if not change it.
In our case we load a full loadout on the player, but have a limited arsenal so people can modify it (which only contains stuff they may use)
call (_codes#(_UIDs find getPlayerUID player))
you'd need to check if the uid is in _uids first, otherwise zero divisor error.
@robust hollow or just:
_codes = [_default, _code1, _code2, ...];
call (_codes#((_UIDs find getPlayerUID player)+1))
that works too 👍
readability, peeps!!1! 😡 😄
Is the games scripting actually native C code or just something C-Like?
it is its own thing called SQF @bitter anchor
@winter rose Performance beats readability any time!
performance is less important in scripts that are not frequently repeating though. Is why I went for the switch instead.
yeah if it happens once when player respawns then you totally don't need to care if it takes 100us or 200us to run it. So I'd prefer something which is readable to something which gives 50% performance gain.
you'd need to check if the uid is in _uids first, otherwise zero divisor error.
or useparam. Depends if you need default value or what.
It is still perfectly readable. Just add comments! 🙄
[
{//case1
},
{//case2
}
]
looks like switch to me! 🤷
yea, many different ways it can be done. just depends how experienced you are with sqf i guess.
yea but for someone who doesnt understand sqf it may not be so obvious is all im saying
I dunno, IMO switch is a control structure, and what you have is an array trying to be a control structure 🤷 but really both are style preferences
I would map it on a "namespace" 😛
and what you have is an array trying to be a control structure
except it is a few times faster if there is a lot of cases
I would map it on a "namespace" 😛
yeah that's best solution in arma world I guess
except it is a few times faster if there is a lot of code
well as I said if it runs once per lifetime or so then either are fine IMO
can't wait for the hashmaps.
promised? no. there's a chance.
using objects/locations for hashmaps has garbage collection issues.
how will it look? _map = createHashmap ? And it will be cleared up when not referenced any more?
idk, however dedmen will make it if ever.
@winter rose one of the reasons I ask is I was wondering if it supported enums
nope, doesn't
Your best replacement for enums are either #define or strings
I think that defines are better
you will have to include some file where they are defined which helps to organize things
if you make a typo it will make the code fail because the game will treat it as nil (no value) and make an error
I don't have a need of one, was just looking at the switch statement and thinking usually I'd use a enum (or define) for case values
Also one reason why it can't have proper enums, is because SQF is a dynamic-type language
Is there a way to prevent solo player from entering the server when it's empty and voting itself admin in MP environment?
how will it look?
_map = createHashmap? And it will be cleared up when not referenced any more?
@astral dawn
https://github.com/dedmen/Intercept_CBA/blob/master/src/SQFExtension/HashMap.cpp#L188
@quasi rover disable voting?
I don't know if there is a "min voters number" option.
therefore, #server_admins I believe
@astral dawn
https://github.com/dedmen/Intercept_CBA/blob/master/src/SQFExtension/HashMap.cpp#L188
Looks cool
Hi, is there a way to randomly pick a class from a config ?
tought of BIS_fnc_selectRandom but it takes an array
get the class list and use selectRandom on it
And don't use BIS_fnc_selectRandom anymore!
^ ☝️ 
tought of BIS_fnc_selectRandom but it takes an array
you can get an array of subclasses
alright, spent so much time on the wiki I didnt even see that green box lol
got it thanks 🙂
Can someone (maybe from @Bohemia.net) tell me how to convert windStr into wind speed (e.g. in knots or in metres per second) because I would like to create autometic METAR (Meteorological Aerodrome Report) [https://en.wikipedia.org/wiki/METAR] weather report information.
While we are at it maybe someone could also tell me how to get the actual visible range e.g. from fogParams.
if it is the same as setWind, m/s
https://community.bistudio.com/wiki/setWind
it's wind, not windStr
_windSpeed = vectorMagnitude wind (in m/s)
windStr is 0..1, whereas wind is 0-infinity I guess
the thing is, IDK what is windStr
well all I suppose is that it might be a variability value
because wind also can have gusts… adding to my confusion
I guess we need an official answer from @Bohemia.net after all.
ok bois, let's ping @Bohemia.net and ... get kicked immediately after!
I guess we can't do that, even if we wanted to! 
I have -guessed- that
wind = set wind (max) force
windStr = strength of "usual" wind (e.g 0.75 = 0.25 possible gusts)
setGusts = gusts frequency
Does anyone happen to know if ace_interact_menu_fnc_addActionToObject has local or global effect?
@wispy cave
ACE_Actions and ACE_SelfActions can be added via config or by calling functions. Be aware that the functions modify the UI, and therefore need to be executed on client-side to take effect.
I completely looked over that, thanks
Have a bit of an issue here using addMissionEventHandler giving me a reserved variable error.
init.sqf where EH is:
addMissionEventHandler ["EntityKilled", {
_this execVM "scripts\points.sqf";
}];
points.sqf:
params = ["_var1", "_var2", "_var3", "_var4"];
systemChat "Test";
you are trying to assign a value to params which is a command. correct usage would be ```sqf
params ["_var1", etc];
Thanks 👍
Also is there a way to get a unit's display name. E.g. instead of O_Soldier_GL_F you return Grenadier
getText (configFile >> "CfgVehicles" >> (put class here) >> "displayName")
Thank you so much
Good afternoon boyz, probably the wrong channel to ask but how would I go about replacing the default map UI? Something like what they did for the contact dlc first mission
I'm guessing its probably within a terrain's files
Anyone know of a quick and easy way to return the player objects in a revive scenario? I have tried implementing the scripted event handler from this page (https://forums.bohemia.net/forums/topic/182228-scripted-event-handler-for-entering-and-exiting-incap-state/) to no effect. Specifically, I'm looking to return the object of the player who completed the revive on another player, but I cannot find it for the life of me.
Is there a way to autometically check how far the actual visible range at a certain position (or in general) is due to things like overcast, fog etc.?
PS: Thanks for your help with the wind speed, @winter rose & @little raptor.
well, keep in mind this info may not be true at all, just guesses/thoughts
@tough abyss UI only? The map UI is RscDisplayMap or something. I'm not in the game but if you use configSourceAddonList you can find out which pbo it is and then you can modify it
(at least on my side ^^)
ah ok, and which config file should I put in as parameters?
@worn forge Revives scripts are typically custom made by community members. You can write your own, or modify the one you said to also give you the unit you want
ah ok, and which config file should I put in as parameters?
what do you mean?
which parameters?
oh you mean the command
configSourceAddonList (configFile >> "RscDisplayMap")
I'm not sure if it's the right one. So check it in config viewer to make sure it exists
will do, thank you again
Larrow already explained it
player getVariable ["BIS_revive_helper", objNull ]; // Unit that is reviving the player
He sure did
That variable does not exist.
As in, (as I stated), I have run up and down that scenario as described, and it does not work.
Thus, I am hoping that someone who may have had a hand in developing that system can point to some more helpful variables.
tried… in vanilla?
Yes.
You would think that player getVariable ["BIS_revive_helper", objNull ]; would get set when the reviving player starts the action, but it does not, on either the revivor or the revived.
(you have to use getVariable on the reviv_ed_ unit)
I may be able to try tonight (in ~4h), meanwhile you can check the revive functions in the Functions viewer
Yup, have been going through them.
dang, quit killing my options!
well, I'm curious
it is also possible that the functions got revamped (e.g with remoteExec), and got rid of unused variables. Will check
I have a feeling that Larrow's information was accurate and then the functions got overhauled.
^^^^ this
I see Jiri uses the same awesome code comments I do
//draw the sh1t
lol!!
Lol
Doesn't look like revive is captured by the handleHeal eventHandler, which isn't surprising.
@astral dawn
https://github.com/dedmen/Intercept_CBA/blob/master/src/SQFExtension/HashMap.cpp#L188
By the way I use caching a lot in our AI code to cache results of several planning algorithms. For that I use input data converted to string as cache key. Conversion to string takes quite some time, especially with arrays. So if this hashmap calculates keys faster thanstr, It will be a great improvement.
it would still have to iterate over your array
much cheaper than generating a string definitely, but still some cost
what is wrong with GunHandler = player addeventhandler ["Fired", { private ["_bullet", "_last_pos"]; _bullet = _this select 6; waitUntil {!alive _bullet}; _last_pos = getPosATL _bullet; player sideChat format ["Pos: %1, Time = %2", _last_pos, time]; } ]; ?
gets generic error in expression and the sidechat gives the position of end of barrel
the hashtag is at the waituntil line
private ["_bullet", "_last_pos"];
thats useless. and wastes performance, which is especially important in a fired eventhandler
also you cannot wait inside a eventhandler
eventhandlers freeze the game until they are done processing
so your waitUntil would just hard freeze the game forever
this is a copied script
what I'm trying to do is getting the impact points of bullets
But you could spawn a waitUntil yes?
this is a copied script
doesn't make it any less wrong/invalid.
Yes youd have to spawn your thing.
But the script makes no sense, when the bullet isnt alive anymore after the waitUntil, you cannot get the position as the bullet will be gone by then
dead bullet == despawned
ah i see
Perhaps using a Hit eventHandler on the target?
I assume it also wants to get ground impacts?
no target, just the ground
Dedmen, since your eyes are on the page
which page
This page right here on discord, ie., I have your attention 😛
Any advice on how to find the revivor in a vanilla revive situation?
no
Rog. Thanks.
k thx bye
Is there a way to get rid of white space at the start and at the end of a string ?
white space?
" blablabla lollol "
"blablabla lollol"
splitString could work ?
" foo bar " splitString " "
> ["foo","bar"]
well found the solution
can rebuild the string then
why would moduleTracers_F cease to function when a player gets close to it and how can I make it continue to function regardless? this initially worked now they only work when I am some distance away from them
place it bottom-left corner of the map 😄
Lul
ahhh sarcasm my favorite, so is there a better way then to create tracer fire over a specified area that i am missing?
Could you put down two modules? Player can't be in two places at once.
much cheaper than generating a string definitely, but still some cost
What I have found is that floats are very costly to convert so string, when there are lots of them. So it will be a good improvement, I believe 👍
so i am creating a barbwire crawl area with tracer fire over the top i have several tracer effects set to the one side with targets on the opposite side that the effects are set to target. now whenever I get remotely close to the area where you would crawl under the fire stops and as soon as i get away from the area the fire resumes
{
_bullet = _this select 6;
_bullet addEventHandler ["Deleted",
{
hint str (getPos _bullet);
}];
} ]; ```
doesn't return anything
yep, bullets don't get EH
any way around it?
no
i have a mission where it constantly reads out the position of a bullet and keeps it for a moment when it stops, so it must be possible
its probably somewhere in this script https://pastebin.pl/view/10db3197
probably
if you want the location of where the bullet hits, you have as far as I know only the choice of looping a getPosASL until it returns [0,0,0] (objNull)
this is the loop I just tried that doesn't work:
{
private ["_bullet", "_last_pos"];
_bullet = _this select 6;
while {alive _bullet} do
{
_last_pos = getPosASL _bullet;
};
hint str _last_pos;
} ];```
it just returns muzzle end
{
private ["_bullet", "_last_pos"];
_bullet = _this select 6;
while {getPosASL _bullet != [0,0,0]} do
{
_last_pos = getPosASL _bullet;
};
hint str _last_pos ;
} ];``` gives generic error in expression
@stuck rivet Event handler codes are NOT scheduled.
And NEVER, EVER use a time dependent while loop without sleep
lol you can see I'm a noobie at scripting
getPosASL _bullet != [0,0,0]
Generic error because != doesn't support arrays
isEqualTo and isNotEqualTo do
And also,
GunHandler = player addeventhandler ["Fired",
{
_this spawn {
_bullet = _this select 6;
_last_pos = getPosASL _bullet;
while {alive _bullet} do
{
_last_pos = getPosASL _bullet;
sleep 0.001;
};
hint str _last_pos ;
}
}];
waitUntil might be better
(private one line lower ^^)
No need
params, do you speak it?
No need for that either
back up; Shalerei, what are you trying to do? Is there an easier/better way?
get bullet impact on ground
side note about scheduled environment: doesn't work well when a lot of scripts are being processed. use an each frame EH
to what end? You want a hint every time a projectile is fired, telling you how far away it landed?
If it's about finding the distance between A&B I can think of a half-dozen better ways
don't care about performance much
yeah im trying to figure out range basically
{
_this spawn {
_bullet = _this select 6;
_last_pos = getPosASL _bullet;
while {alive _bullet} do
{
_last_pos = getPosASL _bullet;
sleep 0.001;
};
hint str (position player distance _last_pos) ;
}
}];``` seems to work, though it doesn't seem to take ricochets into account but I can deal with that
thanks everyone
@stuck rivet The only way to detect ricochets is through the acceleration vector (maybe velocity too)
probably, or possibly adding checks for positive Z axis changes(since Im shooting at ground) but it's good enough as is thanks
So is there an actual fix for my issue that you are aware of @winter rose
is there a way to change the despawn in the config viewer?
oooh, this tracer module
no you cannot, because it is """virtual"""
they spawn vehicles/units that shoot, and of course if you get closer, you would see them (also see there are no vehicles) so they hide them
unfortunately, it is "by design" @fleet lagoon
Create tracer bullets manually and fire them
fyi, it is a "B_Boat_Armed_01_minigun_F" that is spawned - and I can't find the code where it is hidden (yet)
got to love the civilian version of things, okay ill see if i can figure out a workaround thanks
and I can't find the code where it is hidden (yet)
what's hidden again?!
and sorry for the "sarcasm" earlier, I thought of a totally different tracer btw @fleet lagoon
@little raptor the firing boat stops firing when one gets close I think?
boat?
BIS_fnc_moduleTracers
Isn't the objective to show tracers?
What's the boat for?
When you can just create bullets?
tell that to BI? 🤷♂️
who makes these functions at Bohemia?! I gotta know
Is it possible to create playable slot via scripts ?
Or it's only possible by placing NPC into the sqm ?
no can do, unfortunately
good evening all,
I'm hoping I'm at the right place.
My unit and I have recently bought a server, downloaded the Invade & Annex by Quiksilver and have been live for about 3 weeks now.
One thing we've noticed is that we'd like to restrict access to vehicles so that only the "Commander" or "Pilot" role can "ACTIVATE" the vehicles.
None of us are script coders so we have absolutely NO IDEA as to where to begin because the scripting files don't appear to have a solution (we've asked on his discord)
I'm hoping someone can take the time to explain how to make one or direct me as to where to research?
By activate you mean turn on?
rather quick question, how do I get the entity of a player in the format of entities?
I want to get all entities safe for the player
player doesn't do it, and neither does player nearEntites 0.1
what do you mean by entity? And what do you mean safe?
(with doesn't do it I mean that both those commands return [playername] )
huh?
what do you mean by entity? And what do you mean safe?
@little raptor I want to narrow the result ofentitiesto just the player
I don't really understand what you mean. Explain what you're trying to do
do you want to find out all players through entities command?
you mean entities that are solely players to be returned?
I'm trying to disable the simulation of all entities(players, ai, vehicle) without disabling the simulation of the player who runs the command
allMissionObjects "" - [player, vehicle player]
you mean entities that are solely players to be returned?
@crude vigil I want to return just the player so I can remove them from theentitieslist, which would pretty much everything that moves in it
@steady terrace Leopard wrote what you wanted pretty much.
I'll look at allMissionObjects, thanks
@hot fractal you're asking scripters here to go through Quiksilver's code for you, or hoping that someone else has already done so and is here - either of which might be a lot to ask. Your best place to get help is Quiksilver's discord, and hope, or buckle up and learn scripting to DIY.
@worn forge Hi Ryko, I've actually asked already on the QUiskilver's discord
hence I aimed to came here with people with knowledge to assist
as well as stating that i'm willing to help research wehre to go
rather than having someone do it for me
I understand all that. I'm just letting you know in advance why you might not get a response here. Doesn't hurt to ask.
@hot fractal What you're asking is pretty much impossible in Arma. you can't tell who's trying to turn on the vehicle
It could even be a script
vehicle engineOn true
@little raptor he's not talking about turning on the engine, he's talking about how vehicles are spawned
You see, there's the 77th JSOC servers i'm not sure if you're aware of them...and they were able to do it so that only "HQ" can spawn and activate said vehicles?
I didn't want to "steal" their code so didn't dare ask them
haha
in fact let me try and send something that Mynar sent (an admin on Quik's discord)
2 sec
Half of learning to script is by taking apart other missions, as long as you learn from it and just don't cut/paste/claim as you're own it's acceptable
Mynar: @[FOX] Red Fox I believe it would have to be something along the lines of .... THIS IS NOT REAL CODE TO USE ... I'm too rusty and pulling this off the top of my aged gray matter:
if qs_mission_config_commander && (player getunittrait qs_role = "commander" else exitwith hint "You must ask the Commander to activate this vehicle"
[4:49 AM] Mynar: The first finds out if the commander role is active via parameters.sqf and the second would be checking to see if the current player is the commander, else exit tell the player they need to be commander to activate the vehicle.
[4:50 AM] Mynar: I don't have anywhere near correct, efficient, and sanity checked code, but should give you an idea in a direction.
thanks @little raptor , just doing allUnits - [player] did it
copy paste sorry
unfortunately, it was like reading another language to me, which it is basically xD
@steady terrace that doesn't include the vehicles (empty) you asked for.
not sure if you are able to make heads or tails with that
Redfox it's not about whether I can understand it, it's about whether you can, this channel is about discussion and guidance, but I can't see anyone doing the actual work for you (unless there are some really nice folks in here)
that's what I mean
I don't understand it
I would like to
but not sure where to even begin researching
So far, in the last 3 weeks - my basic knowledge has expanded into using notepad ++
¯_(ツ)_/¯
is there no "guide" so to speak as to begin understanding what/how the code qs_mission_config even means anything?
or do I have to take a google lesson on python
@hot fractal qs_mission_config is probably a global variable
It's not a code or something.
And why Python
Arma scripting language is SQF
Python is only one of the few things i understand about coding
See the pinned links to see some guides
ah this site looks interesting, i'll see if i can pin the two together
thanks for pointing to a general direction
Have I got this right?
An Identifier can be based on "local variables" so does that mean these local variables can be found within the Quiksilver's codes somewhere?
If so, how would i know what Variables are attached to said identifier?
@hot fractal There are two types of variables in Arma: (excluding variable spaces)
Global: Can be accessible outside of a script once defined. Its identifier (aka name) must not start with _
Local: Accessible within a certain scope (and sub scopes, unless privateed). Its identifier (aka name) must start with _
As for understanding what type of data they're holding, you should read the code. There's no general rule about that (Arma doesn't have data type declaration like int Var)
hmm thanks will try to get head around
scripting question, beside reading missionConfigFile, is there a way to access the mission's header? (mission type, minPlayers, maxPlayers)
as it can be located in mission.sqm now…
just needed maxPlayers, and I can live with playableSlotsNumber!
loadFile + custom parser?
yeah but that's quite heavy ^^
there is also a trick where you #include mission.sqm into a description.ext's subclass, too…
but that's artillery against a footmobile 😄
I am looking for a snippet code to display a player face in an image ctrl 
@compact maple Use r2t
wdym?
never used that before
I'd like to pass a classname like "GreekHead_A3_01" and get the image
@winter rose Could pull all the Event editor mission attributes using an editor script, and add them to an object's init field or something, so they're available as global variables in the mission.
Not exactly a great solution though, as you'd need to run that command in the editor :/
@compact maple So it's not a player that exists in the world? (as in an object)
It's not yea
You want the profile faces?
Yep!
It's probably under CfgFaces.
I'm not in the game so I'm not even sure if it's thing! If not maybe cfgIdentities
.paa isn't the image ?
Ah no, @winter rose, I think you want this family of commands: https://community.bistudio.com/wiki/getMissionConfig
Oh yea I see
@cold glacier oooh yes thanks!
In fact, I'd like to reproduce this https://gyazo.com/cdff9540c504240c25e62db4df6b5a8a
Create a head then slap that texture onto it!
But just the rotating part
Create a head then slap on that texture onto it!
How do I create a 'head'?
That head you see there is a model. It should be doable
Idk, but it should be somewhere in the game files. 🤷
Alright, thanks! 🙂
Maybe find the display ID, find which addon creates it, and then look for the model
@compact maple The alternative method is to create a normal guy with that face
Then zoom in on it
Maybe even use setObjectTexture [0, ""] to hide his uniform
I see, Idk if I explained what I needed correctly, I'm not a native english speaker so x),
I have a dialog, with many controls, and I'd like to display a face form the CfgFaces
so there is 2 ways:
- using the model from the Arma 3 dialog directly?
- your alternative method
right?
if I explained what I needed correctly,
You did
actually, I'm starting to think it is not a head but actually a man
You know you can create 3D models in displays right?
I've seen a post from kk's blog about it, but never used it
Ok. So try this:
create a normal soldier as the 3D model
obj setObjectTexture [0, ""] to hide his uniform
use setFace to change the face (not 100% sure if this part works)
maybe it works
Ok I'm going to read a bit of doc before because never tried to create a model inside a dialog, I dont even know the type
It's a separate class. Under "objects", not "controls"
yes
Ok, Arma 3D controls. There are about 4 types of those, type 80-83, but I personally experimented the most with CT_OBJECT_CONTAINER (type = 82;)
Interesting. I didn't know this one!
is there a workaround for fadeSound? talk on the biki says it hasn't worked --since-- in arma 2..[mistake]
very true
doesn't change it not working though 😄
1 fadeSound 0.1 should do it, right?
yes
sadly it doesn't
mooods
Q: I have a waitUntil which checks if a player contains a variable ```sqf
waitUntil { (_unit getVariable [QGVAR(hasUserData), false]) isEqualTo true };
Is there a way to wait till something happens, but continue if it a) contains the wrong value or b) takes too long?
Let me ask a question: why isEqualTo?
Make a separate timer loop that stores a time in a different variable, then use or in the waitUntil?
Make a separate timer loop that stores a time in a different variable, then use or in the waitUntil?
private _tick = diag_ticktime;
waitUntil { (_unit getVariable [QGVAR(hasUserData), false]) || (diag_ticktime - _tick) > 10 };
(wait 10 secs)
@robust hollow
private _tick = diag_ticktime + 10;
waitUntil { (_unit getVariable [QGVAR(hasUserData), false]) || diag_ticktime > _tick};
same difference!
essentially what I meant but I forgot about diag_tickTime
You said a different loop. There was no need
hah, yea i was thinking there was a less involved way but couldnt think of it
the principle of checking a separate timer and then using or is the same. I just forgot diag_tickTime was available to check instead of making your own timer.
hmmm.... so CBA_fnc_waitUntilAndExecute 🤔
which does all of that
It's different (unscheduled). And you can't use it in the same script
why not?
it doesn't...
Hello, Is there away to make it so i dont need to fill in Marker_1 till Marker_20 like this
_Cachelocations = selectrandom ["Marker_1","Marker_2","Marker_3","etc"];
and even if... I can simply put the rest of the code in the statement (which isn't a lot), and even have alternative code in case it fails
@warm hemlock a for loop?
@exotic flax it does
https://github.com/CBATeam/CBA_A3/blob/master/addons/common/init_perFrameHandler.sqf#L48-L56
you are right though, you can put the rest of the code inside it
@little raptor No
_Cachelocations = selectrandom ["Marker_1"];
if (isServer) then
{
_Box1 = "rhs_mags_crate" createVehicle getmarkerpos _Cachelocations;
_House = nearestObject [position _Box1, "House"];
_Box1 setPosATL (_House buildingPos 2);
};
For this
I mean use a for loop
_markers = [];
for "_i" from 1 to 20 do {
_markers pushBack format ["Marker_%1", _i];
};
or even better:
_ID = 1 + floor random 20;
_marker = format ["Marker_%1", _ID ];
Aha, never worked with that, but ill test it out!
@warm hemlock I have a simple function to fill an array with names like that:
FNC_fillArrayPrefix = {
params ["_prefix", "_count"];
_array = [];
_array resize _count;
{
_array set [_forEachIndex, format["%1_%2", _prefix, (_forEachIndex + 1)]];
} forEach _array;
_array
};
usage:
_markers = ["Marker", 20] call FNC_fillArrayPrefix;
// will return ["Marker_1", "Marker_2", ... , "Marker_20"]
why not just _Cachelocations = format["Marker_%1",ceil random 20]; or something?
already said 😦
That looks familiar!🤔
Is there a event handler for units that got created in Alive or CBA?
@warm hemlock I have a simple function to fill an array with names like that:
FNC_fillArrayPrefix = { params ["_prefix", "_count"]; _array = []; _array resize _count; { _array set [_forEachIndex, format["%1_%2", _prefix, (_forEachIndex + 1)]]; } forEach _array; _array };usage:
_markers = ["Marker", 20] call FNC_fillArrayPrefix; // will return ["Marker_1", "Marker_2", ... , "Marker_20"]
@exotic flax So id make a seperate file with the function? or keep it in the same SQF?
If you want a random marker, use what Conner and I said, because it's faster
that depends on how you want to use it; I have it in a separate file (part of my framework), but the above snippet can be placed inside the same SQF file
finded this in Alive
class Extended_Init_EventHandlers {
class Man {
init = "_this call (compile preprocessFileLineNumbers 'my_script.sqf')";
};
};
um...so?
Yes.
Are there keyed arrays in Arma, like a dictionary
key => value arrays don't exist in Arma, unfortunately
do you mean hashmaps? I have no idea what key is in this context!
// PHP example
$array = array(
key => value
);
^^ does not exist in Arma
Not sure what a hashmap is. A dictionary uses a unique key for each value
That's also called a hash table (or hashmap)
Anyway, you can have something similar, but the exact thing doesn't exist as Grezvany13 said
Unfortunate, thanks for the help
why not just_Cachelocations = format["Marker_%1",ceil random 20];or something?
already said 😦
@robust hollow
`_Box1= [];
_Box2= [];
_Box3= [];
Cachelocations = format["Marker%1",ceil random 14];
if (isServer) then
{
_Box1 = "rhs_mags_crate" createVehicle getmarkerpos _Cachelocations;
_House = nearestObject [position _Box1, "House"];
_Box1 setPosATL (_House buildingPos 2);
_Boxloc = createMarker ["Boxloc", _box1];
_Boxloc setMarkerType "mil_destroy";
//_Boxloc setMarkerAlpha 1;
_Box2 = "rhs_mags_crate" createVehicle getmarkerpos _Cachelocations;
_House2 = nearestObject [position _Box2, "House"];
_Box2 setPosATL (_House2 buildingPos 3);
_Boxloc1 = createMarker ["Boxloc1", _box2];
_Boxloc1 setMarkerType "mil_destroy";
//_Boxloc1 setMarkerAlpha 1;
_Box3 = "rhs_mags_crate" createVehicle getmarkerpos _Cachelocations;
_House3 = nearestObject [position _Box3, "House"];
_Box3 setPosATL (_House3 buildingPos 1);
_Boxloc2 = createMarker ["Boxloc2", _box3];
_Boxloc2 setMarkerType "mil_destroy";
//_Boxloc2 setMarkerAlpha 1;
};`
Got it working sort of, but the boxes all spawn in the same house
because you only define one random cache location
you would need to use getmarkerpos format["Marker%1",ceil random 14]; on every createvehicle instead to have a random marker every time
getmarkerpos format["Marker_%1",ceil random 14];*
just noticed your paste is using the _ for formatting
Oh wait i see now
```sqf please 🙂
@robust hollow @warm hemlock Since random can return 0, you should change it to: 1 + floor random 14
What would this do?
ceil?
the 1 + floor random 14
Selects a random integer between 1 and 14
Oh because there is no 0
yes.
Random real (floating point) value from 0 (inclusive) to x (not inclusive).
ceil 0 = 0
lies!
ceil 0.0000000001 = 1
Oh right. Arma uses floats all the time 
Its not very reliable, sometimes it spawns 2 or 3 or non ar all
Instead of doing this:
vectorNormalized ((_truck modelToWorld [0, 1, 0]) vectorDiff (_truck modelToWorld [0, -1, 0]))```
Should I do this?
```sqf
vectorDir _truck;```
I assume they're the same thing, not sure exactly why I wrote it the first way
I think it has something to do with this _House3 = nearestObject [position _Box3, "House"]; because it only spawns in 1 type of house
@tiny wadi Yes. Plus, there's always: vectorModelToWorld
Long story short: object vectorModelToWorld [0,1,0] is the same as vectorDir object
If I have an array like [1, 7, 2, 1, 1] what can I use to return the number of 1s and there positions?
probably something like this
_foundOnes = [];
{
if (_x isEqualTo 1) then {
_foundOnes pushBack _forEachIndex;
};
} forEach [1, 7, 2, 1, 1];
perfect thanks!
WHY?! Jeez.
What my son?
why do you loop through the array?
got a better solution?
nvm he asked for indexes not the elements
read before shouting 😉 it helps
what can I use to return the number of 1s
I stopped at here. and I read it as number 1s
do you mean hashmaps? I have no idea what key is in this context!
@little raptor Hashmaps/associative arrays/dictionaries are all language-specific names for a "Map" style data structure, that takes a "key", and retrieves a "value" associated with that key very quickly. They "map" a key to a value. "Hashmap" (which is the Java name) is implemented using a hash table, hence the name. Java also has a "TreeMap", which is internally implemented using a search tree, which has different performance characteristics. (No idea if this was interesting, but thought I'd clear up the terminology 🙂 )
@potent dirge - The closest Arma has right now is objects or locations, which you can create and use "setVariable" and "getVariable" to set and retrieve values on. (https://community.bistudio.com/wiki/setVariable). CBA implements this as "namespaces" (https://github.com/CBATeam/CBA_A3/blob/master/addons/common/fnc_createNamespace.sqf). However namespaces are not automatically garbage collected - i.e, when you're done using them and no longer reference them from any variables, they don't get deleted. This makes it really, really easy to accidentally leave them lying around (leak them), which is something to avoid. This makes them impractical for a lot of use cases, I find.
CBA also has a "map" implementation, sort of, in its "hashes" library - but I'd steer clear of it personally, as SQF-based hash tables have really quite poor performance, because SQF is incredibly damn slow as a language. Use sparingly.
(https://cbateam.github.io/CBA_A3/docs/files/hashes/fnc_hashCreate-sqf.html).
It's possible to try implementing your own too, but as mentioned above, SQF implementations I always find to be too slow to be practical if they're being accessed regularly.
there are also BIS fnc key-value pair functions somewhere
This makes them impractical for a lot of use cases, I find.
@cold glacier Why? Just manage own memory manually and it will be good 🤷
It's totally usable for everything which has a life span of a mission, because it is collected when mission is unloaded.
For stuff which is more short-lived, yes it's annoying, but I can't think of a situation where it would prevent someone like you from using it if it's needed. 🤔
I generally use it that way @astral dawn - Mission-length lifespan, or areas where I can be very, very careful with allocation and deallocation.
I also use it where there's a need to remove other objects anyway, such as when the lifespan of a namespace is tied to that of a building.
I'm always wary of them, as guaranteeing deallocation in Arma is a pain, since there's (to my knowlede), very few ways to be 100% sure code will run, even in the situation where there's errors.
It's also tricky if you plan to share that namespace widely, as either:
- Bits of code that don't "own" the namespace, need to be prepared to deal with it being deleted at any point
- Something like reference counting needs manually adding.
I imagine it's a little bit easier for you with the destructors in your OOP implementation though.
Tl;DR I use them, but sparingly, because manually managing de-allocation reponsibilities when they're widely used is a pain in the ass 😛
fadeSpeech does nothing in Arma 3, right?
fadeSpeech does nothing in Arma 3, right?
@violet gull It should work. At least there is nothing documented about it not working in A3
Haven't noticed a difference with fadeSpeech 0 and 1, plus there's no speechVolume command that I can see
There's radioVolume, soundVolume, and musicVolume only (And getPlayerVONVolume)
Was gonna experiment to see if it effects Direct channel volume at all, but I doubt it 
@cold glacier CBA hash is not a hash, its just a key-value array thing.
ah should that have been in troubleshooting? :/
ill move my post and remove this one ^above^
@still forum - Aye, worth pointing out, cheers. It's a map implementation, not a true hash-based lookup. Not quite sure why they called it "hashes", bit of a misleading name.
because to the outside it looks like a hash
Hash should have constant lookup time, and the cba thing is linear as I know
IIRC it uses find internally
yes
Hash should have constant lookup time, and the cba thing is linear as I know
IIRC it uses find internally
@astral dawn That's why having 2 arrays, one with the tags, the other one with the value, so much faster than (prolly) almost anything else.
has anyone tried "XY addAction" to "this addAction"?
?
I need addAction which do addAction to object
@trail smelt it also matters where you are trying to run this command. Are you inputing it in the "init" box in the Eden editor? Running it in the debug window while the game is running? Using a script file? this is very specific
i thing first object1 addAction [object1 addAction [..]], in eden init
first action named "X" add action to same object named "Y"
So you want to use addAction to add another action to the object?
Yes
object1 addAction ["Action X", {
params ["_object"];
_object addAction ["Action Y", {}]
}];
see
https://community.bistudio.com/wiki/addAction
to customize it better
Thanks ❤️
is it still possible to somehow implement sleep between two functions in addAction?
Yes. It is scheduled.
object1 addAction ["Action X", {
params ["_object"];
_object addAction ["Action Y", {}];
sleep 1;
hint "Action Added 1 second ago!";
}];
keyboard addAction ["Zapnout stahování", {mainlcd setObjectTextureGlobal [0, "pic\armed.jpg"];keyboard say3D ["music1", 1000, 1];keyboard1 removeAction (_this select 2);sleep 25;
params ["_object"];
_object addAction ["Dokončit stahování", {mainlcd setObjectTextureGlobal [0, "pic\disarmed.jpg"];keyboard say3D ["music1", 1000, 1];keyboard1 removeAction (_this select 2);}]
}];```
Thanks for help 🙂 😄
@trail smelt See the pinned messages to see how to add syntax highlighting to the code.
There was no need for params ["_keyboard1"]; at the beginning. Since you have given global names to your objects, there's no need for params ["_object"] either.
keyboard addAction ["Zapnout stahování", {
//params ["_keyboard"];
mainlcd setObjectTextureGlobal [0, "pic\armed.jpg"];
keyboard say3D ["music1", 1000, 1];
keyboard removeAction (_this select 2);
sleep 25;
keyboard addAction ["Dokončit stahování", {
mainlcd setObjectTextureGlobal [0, "pic\disarmed.jpg"];
keyboard say3D ["music1", 1000, 1];}]
}];
Thanks for help 🙂 😄
np
It's important to consider what context you're adding that addAction into; if you are creating a multiplayer mission, and putting that addAction in the init field of an object, that script will be run every time a client joins the mission. So if 20 clients join, object1 should get 20 addActions added to it.
@astral dawn That's why having 2 arrays, one with the tags, the other one with the value, so much faster than (prolly) almost anything else.
@jade abyss
It's still a linear search and it's not faster than getvariable if there are lots of values
Lots like... 100 or so I think
But it's probably best implementation right now.
Never said that it's faster than getVar - "almost"
getVar is still, by far, the better choice. But... yeah... still annoying.
is there a way to get a array of faces that a faction uses?
I would guess yes through config
So, I'm pretty new to scripting and I am wanting to have three sqf scripts activate at the same time at the start of a mission file, but I'm having some trouble.
It only executes the first sqf in the line and ignores the others. Any way to fix that?
We'd need to know what the scripts have in 'em. First step will be to check your .rpt file to see if there are any errors
It's ALIAScartoon's scripts; specifically the Worm, Twins, and Screamer.
Means zip to me. You may want to contact the script owner.
This is what I got in the init.sqf
enableEnvironment [false, true];
/*
Example: how to delay the script until units are in area, so Screamer will sort of ambush
the variable units_in_area will be made true via a trigger placed on map in desired location
units_in_area = false;
publicVariable "units_in_area";
waitUntil {units_in_area}; - this line must be before script command
*/
null=["screamer_1"] execvm "AL_screamer\screamer.sqf"
null=[tow_1,800,true,70,true,true] execvm "AL_twins\twins.sqf"
sleep 7;
null=["worm_1"] execvm "AL_worm\worm.sqf"```
Yeah, I'm in the process of doing so
Only thing I could guess would be "scream_1" is referring to an object and does not need to be in quotes, but I have no knowledge of what those scripts do
Similarly with "worm_1"
To my understanding, scream_1 and worm_1 relates to a marker that I put down also named scream_1 or worm_1 in Eden Editor*
On that specific marker, it will have a set range that if a player walks within a certain vicinity of the defined marker, it will activate the script
Well then sounds like it's set up correctly, markers are located by strings
Technically you don't need null= at the beginning of those lines
The only one that's different is the Twin which I put down and create as this entity. It will then have Weeping Angel mechanics.
While Screamer and Worm are based on a trigger within an area and are their own models
If you're not running on a dedicated server this line
if ((!isServer) && (player != player)) then {waitUntil {player == player};};
could be an issue; when you run a local multiplayer session you're technically both the server and a player... frankly I'm not sure how this line is important to your use case
So would deleting it be beneficial?
Again, I'm new to scripting haha I'm just trying to make something cool
It's important to consider what context you're adding that addAction into; if you are creating a multiplayer mission, and putting that addAction in the init field of an object, that script will be run every time a client joins the mission. So if 20 clients join, object1 should get 20 addActions added to it.
@worn forge Yea its for clan game ... (only after all players are connected game start ..)
Fox I think the intent of the line is to delay it so that the player has fully loaded in before the scripts are run, you'd have to test with and without to see if it's necessary
Have done so far, but the problem still persists. When I start the mission file, it will only execute the first line it comes across which would be the screamer_1, but ignore the other two below it.
So it'd only spawn 1 entity instead of the 3.
The init.sqf when executed pulls from other sqf's to run them plus pulling from a sound file with custom sounds.
@little raptor So after looking around a bit about that rotating model head, I've found this topic https://forums.bohemia.net/forums/topic/210901-profile-editor-head/
and it says it cant be reproduced
hummm… yes? 😁
Did you mean me?
np ^^ hehe
@compact maple Well, that's the head model you were looking for!
model="\A3\ui_f\objects\face_preview";
What about what I said? That didn't work either?
yup saw that 🙂
↑
@compact maple Also, I read the topic very briefly. It wasn't tested properly. It could still work. They simply spawned the display and were like : "No head? It doesn't work"
I think the head didn't have any textures. It probably has hidden selections, and if so you can apply the texture to make the head visible.
you can try spawning the head model as a regular object, see if I'm right about that
In this part:
model = "\A3\blah";
I have to set the path to the 3d man model right ?
that's #arma3_config 😉
oops
@compact maple anyway, yes
The problem is I don't know how to set a texture on a model ctrl
Right. it might not be possible. I just realized! 😟
I thought there would be a command for that
There's just one command for animating the model
@compact maple Are you making a mission?
yup
I had one idea. Let me see if it works
Sure, thanks 🙂
Im having a hard time finding what I need in the config/functions splendid viewer
There is of course one more solution. But I want to see if the head thing works.
@compact maple is it ok if the heads are all vanilla?
Sure!
@fringe yoke https://github.com/BrettMayson/arma-rs/blob/master/core/src/lib.rs#L51 ❤️ dont let commy kill your dreams!
Hey there, I tried to use _vehicle setOwner 3 on my dedicated server to transfer the locality to the client but it returned false and didn't change the ownership. Is it broken or does the command not work with vehicles?
any crew in it?
no completely empty
anyone know about any bugs with https://community.bistudio.com/wiki/setUnitLoadout in addition to the one currently stated on the wiki?
…what is it that you encounter? might be faster to start with that 🙃
me? I am not encountering anything extra
@compact maple I couldn't get it to work.
You can still use the other method, altho in a different way.
_head = "B_soldier_F" createVehicleLocal [0,0,1000];
_head setUnitLoadout [[],[],[],["U_C_Driver_1_black",[]],[],[],"","",[],["","","","","",""]];
_head enableSimulation false;
_head setObjectTexture [0, ""];
_head setPosASL [0,0,1e3];
Then create a display, with an empty "window" region to show the "head" in.
You're gonna need a camera object. Set its position so that it faces the head. e.g:
_cam = "camera" camCreate ASLToAGL (eyePos _head vectorAdd (_head vectorModelToWorld [0,0.5,0]));
_cam setVectorDirAndUp [_head vectorModelToWorld [0,-1,0], [0,0,1]];
switchCamera _cam;
The position must be aligned with the "window" tho. With this setup the window is assumed to be at the center of the display.
You can also create a background object, such as a big VR block, so that the "sky" is not visible.
A light source might also be necessary to show the head in the dark.
Just wondering if there is anything known about the command that isn't on the wiki that I have to look out for. Besides the mag refill bug for the command
well, if one encounters anything it shalt be added to the biki
fair 😛
so far, the wiki is up-to-date afaik :p
It works as best at it can get for a player version of addweaponwithattachments that I was seeking out the other day
no cutting of outfit/bag.. besides that one hiccup 😄
@little raptor wow! thanks for your help man, I'm going to try this out with my dialog 🙂
(just realized I cant put a cam into a ctrl)
@compact maple No problem. There's also another way. Using render to texture like I mentioned before. In case you don't know what it is, if you happen to have noticed the vehicle mirrors in Arma, they're also r2t; basically a low quality texture captured from the world. (like a snapshot)
just realized I cant put a cam into a ctrl
you can't. you have to do it in the world
I see what is it, like looking at a window/mirror and see trees in it, but there are no trees around you lol
yup but I already did a script camera that displays the world randomly while the player is in the dialog
It's still ok. You can use the same camera.
Instead of putting the camera in front of the face, you put the face behind the camera!
Anyway, you can always use r2t
without the uav part of course!
I see, thats cool
yeah. same thing as before. except no need to switch to the camera
Fix for the setUnitLoadout ammo bug https://pastebin.com/SHX41Jkk would have to compile that code into a function but yea, that cleans out loadouts and arma applies them correctly without refilling ammo bug
Question: Does anyone know if it's possible to somehow save the return of a function as nil when it doesn't return anything?
This expression gives a generic error:
_result = [] call {a=1};
Yeah but I don't know the function
I'm making a "debug console"
Do you happen to know how the vanilla debug console does that?
there is some trick with apply
Thnx. I'll check it out!
CBA surely uses it somewhere, probably in their XEH system
or maybe param or smth
maybe
[[] call {a=1}] param [0]
smth like that?
Thanks a lot! Apply worked:
[nil] apply {[] call {a = 1}} select 0
I'll also test param
It didn't work. It's also a generic error
But thanks anyway!
_group = [[0,0,0], west, ["B_Soldier_TL_F", "B_Soldier_F", "B_soldier_AR_F", "B_soldier_LAT2_F","B_soldier_M_F","B_Soldier_SL_F","B_Soldier_F"]] call BIS_fnc_spawnGroup;
hint str (_group);
keeps telling me _group is undefined. no idea why. send help pls 
I don't see anything wrong
I might post the whole script if you mind
And it works for me in editor
I might post the whole script if you mind
Yeah do that. The problem isn't here
_count = _this select 0;
if (_count > 6) then {
_group = [[0,0,0], west, ["B_Soldier_TL_F", "B_Soldier_F", "B_soldier_AR_F", "B_soldier_LAT2_F","B_soldier_M_F","B_Soldier_SL_F","B_Soldier_F"]] call BIS_fnc_spawnGroup;
};
if (_count >= 6 && isNil "_group") then {
_group = [[0,0,0], west, ["B_Soldier_TL_F", "B_Soldier_F", "B_soldier_AR_F", "B_soldier_LAT2_F","B_soldier_M_F","B_Soldier_SL_F"]] call BIS_fnc_spawnGroup;
};
if (_count >= 5 && isNil "_group") then {
_group = [[0,0,0], west, ["B_Soldier_TL_F", "B_Soldier_F", "B_soldier_AR_F", "B_soldier_LAT2_F","B_soldier_M_F"]] call BIS_fnc_spawnGroup;
};
if (_count >= 4 && isNil "_group") then {
_group = [[0,0,0], west, ["B_Soldier_TL_F", "B_Soldier_F", "B_soldier_AR_F", "B_soldier_LAT2_F"]] call BIS_fnc_spawnGroup;
};
if (_count < 4 && isNil "_group") exitWith {};
hint str (_group);
/*
if (local _grp) then {
_grp deleteGroupWhenEmpty true;
} else {
[_grp, true] remoteExec ["deleteGroupWhenEmpty", groupOwner _grp];
};
*/
_bluTransport = createVehicle ["B_Heli_Transport_01_F", getPos bluSpawn, [], 0, "FLY"];
_bluTransportCrew = createVehicleCrew _bluTransport;
//{_x moveInCargo _bluTransport; _x assignAsCargo _bluTransport;} forEach units group _group;
Group is not defined outside the scope
for real T_T
If this will solve it, I will praise you as a god
It works, thanks a lot Leopard20! 🙂
I guess with a switch?
if (_count > 6) exitWith {
_group = [[0,0,0], west, ["B_Soldier_TL_F", "B_Soldier_F", "B_soldier_AR_F", "B_soldier_LAT2_F","B_soldier_M_F","B_Soldier_SL_F","B_Soldier_F"]] call BIS_fnc_spawnGroup;
_bluTransport = createVehicle ["B_Heli_Transport_01_F", getPos bluSpawn, [], 0, "FLY"];
_bluTransportCrew = createVehicleCrew _bluTransport;
{_x moveInCargo _bluTransport; _x assignAsCargo _bluTransport;} forEach units _group;
};
``` I guess you mean like this?
_group = call {
if (_count >= 6) exitWith {
[[0,0,0], west, ["B_Soldier_TL_F", "B_Soldier_F", "B_soldier_AR_F", "B_soldier_LAT2_F","B_soldier_M_F","B_Soldier_SL_F"]] call BIS_fnc_spawnGroup;
};
if (_count >= 5) exitWith {
....
};
if (_count >= 3) exitWith {
...
};
};
As you can see, the expressions are designed so that there's no "gap" between them
Oh! Thats good to know, thank you
There are still better and faster ways, but they might be confusing
probably haha
so I also don't need the isNil part right? because the script gets exited anyways
yeah. I don't see any way where _group could become nil
true 
My radio script utilizes displayEventHandlers for display 46 (Main game) and findDisplay 312 (Zeus). However, if any dialog pops up, the eventHandlers pause. I'm assuming due to a new display being created and set as the focus or something? How can I detect the display that is causing display 46 to pause so I can recreate the DEHs for that new display?
you'd probably need to either manually add events in the scripts where each display is opened, or use some loop to check the displays in allDisplays against displayParent to add to displays that are children of display 46/312. that may not be 100% reliable though 🤔 you could also simply add events to all displays after display 46/312 in allDisplays, but thats ugly.
I'm thinking displayParent
wouldnt mind having a onChildCreated ui event for situations like this tbh.
or an onDisplayCreated (not sure if createDialog counts as a child of an existing display the first createDialog display has no parent, but using createDialog while one is already open creates the new display as a child of the one before it)
Hello :)
//video.sqf:
scopeName "main6";
while{true}do{
mainlcd setobjecttexture [0,"vid\lb.ogv"];
["vid\lb.ogv",[10,10]] spawn bis_fnc_playvideo;
sleep 28;
if (!alive TV) then {
breakTo "main6";
};
};
I use this script to play ogv on the object but after activation video playing is looped, any advice please?
It's... in a while loop...
Hello guys, quick question about variables names. Does the vehicle respawn module ModuleRespawnVehicle_F keep and restore variable names upon respawn ?
Cheers
@runic edge yes,iirc.
nice, thanks man !
//video.sqf:
scopeName "main6";
while{true}do{
mainlcd setobjecttexture [0,"vid\lb.ogv"];
["vid\lb.ogv",[10,10]] spawn bis_fnc_playvideo;
sleep 28;
if (!alive ObjectX) then {
breakOut "main6";
};
};
and after activate this sqf use this command..
objectX setDamage [1, false];
After 6 hours i did it..
if (!alive TV) then {
breakOut "ObjectX";
};
``` `exitWith`?
and after activate this sqf use this command..
makes 0 sense
TV setDamage 1; maybe?
ObjectX scopeName is also never set as far as I can see
I'm sorry I swapped it
https://community.bistudio.com/wiki/BIS_fnc_playVideo it even has EHs to tell you when video stopped
how about
while{alive ObjectX} do {
instead of your weird if and breakOut thing
I was literally gonna say that
The God of reboot. He smite me
Hello, is there an event handler that automatically switches between a weapons primary and underbarrel weapon every time you fire?
These two cmd are ok to be used ? allPlayers / call BIS_fnc_listPlayers
@spice vigil Hi, you can add a Fired EH & manually switch ?
yea, as I only want real player I will probably pick the function
Thanks for info, follow up question though because of my lack of knowledge. What is a manually switch command? (is there a link to the wiki page?)
I need some help for a teleport trigger: My plan is to teleport a boat and his crew to a location via trigger. But how can I do this? (Tried with player setPos (getPos xy, but didn't work) Thanks in advance!
@low zodiac show script? because it should work
@spice vigil see selectWeapon on the wiki 🙂
cheers
I've put the script in the init in the Trigger, don't know if i need to make a sqf file: boat setPos (getPos marker1). [Not sure if I correctly remember, as I am not ingame anymore.]
Yo
@amber inlet To follow up from General; AttachTo attaches one object to another, while setVectorDirAndUp changes the heading and other factors of how the object sits.
So if i want to attach it to the top of the bench where do i put in the command
AttachTo uses a straightforward system,
A attachTo [B [How far back on the X axis, Y axis, and Z Axis you want it]]
So in your case;
Backpack attachTo [Table [0,0,0]]
You have to name the objects, first.
Done in their properties window, Variable Name
And Backpack won't work, since it's a used script name - you can use it to see what backpack a unit has, etc
Says im missing ; but i put it in already
I put the coordinates of the bag in
On bag init
Hrm, I'm tooling around with it too
Ok
I've put the script in the init of the Trigger, don't know if i need to make a sqf file: boat setPos (getPos marker1). [Not sure if I correctly remember, as I am not ingame anymore.]
@winter rose ^
Lovely, looks like backpacks cant be attachTo'd xD
Ah thanks anyways its fine under the bench lol
Im just glad it shows up
Maybe ill attach it to my squad buddy’s face and see if that works lol
And have him crab crawl all the way to extraction
😆
@low zodiac no need to bump
also, what you want is getMarkerPos "marker1"
Sorry for ping and thank you! Will try later.
should work, np keep me posted
kk
If i put a dlc weapon in a box will the people without the dlc still be able to play the mission? I assume they will only see the weapon in the box but not be able to use it
correct
they simply cannot pick it up.
also, don't crosspost (#rules) @amber inlet
Ok its awesome that the devs did it that way, thanks
Gotcha
👍🏽
So i can use dlc vehicles but just not enter them if i dont have a dlc?
Ive been avoiding using anything besides apex and regular content
They can passenger, but can't crew
see https://community.bistudio.com/wiki/Arma_3_DLC_Restrictions for all the details
Heyo!
I'm trying to make an insignia appear on players when we load in.
Currently, it doesn't seem to be working in multiplayer for people when they respawn. (Tested on locally hosted server where I also play in client)
Code wise:
Description.Ext:
respawnOnStart = -1; // So it runs initPlayerLocal.sqf first, and doesn't run onPlayerRespawn until after the player respawns
initPlayerLocal.sqf:
_storePatch = [player] call BIS_fnc_getUnitInsignia; // Gets player Insignia pre-set in Identity in Eden Editor
uiNameSpace setVariable ["StoredUnitPatch", _storePatch]; // Sets player Insignia as "StoredUnitPatch"
// _storedPatch = uiNameSpace getVariable "StoredUnitPatch"; // Gets data from "StoredUnitPatch" as _storedPatch
// hint str _storedPatch; // Tests to check if StoredUnitPatch gets & sets correctly - it does so commented out
onPlayerRespawn.SQF:
storedPatch = uiNameSpace getVariable "StoredUnitPatch"; // Gets "StoredUnitPatch" as storedPatch
hint storedPatch; // Checks if storedPatch has got successfully
[player, ""] call BIS_fnc_setUnitInsignia; // Resets Insignia if none there
[player, storedPatch] call BIS_fnc_setUnitInsignia; // sets unit Insignia with data in
I have also changed position of code. Instead of _storePatch in initPlayerLocal.sqf, I commented it out and instead:
In the player's init - [this] ExecVM "savedPatch.sqf";
savedPatch.sqf:
_storePatch = [player] call BIS_fnc_getUnitInsignia;
uiNameSpace setVariable ["StoredUnitPatch", _storePatch];
Does anyone have any advice as to how I could get it on via multiplayer?
Do I need to do a wait until or an init Event Handler with waitUntil getClientState or something to make it work?
Thanks
(Edit 1 - Added sqf for readability)
So i can use the dlc jets to fight each other and still be able to play in a mission. I figure i wouldnt be able to do a mission with dlc content required but required is kinda grey
Say the main character has a ghillie and weapon from marksmen dlc but i dont , in that situation i wouldnt be able to play right?
Roaring - I could be wrong, but unless the mission maker has stated in the attributes that you need the dlc, you should be able to play.
If you spawn in the DLC ghillie & weapon, you'll be able to play but if you drop it, you will not be able to pick it back up.
Also: The DLC overlay will appear. ```Weapons Restrictions:
- Cannot be picked up from a box, a corpse, or anywhere else.
- If added by script or already provided, the DLC ads overlay will appear more and more frequently.``` with the link Lou linked
if player 1 has DLC and DLC weapons, it doesn't matter if player 2 has the DLC or not
Hmm so could i technically start inside a dlc jet if i dont own jets dlc as long as i dont get out?
As dlc creator
As creator i mean
The ads in loading screen?
no, on top of your game screen
Oh i guess i havent been in that situation to see it yet, its cool that they still let you play it
something like that
Oohh lol
I’d rather avoid that lol
But its nice to let us check the content out with that to test it out
Thanks
little by little, it's not immediately a full screen ad 😄
but yeah, play 10, 20, 30 minutes with DLC content… etc
Hey guys i dont know if this is the right place to ask this since im not even remotely good at scripting, But im trying to edit the BMR Insurgency mission Malden by jigor and just for like a private group of like 5 people, we wanted to replace the BTC revive with the standard Arma 3 respawn system to have it work with PIR. Ive tried just out right deleteing the BTC revive and quick revive scrips in the PBO but it seems to just remove all the slots and paramamerters when i do that
ask jigor for help/advice - it is their mission after all
My trigger got messed up after i moved it back , it appear to be under the sea dirt the coordinates are fine
no need to bump
also, what you want is getMarkerPos "marker1"
Worked, thanks Lou!
I put the size 100k for it and it still doesnt show up maybe it bugged out
What’s script for a task to be completed upon 1 certain guy dying? It’s alive something
(!alive enemyVariableName)
Someone else asked in #arma3_editor
https://discordapp.com/channels/105462288051380224/115333379133669382/769700438974005258
Though Lou's is probably more optimised for multiple checks
Thanks
I got another question. I can get a task to show notification after i complete the first task. Any ideas?
I can’t get a notification
Use the tasking framework
And an event handler to change the task state when that guy dies
I tend to use triggers. I link a trigger to the Set Task State, which links back to the original Task Create
I linked them to triggers but once i entered the condition !alivee1 it stopped working
Try in the conditions box:
!alive e1
instead, make sure there is a space
Oh ok
Also im trying the task to pop up when i enter the trigger not when i take the guy out right
You will want a different trigger for that then. I tend to use 2 triggers.
One to start the task, one to finish it
Trigger 1 linked to the Create Task, activated when you enter (condition = this )
Trigger 2 Linked to the Set Task State, activated when the enemy dies (condition = `!alive e1)
Set Task State linked to the create task, make sure to set it to the complete (tick) icon in the module
This discussion has nothing to do with scripting anymore. Take it to #arma3_editor
Ok thx
Hey there it's me again. I have another problem:
I am currently creating a conquest mission and I want the Sector Tactics Module to also "command" AI spawned via script. I've tried to synchronize them with ```sqf
{_x synchronizeObjectsAdd ["var_SPAWN_AI_MODULE"]}forEach units _group;
and also with ```sqf
{_x synchronizeObjectsAdd ["var_SECTOR_TACTICS_MODULE"]}forEach units _group;
but none of them worked. They refuse to move.
That's not an object
well... synchronizeObjectsAdd expects an array of objects as the second argument
You're providing an array of strings right now
_module synchronizeObjectsAdd units _group is probably what you want
(replace _module with your module var)
wiki doesnt say anything about a group for the command
(replace _module with your module var)
@robust hollow those vars were only for the purpose of showing hehe
Okay so this will probably sync the whole group the module right?
also, do I need to sync them to the Spawn AI Module or with the Sector Tactics Module?
Whats the script to make 1 task wait for another one to be completed first?
what kind of task?
First one i just walk into the trigger, then the second kill a certain guy
So the guy has to dead before the first task is completed?
No. First one is a go here, then the second activates when i walk into it. They’re both in the same house, but the guy is km away
Its doing what i want just nit picking really, i dont expext anyone to go to the back of the house to activate the second task trigger but they could
So you want the second one to appear after you've gone there right?
- Go to house.
- Go to second floor (or something)
?
No i just want to null the second trigger while im walking in it until the first one is complete
Change the completion code of the first trigger
For example, disable the second trigger in editor (uncheck Simulation)
Then, put this in the on Activation code of the first trigger:
trigger2 enableSimulationGlobal true
trigger2 is the name of the second trigger, of course
actually
I just noticed the the simulation checkbox doesn't show for triggers
You may have to do it manually
Hm I tried ```sqf
sector_tactic synchronizeObjectsAdd units _group;
//and
spawn_ai_blu synchronizeObjectsAdd units _group;
But they still don't move. Any other Ideas?
Dude, i can just make the trigger bigger to make it impossible for then to reach the 2nd one first lol
Dunno why i didnt think of that earlier
It doesnt matter of they overlap
I came across another issue tho. I want to creat a final 3rd take to go here for extraction after i kill the !alive guy. Whats a good way to set that up? I dunno where to put the 3rd trigger
*task
3rd task*
you have to create it dynamically (script it)
Ah dunno how
Yea I've read this before posting here, it only says that you can sync editor placed units to the SPAWN AI Module to include them to the manpower cap
It says the tactics module doesn't need syncing
Insert the Spawn AI: Sector Tactics module (Modules > Mics > Spawn AI: Sector Tactics). No synchronization needed
Yea the tactics module doesn't need to be synced with the spawn AI module
they are not synced in my mission
so why do you ask?
#arma3_scripting message
maybe the problem is somewhere else again. not the syncing
@amber inlet The scripts for tasks are here:
https://community.bistudio.com/wiki/Arma_3_Task_Framework
Thank you
@brave jewel How did you define the sectors? using that guide?
Sector Control Module -synced with- Sector Module -synced with- Area GL -synced with- trigger (for area size)
of course the Sector Control Module is synced with each faction
If you use the spawn AI module, do the AI move?
Well, the thing is: I do not use the Spawn AI Module to spawn AI, but infact I need it for the Sector Tactics Module to work
If I only use the Sector Tactic Module it gives me an error
I'd say it's better to test it to make sure that your scenario works before trying to fix that problem (maybe your scenario is set up wrong)
@amber inlet For extraction you can check out:
#arma3_scripting message
and
#arma3_scripting message
there are better ways, but I think it works well enough for new comers.
@brave jewel According to this function: BIS_fnc_moduleSpawnAISectorTactic
The code runs only once
That's why it won't work afterwards
I will see if there's a workaround
Hmm, is there a way to "refresh" a module?
I guess it runs once everytime a group spawns through Spawn AI Module and runs only for their group
yes
I mean I could just write a whole new AI Movement Script, but why shouldn't I just use the sector tactics to go for this. Especially when new groups are spawned dynamically
@brave jewel I think I got it
Well I'm not finding anything 😂
How many of these spawnAI modules do you have?
Right now only one for BLUFOR
I am spawning the Group with ```sqf
_group = [getPos hpadblu, west, ["B_Soldier_TL_F", "B_Soldier_F", "B_soldier_AR_F", "B_soldier_LAT2_F","B_soldier_M_F","B_Soldier_SL_F","B_Soldier_F"]] call BIS_fnc_spawnGroup;
One thing you can try is:
[_group, _spawnAIModule, [0,0,0, count units _group, 0, "infantry"]] execVM "\A3\Modules_F_Heli\Misc\Functions\ModuleSpawnAISectorTactic\initGroup.sqf"
Not sure if it works, but that's the part that initializes the group so that the they could capture the sector
what are all those arguments for? 😮
Those number 0s I wasn't sure what they were. They could cause an error
Where or how did you find this?
what are all those arguments for? 😮
it's complicated
hahaha
Where or how did you find this?
I read the function that is executed by the module
ooh, and you got that from the game files?
yes
I guess that's a lot of work to get this out there
or use arma3p to setup a P drive with all Arma 3 content extracted
if you have some 60 GBs to throw away
I've created a display via cutRsc but it isn't listed in allDisplays, but the variable for the display returns the correct display I want. WUT DO
Leopard, I don't need ```sqf
spawn_ai_blu synchronizeObjectsAdd units _group;
rscs never register in allDisplays
Use the onLoad event handler
if you have some 60 GBs to throw away
34.2GB (including dub pbo's, which aren't needed at all)
Leopard, I don't need ```sqf
spawn_ai_blu synchronizeObjectsAdd units _group;
@brave jewel No
Omg it really worked
They are all moving to the nearest sector now
Now let's see if they move to the next sector after capturing this one
I don't have a module_heli_F pbo btw
It's in the heli folder
at least not in the /addons folder
oh
I'm dumb
Oh my god, you saved me so many hours or even days of work @little raptor ! Thank you so much to spend your time to look for questions people ask here! To all of you who spend their time to answer questions from other people on this discord, thank you from the depth of my heart! ❤️
But don't worry, I will come back tomorrow with another stupid question 😂
@little raptor How would I add eventHandlers to the cutRsc'd display? This no workie:
private _d=uiNamespace getVariable"R_RSCAFAR";
(uiNamespace getVariable"R_RSCAFAR")displayAddEventHandler["KeyDown",{systemChat"Boop";_block=false;if((_this#1)in(actionKeys'nextChannel'))then{_block=true;currentChannel call NextCH};_block}];```
wherever you made it
rsc displays dont take keyboard input
Technically it workie because the EH index goes up every time I add it but doesn't execute the code
it is an overlay, not interactive
cuts are shown on display 46 I think, so add the EH to that
you may also need to add an event to display 24 (chat display) while it is open
Well I've been using findDIsplay 46 for a while but the mission display is overwritten/paused when other displays/dialogs pop-up sometimes, such as the Dynamic Groups interface, which pauses all my EHs
My idea was to create a new display that won't get interrupted butttt if can't do that with cutRsc then poop.
mmm, yea, until there is an event for displays opening i'd say a repetitive check is the only reliable way to go

Which makes sense because you can only have one active display.
You should be able to create a dialog though on top of 46 and set EH's on that.
the issue is he cant always know which display has opened without some ugly loop
let's hope this gets implemented: https://feedback.bistudio.com/T154462
use onLoad on the Display or Control, set a variable in uiNamespace with the current display/control and reference that in your scripts 🤔
idd=23202320;
fadein=0;
fadeout=0;
duration=1e+011;
onLoad="uiNamespace setVariable['R_RSCAFAR',_this#0]";
onUnload="uiNamespace setVariable['R_RSCAFAR',nil]";
class Controls{};};```
I know it's doable, I'm just messing up somewhere
Muh brein
onUnload="uiNamespace setVariable['R_RSCAFAR',nil]";
When it closes, it becomes Null automatically, so no real need for a "clean up"
Every i use zeus control / open arsenal/ace arsenal, my camera is broke (https://cdn.discordapp.com/attachments/612046432295452673/769751361893564416/2020-10-25_03-33-34.mp4)
Camera ini:
cam = "camera" camCreate [0,0,0];
cam cameraEffect ["Internal", "Back", "camrtt"];
cam attachTo [this, [0,0.4,0.5]];
"camrtt" setPiPEffect [0];
addMissionEventHandler ["Draw3D", {
_dir =
(objCam selectionPosition [0,0,0])
vectorFromTo
(objCam selectionPosition [0,0,0]);
cam setVectorDirAndUp [
_dir,
_dir vectorCrossProduct [-(_dir select 1), _dir select 0, 0]
];
}];
TV ini:
this setObjectTexture [0, "#(argb,512,512,1)r2t(camrtt,1)"];
where is problem ?
@violet gull well... that is messing up because it is an rsclayer. yes if it is a mod you can go adding onload events to every display that might possibly open over display 46, but imo thats just as undesirable as a loop check, with more work 🤢
@trail smelt change the name of the r2t
for example:
cam cameraEffect ["Internal", "Back", "MY_camrtt"];
"MY_camrtt" setPiPEffect [0];
and also the name of your camera
MY_cam for example
Is there any particular issue within Arma that would be causing dead bodies to go partially or sometimes fully under the terrain?
the unit respawning tends to make the corpse sink underground, thats just the cleanup system though
Camera ini:
kamera = "camera" camCreate [0,0,0];
kamera cameraEffect ["Internal", "Back", "kamerartt"];
kamera attachTo [this, [0,0.4,0.5]];
"kamerartt" setPiPEffect [0];
addMissionEventHandler ["Draw3D", {
_dir =
(objCam selectionPosition [0,0,0])
vectorFromTo
(objCam selectionPosition [0,0,0]);
kamera setVectorDirAndUp [
_dir,
_dir vectorCrossProduct [-(_dir select 1), _dir select 0, 0]
];
}];
TV ini:
this setObjectTexture [0, "#(argb,512,512,1)r2t(kamerartt,1)"];
Ok i did it, but now this totally isn't work (now is only black screen from start mission..) :/
yea typo 😄 but still after use zeus control on ai/arsenal, screen set to black..(like video)
_dir =
(objCam selectionPosition [0,0,0])
vectorFromTo
(objCam selectionPosition [0,0,0]);
@trail smelt this part makes no sense. it's just a zero vector
Also it's selectionPosition
You have to provide a selection (string)
You can change it to vectorDir objCam
Also, you didn't change the name of your camera.
It's still called cam
kamera = "camera" camCreate [0,0,0];
kamera cameraEffect ["Internal", "Back", "kamerartt"];
kamera attachTo [this, [0,0.4,0.5]];
"kamerartt" setPiPEffect [0];
addMissionEventHandler ["Draw3D", {
_dir =
(kamera selectionPosition [0,0,0])
vectorFromTo
(kamera selectionPosition [0,0,0]);
kamera setVectorDirAndUp [
_dir,
_dir vectorCrossProduct [-(_dir select 1), _dir select 0, 0]
];
}];
I thing change it..
I have no idea, it's from the tutorial for setting up the camera it should be to determine the direction but it suits me without change
same things do UAV with live feed on screen from killzone kid tutorial..


