#arma3_scripting
1 messages · Page 56 of 1
_t = 0; _p = 0; _r = 90;
this setVectorDirAndUp [
[sin _t * cos _p, cos _t * cos _p, sin _p],
[[sin _r, -sin _p, cos _r * cos _p], -_t] call BIS_fnc_rotateVector2D ];
[this, ContainerHEMT] call BIS_fnc_attachToRelative;
all it does is just turn it
it doesnt attacj
youre able to drive the truck away from it?
not the first time, when i start the scenario its attached, but when i try to spawn it in again it doesnt attach
how are you spawning it in again
as a composition
thats because compositions dont save init text iirc
huh
when spawned from zeus (which i assume is how youre spawning it mid scenario)
but all my other compositions work
spawn it in 3den from the composition and tell me what the init says
tf is 3den... 🥺
the editor
ok now try it in zeus after youve saved it again
_t = 0; _p = 0; _r = 90;
this setVectorDirAndUp [
[sin _t * cos _p, cos _t * cos _p, sin _p],
[[sin _r, -sin _p, cos _r * cos _p], -_t] call BIS_fnc_rotateVector2D ];
[this, ContainerHEMT] call BIS_fnc_attachToRelative;
oh
i did, didnt work
its because ContainerHEMT is a global variable that isnt assigned to the one you spawn
duh pea brain kjw
private _truck = (getPosASL this) nearestObject "B_Truck_01_flatbed_F"; and then putting _truck instead of ContainerHEMT is a better approach
thats assuming that bit worked in the first place for you
(use getPosASL instead of getPos as getPos is position above highest surface beneath you)
still doesnt work, i dont know why
private _truck = (getPosASL this) nearestObject "B_Truck_01_flatbed_F";
_t = 0; _p = 0; _r = 90;
this setVectorDirAndUp [
[sin _t * cos _p, cos _t * cos _p, sin _p],
[[sin _r, -sin _p, cos _r * cos _p], -_t] call BIS_fnc_rotateVector2D ];
[this, _truck] call BIS_fnc_attachToRelative;
does that work from the editor
in the editor it just spawns it wherever, it only starts to do anything when i load the scenario
oh yes
have you actually saved it properly as a composition again
yes
spawn one from a composition and copy paste what is in the init here
private _truck = (getPosASL this) nearestObject "B_Truck_01_flatbed_F";
_t = 0; _p = 0; _r = 90;
this setVectorDirAndUp [
[sin _t * cos _p, cos _t * cos _p, sin _p],
[[sin _r, -sin _p, cos _r * cos _p], -_t] call BIS_fnc_rotateVector2D ];
[this, _truck] call BIS_fnc_attachToRelative;
im trying to apply a thing to an entire layer, is this the right way of doing it?
getMissionLayerEntities "UNSC Drake-Class Corvette" params ["_objects1"];
_objects1 apply { [_X, false, [3, -2, 2], 20] call ace_dragging_fnc_setDraggable; };
_objects1 apply { [_X, false, [0, 3, 1], 10] call ace_dragging_fnc_setCarryable; };
the thing im trying to apply to that entire layer:
[this_, false, [3, -2, 2], 20] call ace_dragging_fnc_setDraggable;
[this_, false, [0, 3, 1], 10] call ace_dragging_fnc_setCarryable;```
spawn one from a composition in the editor and see if that works when you load the mission
it does
so you have 2 hemtts spawned?
oh wait, now it also attaches when i spawn it from zeus. it just doesnt go to the spot i need it to be
no 1 HEMT, two planks
send a screenshot
I presume it's not working which is why you're asking?
it stays where i spawn it, it doesnt go a specific place
yeah it seems like it isnt. But I am not sure as the command itself has had mixed results thus far
what is the command and what are said mixed results
are you positioning it on the composition already
i dont think so, if you mean where i spawn it i just spawn it on the ground
no
in 3den does it look the same as it should when its spawned
Tested on malden, seems to work ok. Join-in-progress load time is about +20 seconds (about the same amount of time it took to execute). But when I tested on Altis it is significantly slower, and I mean it does each chunk slower, not just total time. Any idea why that is? Does the terrain grid have a higher "resolution"?
[this_, false, [3, -2, 2], 20] call ace_dragging_fnc_setDraggable;
[this_, false, [0, 3, 1], 10] call ace_dragging_fnc_setCarryable;
This is what I do to make objects un-carriable and un-draggable in ace. This has worked on my end when put into the init of an object, but when hosting a server, it seems local as other players see no effect from it. Therefore I intend to put it in a script and apply it to an entire layer at a time, as that way I dont need to repeat it like 100 times.
if I need to, I could remote-exec the script itself
However so far I am trying to get a functional script version of this that applies this_ as being an entire layer of objects
and thats where I now struggle
then why are you modifying the vectordirandup if its already in the right position
well malden is too small
Altis is both bigger and has many more objects
this is how its supposed to look in the end
because the plank spawns horizontally and i need it vertically
because thats not a variable
and youve positioned it like in that screenshot in 3den?
you mean "this_"?
yes
thats fine, I know
then why are you trying to use it in the function
no, ive done
this attachTo [getPos this nearestObject "B_Truck_01_flatbed_F", [-1.22, -0.7, -0.3]];
_t = 0; _p = 0; _r = 90;
this setVectorDirAndUp [
[sin _t * cos _p, cos _t * cos _p, sin _p],
[[sin _r, -sin _p, cos _r * cos _p], -_t] call BIS_fnc_rotateVector2D ];
to attach the planks to where they need to be once spawned
its the effect I intend to replicate, I instead do this:
getMissionLayerEntities "UNSC Drake-Class Corvette" params ["_objects1"];
_objects1 apply { [_X, false, [3, -2, 2], 20] call ace_dragging_fnc_setDraggable; };
_objects1 apply { [_X, false, [0, 3, 1], 10] call ace_dragging_fnc_setCarryable; };
This, is what isnt working
I dont use this_ here for obvius reasons
why not just position them in the composition and use the bis function??
I realize it's bigger lol. But that makes sense about the objects if there are more of them per square foot that it has to move...
because when i use the BIS it just stays where i spawn it and just attaches to the truck from there
and its not working insofar as its only doing it locally?
yes
so why not just position it properly in the first place in the composition?
I mean the heightmap too is bigger, not just terrain size
I'll just run it and send a screenshot
let me try that
I should say its part of a bigger script. But the other things are not an issue, I can assure that. This is at the end, and is the part that causes problems
my guess would be that it's because you're using _x and ace doesnt accommodate for that for some reason
but it should do 
does the same thing happen if you run the same code with this instead of _x in the init of an object?
not necessarily
still just spawns where i click and stays there
with what code
Display will init at uncertain time, findDisplay will not work on same or even next frame.
this is what I would run on a singular object.
[this_, false, [3, -2, 2], 20] call ace_dragging_fnc_setDraggable;
[this_, false, [0, 3, 1], 10] call ace_dragging_fnc_setCarryable;
I cant carry or drag objects in ace, but apparently others can. Therefore I belive its local
private _truck = (getPosASL this) nearestObject "B_Truck_01_flatbed_F";
_t = 0; _p = 0; _r = 90;
this setVectorDirAndUp [
[sin _t * cos _p, cos _t * cos _p, sin _p],
[[sin _r, -sin _p, cos _r * cos _p], -_t] call BIS_fnc_rotateVector2D ];
[this, _truck] call BIS_fnc_attachToRelative;
not this_
So, I guess I will have to tweak it some more to make the chunk size optimal for each map. Hopefully I can get the total execution time down to something reasonable (as well as JIP load time)...
dont use this_
get rid of the setvectordirandup bit
hm?
use this
right
not this_
would that fix the multiplayer issue?
nope, not really possible
it's already optimal
i have no idea what youre actually running as you seem to be flip flopping between this and _x
_x is what should be used with apply
_x is used on a script,
this_ is used in a object init
Maybe it's just a fluke that it executed faster when I had lower chunk sizes?
doesnt change anything
correct
so if its in an init use this if its not use _x
okay
did you save the composition properly
yes
because the planks wouldnt be on their side in zeus if you got rid of the vectordirandup part
so you tried a smaller chunk than 512 and it was faster?
they are on their side, they still just wont go to where to need to go
are they attached
if I change all the this_ to this, can I expect any actual improvement on my issues? as thus far ive not seen a difference between the 2 thises
yes
right so its a problem with zeus spawning
Yes, but then there is a trade-off with the JIP load time.
likely due to the fact zeus compositions try to spawn everything on the ground iirc
what
this_ isnt a variable
At any rate, ty for your help
discord is being really weird
is it constantly restarting?
no it just wouldnt let me write this_ for some reason
oh damn, my discord just decides to restart every minute
move the hemtt to 0,0,0 on the terrain and position the planks where you want them and take the plank coordinates
alright
then use
_myplank setPosASL (_truck modelToWorldWorld [thecoordinatesyougotbefore]);
//your attaching command here``` to position them properly with the zeus composition
x = -1.293 y = -0.619 z = 2.297
I have now changed the object init, can I expect it to now apply to other people, or is that not really relevant to that?
if its in the init of them all itll run every time a new client joints
i presume ace has a check for that meaning you shouldnt see any performance problems if theres shit tons of stuff
because regardless of it this_ was written improperly, it still applied to this
probably the _ after causing problems but it really shouldn't do
okay, beyond that
is there any known fix I may try for this? Or should I just look for more guides on how to turn these things off in ace online?
its a local function
gotcha
still nothing happing
but I dont intend to remoteexec every single object individually with this command
happening*
you just need to have it in init
that runs for every person when they join if its a call
ignore me before with performance issues i was thinking of remoteexec as ive been dealing with stupid people using that when they dont need to
alright, I will try to get to writing that then
this should already work
with what code
_myplank setPosASL (_truck modelToWorldWorld [-1.293, -0.619, 2.297]);
private _truck = (getPosASL this) nearestObject "B_Truck_01_flatbed_F";
[this, _truck] call BIS_fnc_attachToRelative;
alright
right
how do you expect that to work before you define _truck
do you have script errors turned off?
you make a good point
no, i got nothing though
you should've done 
yes thats because you didnt set the hemtt to be 0 height
wait no
3den measures height above terrain not sea level mb
one moment
no worries
ok take 5 from the z coordinate
should become -1.293, -0.619, -2.703
well im not 100% sure but i am pretty sure that the reason i can no longer see the plank is because its under the map
youre good
private _truck = (getPosASL this) nearestObject "B_Truck_01_flatbed_F";
this setPos (_truck modelToWorld [-1.293, -0.619, 2.297]);
[this, _truck] call BIS_fnc_attachToRelative;```
try that copy pasted
plank init
that trick should've been the trick 
try take like 1m off the coordinate height until you get something you like i have no idea why its not working and thats probably the simplest way
if you want to get the height properly you can put it over the pond in the top right and do the same trick there just for up and down
truck worldToModel getPosATL plank;
[plank, truck] call BIS_fnc_vectorDirAndUpRelative;
using this i should get the coords
getPos not getPosATL but on vr terrain makes no difference
but probably yes
im quite tired right now my own code isnt working properly even though it should be
[-1.21997,-0.699878,-0.308341]
[[4.09273e-012,1,-2.79397e-009],[1,4.09273e-012,-4.38325e-008]]
[-1.32996,-0.699879,-0.308341]
[[4.09273e-012,1,-2.79397e-009],[1,4.09273e-012,-4.38325e-008]]
[-1.42993,-0.69988,-0.308342]
[[4.09273e-012,1,-2.79397e-009],[1,4.09273e-012,-4.38325e-008]]
done it for all three planks
just to confirm truck isnt the box on the back of it right
yes!!! its the truck
bruh moment
oh my god
that'll be why it was being dumb
what
youre confusing me
hang on
sorry im tired
the HEMT is named "truck"and the three planks are named "plank1" "plank2" and "plank3"
systemChat "balls";
systemChat str (getPosASL this);
systemChat str (this modelToWorldWorld [0,0,0]);```
just *doesn't run* on the hemtt when in its init field 
do i just copy and paste?
the coordinates that you got yeah use those as setPos worldToModel (coordinates here) and vdirandup
needed a wait
for some reason it seems to return different z coordinates by 1.8m ❓
think I'm not understanding how models work or something there but in my head they should both be the same
https://www.dropbox.com/s/8zowojfq3v6etm5/altis.png?dl=0
In case somebody needs full 30720x30720 PNG Altis satellite texture
Needs some color correction first
I tried to magic wand select the water in photoshop but its so tiresome, often includes sandy beaches in it, can't do that properly manually
Might have to do per pixel height check in game and generate mask off that to color the water
Dont bother, generating mask from in-game height data will produce accurate result without manual labour.
Though I don't care anymore, abandoned the idea for its usage.
Also had an idea to use actual sat textures in game instead of assembling it outside of the game into a big texture.
It can. (with some loading times ofc).
But this is the issue that the wand has
Thats a road, a beach and the water.
It's very very faint to work out what is what from here.
and the wand regards it as one thing.
Yeah, its useless to do that manually, better to just generate a mask off actual height data
^Just reinforcing that, literally no point trying on that download!
But, if you want a map, without proper colours. its good.
https://www.dropbox.com/s/i50l8ltdqx84gyi/altis_colored.png?dl=0
Here is my previous color correction attempt, with sea also colored to map color, but shoreline is messed up.
Didn't bother to correct it with a proper heightmap mask.
ctrlSetScale on RscControlsGroup doesn't scale controls inside it 
Why isn't getMissionLayerEntities working
I'm using strings that are present in getMissionLayers and it's returning empty for every layer
To be used when the scenario is running, not in the editor workspace.
Good evening/morning/ afternoon everyone.
Particles created using particle emmiters have limitations?
I was wondering that since it looks like some particles behave weirdly when using billboard against spaceobject and viceversa, same when trying to apply colors to some of the particle types, it looks like some particles like sparks have force colorations?
probably locality, those are server only commands
Could someone help with the following addaction on an object, calling a script. Was working in MP in the editor:
if (local own) then { [this, ["Release Black K9",{execVM "scripts\BlackK9script.sqf";},nil,1.5,true,false,"","",3,false,""]] remoteExec ["addAction",0,this]; };
"own" is the name of my unit who id like to be able to call the addAction, only
Ah I see
It was returning [[],[]] inside the scenario too, must be the server thing
Awesome! Thank you for this
Alright question: you know how in the showcase mission for the Art DLC, a helicopter lands exactly in the middle of a smoke grenade, and doesnt take off immediately?
How do I do that? Because AI will instantly take off after landing on smoke for some reason
class CfgSentences
{
class ConversationsAtBase
{
class Briefing
{
file = "brief.bikb";
#include "brief.bikb"
};
};
class ConversationsAtObjective
{
class Complete
{
file = "objective1.bikb";
#include "objective1.bikb"
};
};
class ConversationsAtObjective2
{
class Complete2
{
file = "objective2.bikb";
#include "objective2.bikb"
};
};
class VisualContact
{
class SquadChatter
{
file = "eyesoncamp1.bikb";
#include "eyesoncamp1.bikb"
};
};
};
Can any body possibly tell me why this wouldn't work? when i go to activate the third script under squadchatter, i get a no entry cfgsentences SquadChatter error. Been pulling my hair out, its just the same as the top portion but extended i thought correctly.
After spawning the crew of a vehicle, how can I set their audibleCoef and camouflageCoef?
Never mind, it's working now.
[] spawn {
TestCam = "camera" camCreate [1494.88,5775.99,1.594];
TestCam cameraEffect ['Internal', 'Back', 'ui2t_r2t_test'];
laptop setObjectTextureGlobal [0,'#(rgb,1024,1024,1)ui("RscDisplayEmpty","ui2t_display_test")'];
sleep 5;
with uiNamespace do {
_display = (findDisplay "ui2t_display_test");
_picture = _display ctrlCreate ["RscPicture", 1201];
_picture ctrlSetText "#(argb,512,512,1)r2t(ui2t_r2t_test,1)";
_picture ctrlSetPosition [0.27852 * safezoneW + safezoneX, 0.357 * safezoneH + safezoneY, 0.309042 * safezoneW, 0.341 * safezoneH];
_picture ctrlEnable false;
_picture ctrlCommit 0;
displayUpdate _display;
};
};
Tried this one, (findDisplay "ui2t_display_test"); returns Display #-1, still can't see the RscPicture on the UI to Texture.
Does Display #-1 mean I can't edit it? not really sure(findDisplay "ui2t_display_test") displayCtrl 1201 returns Control #1201
You need to update the display twice, looks ui2texture display updates before camera make r2t texture.
Basically:
ui2texture triggers r2t render, but this happens after ui2texture already finished drawing the display
Twice as in again on next frame
I'm trying to save unit loadout to config but I don't know which syntax is allowed. then I ended up something weird, the config variable is without quotes but it can still be read as string (getText). I mean this: ```startingLoadoutWest = [[],[],[],["U_B_HeliPilotCoveralls",[["FirstAidKit",1]]],["V_DeckCrew_yellow_F",[]],[],"H_HelmetCrew_B","",[],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch",""]];
[] spawn {
TestCam = "camera" camCreate [1494.88,5775.99,1.594];
TestCam cameraEffect ['Internal', 'Back', 'ui2t_r2t_test'];
laptop setObjectTextureGlobal [0,'#(rgb,1024,1024,1)ui("RscDisplayEmpty","ui2t_display_test")'];
sleep 5;
with uiNamespace do {
_display = (findDisplay "ui2t_display_test");
_picture = _display ctrlCreate ["RscPicture", 1201];
_picture ctrlSetText "#(argb,512,512,1)r2t(ui2t_r2t_test,1)";
_picture ctrlSetPosition [0.27852 * safezoneW + safezoneX, 0.357 * safezoneH + safezoneY, 0.309042 * safezoneW, 0.341 * safezoneH];
_picture ctrlEnable false;
_picture ctrlCommit 0;
_test = _display ctrlCreate ["RscText", -1];
_test ctrlSetPosition [0,0,1,1];
_test ctrlSetFontHeight 0.1;
_test ctrlSetText "It works!";
_test ctrlCommit 0;
displayUpdate _display;
onEachFrame {
displayUpdate (findDisplay "ui2t_display_test");
onEachFrame {};
};
};
};
Modified your script
If you'll remove that onEachFrame bit, you'll only see "It works" text
Alternatively you can try display that r2t somewhere on UI so texture loads, then by the time ui2texture display renders the texture is ready
ui2textures are pain in the ass to use unfortunately
Full laptop screen for u2t is [0,0,883/1024,1] btw
ill let you guys do the r&d and ill come in the 2nd wave once u know what works and whats broken 😂
Already spent this whole week tinkering with it, ended up scrapping most of it
jks i probably wont use ui texture ever
does it work on control objects, like ctrlmodel
Didn't try, I bet it does
you are trying a pretty gimmicky thing though, like a map on a billboard. something simpler like a menu on a billboard would probably be less glitchy
a simple text box vs a map control
You likely can render any complex UI into a texture and then have it inside control object, iirc controls inside objects were very limited in how they work.
if i try anything, it will be to first put the escape menu onto a texture
Now control object only has to display RscPicture which draws ui2texture texture
You can make modern shooters 3D UIs, have it wiggle as you run, etc.
actually i need to learn how to script “wiggle”
i have a 3d model on screen but it looks 2d cause no wiggle
Have it move a bit with camera movement or rotation
Take velocity or position delta distance, % modulo it and then feed into sin for a smoother movement, something like that
How can i spawn a flying object at a certain height (800m) via script?
createVehicle
Thanks, I am trying to spawn it 800m above the player
so you are saying if I display it on the player's UI then later display on ui2texture it should work?
that's really weird
so you are telling me you found this fix by trial and error or you already knew the behaviour beforehand? (just curious)
also I should not forget to thank you
Both expecting how engine works and trial and error
ui2texture requires plenty of preloading and frame by frame fuckery to work reliably
damn and I just thought I would use ui to texture to revolutionise my scripts
Make a function that preloads images by demand, have some control outside of visible screen and set pictures that you want to preload there
so is the sleep needed here?
Some kind of delay is needed
That u2t display only inits after the engine tries to render the texture, which happens after unknown amount of frames after you set the u2t texture.
What I mean by unknown is that if you set it to an object that's outside of your view distance, display won't init until your camera is close enough so object tries to draw that procedural texture
Solution: Make your own display which calls your function with onLoad event handler.
So you don't have to sleep or guess anything
Sending arguments into u2t displays can be done through global variables
description.ext:
class MyU2T {
onLoad = "call myUI2TextureOnLoadFunction";
...
}
```Scripts:
```sqf
myUI2TextureOnLoadFunction = {
params ["_display"];
private _my_name = displayUniqueName _display; //Will be ui2t_display_test in your case
};
There is a bug with u2t always rendering in 1:1 regardless of actual texture resolution, you'll need to have ui2texture inside ui2texture to overcome that
This is going to need more frame by frame and preloading mess because inner u2t displays try to access non-0 mipmaps of textures displayed in them for some reason
now I'm scared of using u2t
This is my ticket regarding mipmaps, repro can be used as an example of how to bypass non-1:1 aspect ratio limitation by using u2t inside u2t
The general fix for mipmap errors is to preload all textures on UI beforehand
the function doesn't seem to do anything to help initialise u2t?
Probably I'm not understanding how calling this function can cause the engine to initialise the u2t?
- You apply your u2t somewhere
- Once engine decides to draw it (after unknown amount of time), it will create display and call this event handler
You don't have to sleep or check if each frame
Then from there you can work with controls inside u2t display
Still struggling to spawn an object 800m above the player. This is the code I have so far:
hawkeye = createVehicle ["B_UAV_02_dynamicLoadout_F", getPosWorld player, [], 0, "FLY"];
_grp = createVehicleCrew hawkeye;
_wp = _grp addwaypoint [getPosWorld player, -1];
_wp setWaypointType "LOITER";
_wp setWaypointLoiterRadius 50;
But how can I set the heights above the player?
(getPosWorld player) vectorAdd [0,0,800]
Note that the "FLY" mode creates the vehicle at a default height. You should instead use the "NONE" or "CAN_COLLIDE" mode, and give the vehicle a starting speed boost with setVelocity.
Works perfect. Tyvm!
Thanks for the comprehensive answers! Thought my problem with u2t will fall flat but you came along.
#arma3_scripting message anyone? just trying to figure the proper syntax here
Man I hate Remoteexec... can someone help me figure out what's wrong with
["dropships1", true, 0] remoteExec ["playsound", 0];```
that runs the sound on server too which isnt good
well currently it doesn't run the sound at all
ATM I am the server so I need it to play to the server so I can test it first, then I'll run it on -2
yes, I can get it running using just playsound but something in how I've written it there seems to be busting it...
I needed an extra set of Brackets, found it.
[["dropships1", true, 0]] remoteExec ["playsound", 0];```
Man remoteexec gives me a headache
It's because remoteExec is [leftArg,rightArg], and for playSound you need to send just the right argument, which is an array itself. Your first try was being interpreted as [leftArg,rightArg,thirdArg], which doesn't make any sense.
Ahhhh ok. I get it now. Thanks
Couldn't understand your question
just trying to figure what is valid syntax for strings in config
key = "value";?
yes
key = "value ""quotes"" string";
i had problem putting str (getunitloadout player) in to the config
so i did (str (getunitloadout player)) regexReplace ['"', "'"]
to get a proper string
oh
str getUnitLoadout player:
[["arifle_MX_GL_F","","","",["30Rnd_65x39_caseless_mag",30],["3Rnd_HE_Grenade_shell",3],""],...
````str str getUnitLoadout player`:
"[[""arifle_MX_GL_F"","""","""","""",[""30Rnd_65x39_caseless_mag"",30],[""3Rnd_HE_Grenade_shell"",3],""""],..."
that's a lot of quotes 😯
i think I prefer this for now "[['arifle_MXC_F','','','',['30Rnd_65x39_caseless_mag',30],[],''],[],['hgun_P07_F','','','',['16Rnd_9x21_Mag',16],[],''],['U_B_CombatUniform_mcam_vest',[['FirstAidKit',1],['30Rnd_65x39_caseless_mag',2,30],['Chemlight_green',1,1]]],['V_BandollierB_rgr',[['30Rnd_65x39_caseless_mag',3,30],['16Rnd_9x21_Mag',2,16],['HandGrenade',2,1],['SmokeShell',1,1],['SmokeShellGreen',1,1],['Chemlight_green',1,1]]],[],'H_HelmetCrew_B','',[],['ItemMap','','ItemRadio','ItemCompass','ItemWatch','NVGoggles']]"
Will work until you'll have some string with ' in it
Just let the engine handle it
I don't think item classnames can have ' in them
hmm well its for loadouts only
They don't, but maybe he'll store some other data like procedural texture using same method
Well, up to you
what was interesting to me (dont know if its feature or not) was that this formed a valid string: startingLoadoutWest = [[],[],[],["U_B_HeliPilotCoveralls",[["FirstAidKit",1]]],["V_DeckCrew_yellow_F",[]],[],"H_HelmetCrew_B","",[],["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch",""]];
notice there is no start or end quotes
Formed where?
Where do you output your config to?
the debug console..
What did you execute there?
just getText
Strings always appear with quotes in debug console output, you probably did something else
dunno this is what I did ```loadouttest = [["arifle_MX_ACO_pointer_F","","acc_pointer_IR","optic_Aco",["30Rnd_65x39_caseless_mag",30],[],""],[],["hgun_P07_F","","","",["16Rnd_9x21_Mag",16],[],""],["U_B_CombatUniform_mcam_tshirt",[["FirstAidKit",1],["30Rnd_65x39_caseless_mag",2,30],["Chemlight_green",1,1]]],["V_Chestrig_rgr",[["30Rnd_65x39_caseless_mag",5,30],["16Rnd_9x21_Mag",2,16],["HandGrenade",2,1],["B_IR_Grenade",2,1],["SmokeShell",1,1],["SmokeShellGreen",1,1],["Chemlight_green",1,1]]],["B_Carryall_mcamo_AAA",[["Titan_AA",3,1]]],"H_HelmetB_light","",["Rangefinder","","","",[],[],""],["ItemMap","","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]];
in console: player setunitloadout (parsesimplearray (gettext (missionconfigfile >> "loadouttest")))
doesn't setUnitLoadout take config?
this is… not config array
Syntax 1 of setUnitLoadout takes an array. Syntax 3 takes config classname from CfgVehicles, Syntax 4 takes config 
That's kind of a weird way of putting it into config though. Normally you'd lay it out as a class loadouttest { ... structure, rather than that variable-style loadouttest = [array]. I'm sort of surprised it (apparently) works.
Yes but why do this, when you could use the much more readable actual config class structure and not need to worry about all this getText stuff
you mean for the setUnitLoadout ?
I mean put your loadout information into the config class structure described here: https://community.bistudio.com/wiki/setUnitLoadout and then you can just do player setUnitLoadout (missionConfigFile >> "loadouttest")
linking non-standard optics, for example, doesn't look easy with setUnitLoadout config 
right. its because I prefer the copy-paste solution. putting it in class maybe tricky to some modders
tanking the operation's perf and disallowing other systems from accessing a somewhat known data structure
(and potentially breaking your description.ext in the process, mind you)
The easiest way is just recording the movement all the way up to take off
See BIS_fnc_unitCapture
No
getPosASL uses the land contact pos
ah -- i assume in the model the suspension or something means the hemtt is further up?
[0,0,0] is the center of the model
Obviously the land contact of land vehicles is their wheels (if they're upright ofc)
Which is below the center
oh i thought the center referred to erm
the icon bit in 3den
dont know why
probably my half past midnight brain
IIRC If you use the 2 or 3 gadget it does use the center
Press 2 or 3 
Yes
any ideas on how to slow down each for a certain job explicitly created vehicle, on entering a specific location, without much boilerplate, anyone?
Question's a bit unclear; what exactly are you trying to achieve?
Basically this (not tested yet, but you might get the idea)...
FDM_scheduleRegularSpeedlimitCheckAtLocationForVehicle = {
params["_vehicle", "_locationReferencePoint" /*OR JUST LOCATION DATATYPE??*/, "_validDistance", "_speedLimit"];
Discard = [] call FDM_fnc_increaseSpawnedWorkerthreadsCounterValue;
while { !isNull _vehicle } do {
Sleep 5;
_vehicle limitSpeed -1;
if (_vehicle distance _locationReferencePoint < _validDistance) then {
_vehicle limitSpeed _speedLimit;
}
};
Discard = [] call FDM_fnc_decreaseSpawnedWorkerthreadsCounterValue;
FDM_Output = true;
FDM_Output
};
...which would be spawned along with each created vehicle, the vehicle has to pass n Checkpoints that could be anywhere on the map. This function posted here checks for 1 and only 1 location which is fine to me right now. However, I am seeking to avoid this kind of solution because of several motivations, like keeping spawned (custom) continous logic at the possible bare minimum.
I am fairly unexperienced with SQF itself, so any other idea on a solution that might be better than this did not come up to me yet...
for your information, Discard = [] call: Discard = is useless and can be removed
daft question but should call not be used with compile inside of it?
nvm i found out the answer straight after you just dont use curly braces
How would I go around to attaching the turret of FV-720 Mora to the hull of a Marshall? I managed to remove the turret from the marshall but I dont know how to remove the hull from the Mora
You can't really
At first glance, sure, but this is because I in principal like to avoid writing functions that do not return anything, so I just keep this as a placeholder in case I want to be reported about the ending of a function if otherwise it would just end up quiet. So I try to make sure each of my functions returns at least a boolean, some of them gets "discarded" for now, until I really want to know. Overall that's the idea.
You might be able to hide the textures for the hull and tracks with setObjectTexture (assuming none of them are shared with turret bits) but it'll still be there, just invisible
Right, but whatever it returns will be automatically discarded if you just don't save it to a variable. You don't need discard = to discard it, the game will do it for you.
Yes you are right, it's just a habit from other languages.
How do people make these compositions then? They just hide the hull via the texture method you mentioned?
https://steamcommunity.com/sharedfiles/filedetails/?id=2890078244&searchtext=
I am a peasant, peasants like habits. At least they say so.
They hide the hull by making the textures invisible, and it works out OK because the Rhino hull is about the same size as the Marshall hull, so it's close enough to completely inside it. (You can see the shadows on the sides where it clips through a little bit) The Mora hull, I think, is slightly wider, so you'll have those bits of Mora hull hanging out the sides where they can be shot or bump into things. You can check the size to be sure, though.
setObjectScale and have a tiny turret 
multiple tiny turrets
and create a landship
tiny gun somehow still firing 120mm shells
I really need to learn some scripting because I love creating compositions
step 1 of learning to script is learn how to read the wiki
Isn't that the truth. I always struggle to figure out what to look at when people link me stuff
I understand you are wondering about this. Any ideas on the problem domain though?
I am pointing at you because I remember you had a good idea in the past already 🙂
How about writing custom events, is that even possible?
scripted event handlers exist yes
https://community.bistudio.com/wiki/Arma_3:_Scripted_Event_Handlers
for worldToModel to later be used to modelToWorldWorld I should be using ASL position in the first instance right?
oh im having pea brain it should be setposworld
but thats also not solving my problems 
And the events themselves?
_createdObject setPosWorld (_shipHelperObject modelToWorldWorld (getArray (_partsConfigPath >> _iteratedClass >> _x >> "position"))); //Set object position.
where position is attained from_shipHelperObject worldToModel ASLtoAGL getPosASL _createdObject 
what about them
^
Would you show me the part where it tells how to create own custom events?
[missionNamespace, "myfancyeventname", {systemChat "hi everyone";}] call BIS_fnc_addScriptedEventHandler;
[missionNamespace, "myfancyeventname", [myarguments]] call BIS_fnc_callScriptedEventHandler;
//systemchats hi everyone
dont need to use missionnamespace either
What do you mean exactly by "myfancyeventname" ?
the name of your event
like the default bi ones
"Fired" and so on
just prefix them with your tag
so "maxron_blewselfup"
How do I create one like "Fired" and register it?
the first function
you dont need to "create" one you just call one with a name
so (it doesnt) but in the backend the game will have
[missionNamespace, "Fired", [/*whatever the args are*/]] call BIS_fnc_callScriptedEventHandler;
for all intents and purposes
and that will make all the added event handlers of type "Fired" run their code
you can't have a "onUnitPutLeftFootDown" out of the box
you can script an event and trigger it, yourself, on your conditions ↑
I am afraid I don't get it. Can you show me an example please?
so if i want to do something and then have an event that happens when that thing is done it'd be something like erm
player action ["SwitchWeapon", player, player, 299];
[missionNamespace, "KJW_SwitchedWeapon", [myarguments]] call BIS_fnc_callScriptedEventHandler;```
and then elsewhere in an object's init
```sqf
[this, "KJW_SwitchedWeapon", {this setDamage 1;}] call BIS_fnc_addScriptedEventHandler;```
BIS_fnc_addScriptedEventHandler creates a "listener", which listens for mentions of the name you give the event.
BIS_fnc_callScriptedEventHandler is what you use to mention the event and activate the listener.
So when the first bit of code is ran the bit in the added handler will run
all adding an event handler really does is just shove the code into a list of executions to get ran when the event happens
This is why I ask people to elaborate on their intent, tends to lead to better feedback :p
Understood, thank you everyone.
Only that's the exact same way of logic to handle my outlined problem I outlined already. Any further ideas much appreciated.
what is the problem
To reduce code
what
while { !isNull _vehicle } do {
Sleep 5;
_vehicle limitSpeed -1;
if (_vehicle distance _locationReferencePoint < _validDistance) then {
_vehicle limitSpeed _speedLimit;
}
};
My basic question was if there is a better builtin solution or not?
erm
trigger areas?
_x limitSpeed -1 in a foreach of all vehicles in thislist
Only at runtime spawned vehicles and of them only specific ones.
set variable -> check variable
{
if (_x getVariable ["MySpecialCarVariable", "Default"] isEqualTo "butts") then {
_x limitSpeed -1;
else {
systemChat "something";
};
} forEach /*your array of things here*/```
Is there a way to reduce opacity when using this setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0.3,0.3,0.3,0.1)"]; ?
I know the "0.1" stands for opacity, but it doesn't seem to be working. Changing the value simply makes the colour darker or lighter, not more or less opaque. A higher value makes it white, a lower value makes it black. How could I reduce the opacity to let more of the original texture show through?
rgba not rgb
Doesnt seem to work
It just removes the color and keeps the original texture
while on another vehicle it says couldn't load texture
I'm just using vanilla quad bike and a zamak
then probably isnt set up for transparency
where Do I execute the "setTimeMultiplier" command while in game?
ah ight
is this correct "setTimeMultiplier 2" but i did "local exec" and its not workign for some reason
look at your watch
k will do
time has been stopped this is good i think but lemme see will the Ai move or do stuff cuz thats what im trying to stop
ye ai still moves around and does stuff
k i figured it out
ty for help
Yeah, not really going to stop the AI. Though I'm wondering if you can mass enableSimulation pause and unpause the AI without issues...
would make the zeus spawned units have simulation unless you ran it frequently
which erm
dont
setTimeMultiplier won't slow down / pause the game btw
it will change how time is processed (as in 2 = days of 12 hours, 0.5 = days of 48h, etc)
you could "pause" game in MP withsqf { _x enableSimulationGlobal false } forEach (call BIS_fnc_listPlayers); and "unpause" with```sqf
{ _x enableSimulationGlobal true } forEach (call BIS_fnc_listPlayers);
allUnits no?
would also freeze HC and perhaps Zeus, so I'd rather not
hmm
HC is an agent isnt it?
headless client
if not just a simple hasinterface check
also don't forget virtual slots like spectator
i dont believe in those
amma make you 🔨
real people avoid war, unless it is in game
sidenote:
private _thisisaposition = logichelper worldToModel ASLToAGL getPosASL rayshield;
private _thisisanotherposition = logichelper modelToWorldWorld _thisisaposition;
private _thisistheproperposition = getPosASL rayshield;
[_thisisaposition, _thisisanotherposition, _thisistheproperposition]``` returns an array with the last two positions being the same. that's good. however when i take the first array and put it into a config and then use
```sqf
_createdObject setPosASL (_shipHelperObject modelToWorldWorld (getArray (_partsConfigPath >> _iteratedClass >> _x >> "position")));```
inside a foreach of config classes (basically just creates an object and sets it to that position), it puts it on a completely random arse position relative to the model
i will not be responding as politics are not permitted in this discord
he's avoided my trap… he's good
position[] = {132.993,86.5781,-41.131}; //Model coordinates in ASL. object worldToModel getPosASL thisobject. and systemchat confirms it
confirmed that the vectordirandup and so on of the spawned model is identical to the one that i did even though that shouldnt matter and it is
worldToModelVisual perhaps, but especially you worldToModel an AGL pos
make temp vars when in doubt
wait, no
that is ok
OK, my attention span is below 10s now.
its very confusing I've 0 clue why it's doing this 
//Model coordinates in ASL. object worldToModel getPosASL thisobject
```yeah that's not that
(also your transparency s****s 😛)
object worldToModel getPosASL
where worldToModel takes AGL
its asl in my head!
yeah i used the first value from this array
I found this interesting command from a composition.
[this,[0,"\a3\supplies_f_enoch\ammoboxes\data\ammobox_eaf_co.paa"]] remoteExec ["setObjectTexture",0,this];
This makes the respective vehicle a greenish color with some texture to it.
I assume that this command works much like the color-changing command I mentioned above, but instead of a color, it uses the texture of an item, specifically an ammo box.
Is there a way I could find the name of such textures to apply them to other vehicles? It seems like a great idea to bypass the flat aesthetic of using RGB, since textures come with, well, texture (dirt, scratches etc).
so ignore that note im using logichelper worldToModel (ASLToAGL (getPosASL rayshield))
I feel like you should be using some () even if the actual order of operations works fine, just to make this human-readable
is that better
make
temp
vars
and debug them to check the difference
i have
its the same
its getting the right array from the config -> its applying it to the right model -> its doing the wrong thing
then IDK, your system is cursed and you should play Squad
How can I get the texture path of an object? (not vehicle)
but not even by the correct amount 
through script
getArray (configFile >> "CfgVehicles" >> yourobjectclassnamehere >> "hiddenSelectionsTextures");
oh yeah i forgot that exists
I have no idea how to apply this
the wiki is like reading alien language
debug console it assuming you want to note down the paths
or just use config viewer if you dont want to script
you have a find in config viewer button appear on everything you right click in 3den 
getObjectTextures Box_T_East_Ammo_F is what I typed... doesnt seem to do anything
thats the classname not the variable name
private _alpha = logichelper worldToModel ASLToAGL getPosASL rayshield;
private _bravo = logichelper modelToWorldWorld _alpha;
private _charlie = getPosASL rayshield;
private _delta = (logichelper modelToWorldWorld (getArray (configFile >> "CfgKJWCapitalShips" >> "Venator" >> "shipParts" >> "weakPoints" >> "sideShield" >> "position")));
[_alpha, _bravo, _charlie, _delta]``` returns `[[132.993,86.5781,-41.131],[4525.25,1123.88,77.119],[4525.25,1123.88,77.119],[4525.25,1123.88,77.119]]`.
`logichelper` is replaced with a vehicle of the exact same class with the exact same vectordirandup and position asl 
_yournoncasedvariablesarehardtoread
i'll change them to single letter ones in a moment
in Eden:
- place a player
- place an ammo crate in Eden, name it "myBox"
- start the game
- pause, type in the debug console ```sqf
getObjectTextures myBox;
- the result should appear below the input
I am entirely immune to any sarcasm or joke on this very serious topic
https://community.bistudio.com/wiki/Code_Best_Practices
grrrrrr 👀
there is that better for you lou
Yeah idk what I did wrong. I got the texture path but when I apply it, its completely black
But the writing / other details of the texture are there
so it was applied
show what youre trying to apply
^
I need to upload pics to a website and send links
No way I've been sending links for like more than a year
I am getting the texture of this
And trying to apply it to this
fucking discord update
why do you think that will work
of course it wont
thats not how textures work
Because I have a composition from steam which does the exact same thing successfully
for "_i" from 0 to 3 do
{
[this,[_i,"\a3\supplies_f_enoch\ammoboxes\data\ammobox_eaf_co.paa"]] remoteExec ["setObjectTexture",0,this];
};
yeah
its a different box with a different texture on a different vehicle
(And sets the texture quite poorly)
Still better than nothing
I am trying to modify texture / colour of a bunch of vehicles
to create a faction
Applying a texture seems to be the more detailed option, while using RGB gives a very flat result
alternatively you can use the uiontexture bits added in 2.12 to recolour tetures iirc
this is RGB
The thing is I want to make it a composition instead of a mod, so changing the actual textures is something im trying to avoid
Since I am trying to keep it fully vanilla
what you are trying to do is not possible aside from uiontexture stuff
I just wish I could use RGBA instead of RGB. It would solve everything
all I need is to let some of the original texture show through for detail
Which part?
the linked part i sent you
Cause this is what I was already using
UI on Texture?
yes that is the part i sent you
on the texture
whats a UI display
that is a colour
Which part
the rgb bit
Yea but where do you set the values?
The numbers after rgb i believe
setObjectTexture
thats resolution
This doesnt seem to preserve the details of the other texture
yeah because its not translucent 
use a translucent ui element and you can change the colours of it
I've got no clue how to do that or what to even type
I am parallel with programming or scripting
what even is a translucent ui element
and where do I find it
well how
Yea idk, this is beyond me
like i said, the best way is properly retexturing them
I need to install like 2 or 3 new programs just to change a texture
_myobj setObjectTexture [0, "#(rgb,1,1,1)text(0,0,""Caveat"",0.3,""#13534018"",""#ff0000"","""")"];```
use the wiki example for text on texture
Do I copy paste this into init?
no you use this not _myobj in an init
don't you think that's A LITTLE too much?
probably
@spiral sundial don't use that.
This looks the exact same as RGB command I was already using just more complex to write
do use that its the only way to accomplish what he wants to how he wants to
what have you written in the init
This, except I replaced myobj with this
no copy paste everything in the init of that
that is everything though isnt it?
this setObjectTexture [0, "#(rgb,1,1,1)text(0,0,""Caveat"",0.3,""#13534018"",""#ff0000"","""")"];
Actually no my bad
without the _
just "this"
clearly youre retexturing that from elsewhere then if its actually applying
_this doesnt work in object init
only this
Yeah, thats what I am using
Just changed it for a test when I sent this
This image was using this
try it on the black wasp
same thing as on the quad
no thats preserving the texture underneath
have fun
anything to procrastinate from my broken model coordinates lou
Its not preserving the details
like dirt, screws etc
which is what I was talking about
it is
Its just a flat colour
It's not preserving the texture underneath. setObjectTexture completely replaces the existing texture.
The details you're seeing there are from the secondary texture used to fake 3D stuff on a flat surface.
Yea its quite the difference
I tried with the previous RGB command at the start, but it seems it didn't want to work
Unfortunately it's not possible to preserve the dirt/etc on most vanilla textures because they're not a separate layer, they're baked into the main texture, which setObjectTexture completely replaces. Some mod/CDLC assets have them as a separate overlay, but vanilla has never used that method.
quaddie setObjectTexture [0, "#(rgb,8,8,3)color(1,0,0,0.1)"]; accomplishes this
but yes what nikko said
i did tell you this is the worst way to do it
This is what I was using at the start
and thats the command I changed "rgb" to "rgba" in
unsuccessfully
yeah you dont
quad bike doesnt support transparency in the texture
most if not all vanilla vehicles are the same
i want my model coordinates to work!!!
It's called a normal map. It creates fake bumps in a surface that can catch light and induce shadows, without having to add complexity to the model itself. It only affects lighting and can't be used for colour and real textures.
im torturing myself
oh that is what a normal map is
TIL
You're also torturing other people by not turning off ping on reply
is there an abnormal map? 
there needs to be a default setting
i have however made some progress
i realised i can just get the model coordinates after its spawned and just ignore the fact it doesnt work how it should do
-132.993,-40.631,86.0781 -- with new method
132.993,86.5781,-41.131 -- with old method 
despite this
the only difference is the method at which theyre both spawned one is at runtime and the other is createVehicle then setposasl
guess im creating an export coordinates function
Interesting...
I tried the RGB values 0.119, 0.119, 0.95
In a photo editing software, its a sandy color. In arma 3 its a light indigo color
🤨
Oh I see why
0.95
should be 0.095
works, doesn't actually fix my code and means I have to remember to export the coordinates differently but whatever
[X Y Z] vs [X Z Y] ?
It seems to be the case but it makes no sense to me 
like
they seemed to get flipped in MODEL space
HOW?!?!
But it's not 
I have honestly never been so befuddled and bemused
How can I get rid of this MG's stand?
does it have a hiddenselectionstexture for it
Probably
its a yes or no question
Well I dont know how to check
config viewer i told you
hiddenselectionstextures
Rightclick on object > view in config viewer > scroll the main panel until you get to H
This?
oh ok
It has two
ok what are their names
do what the error message is telling you about
Oh god why does it have parts of the machine gun also
Guess I'm removing the optic
Why are you doing this hacky sand-coloured texture on the quad bike when there's already a sand-coloured quad bike in the game?
Because I am recolouring multiple vehicles and it would look weird to have a quad bike with a different camo
consistency ig
god if there's one thing I really wish we'd got in Contact, it's a basic green skin for all the CSAT vehicles
mood
Iirc Real engine does add a woodland version to the vanilla factions
Is there a way to change the color of an object instead of a vehicle?
same - if they have selections, use them
otherwise no
Objects are just vehicles you can't drive
Well the command from vehicle doesnt work on object
then it probably doesnt allow retexturing for that selection
It does if the object has texture selections configured. This is also true of vehicles, it's just more common for vehicles to have selections.
config viewer is your friend
or I will just have a wooden post
God I wish I knew how to do modding
it would make things so much easier
than having to use tree trunks as machine gun posts
The config seems to take [X, Z, Y] ❓
I'm more than through with trying to debug this but it's really odd
The game can recognise it's from a config when it's like 3 variables later? 
I've also just made an export function that works fine without needing to flip anything around 
the game doesn't "recognise" anything, it reads, period
if you have v0 = 123, v1 = 456, v2 = 789 it doesn't care if it is XYZ or XZY, it just provides what it read there
it's just that the game code is written to use Z as the middle value and not the last as in SQF
basically - flip your values and you're good
i've got a function to export it for me it's chillin now
coolio
still dont quite understand as the coords were being exported in the same way but im just getting coords after the helper object has been created relative to that instead so
means i have to restart 3den for each object which is motivation to not put like 50 on them 🙂
can't read that sentence
all i did was get the coordinates after i had created the helper object
for some reason that works
but the helper object had the same position and vectordirandup as the one before
it also wasn't just flipped z and y it had negatives etc being messed with and so on -- entirely the wrong axis i think. nbd now, solved 🤷
does anyone know what this errmsg means? i already fixed line 283 and everything is fine but im still getting this msg
post the description.ext
did you reload the mission - and do you test in Eden singleplayer? 👀
there was a double , and i removed it, saved it and uploaded the mission again but still the same issue, i test in mp host
If you upload the thing then someone will probably spot the error within ten seconds.
I would guess an array that's missing a comma between entries but parsers often don't trip up at the point you'd expect.
the whole description.ext?
I'd recommend just pastebinning the lot as the error might not be close to the parser failure.
Often happens when you have a bracket mismatch.
okay
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
"faceSurvivor2Healthy",
"faceSurvivor2Injured"
"faceSurvivor2Stunned",
``` There's a missing `,` there (line 287 in pastebin)
It should be ```"faceSurvivor2Healthy",
"faceSurvivor2Injured",
"faceSurvivor2Stunned",
Np
Is there any difference between
missionNamespace setVariable ["myvarname", 10]; and
myvarname = 10;? 
No comment on the actual question but the former syntax gives you the flexibility to use dynamically named variables with format at least
Yeah reason I'm asking is default value of setVariable is pretty useful but wondering if using one over the other is a bad idea
Make a function that sets the variable 
KJW_CapitalShips_Ships = if (isNil KJW_CapitalShips_Ships) then {[]} else {KJW_CapitalShips_Ships}; 
Well, jokes aside, it sounds silly (and often is) but making everything your own function – and actually using those functions everywhere in the code – gives you a centralized point to change the core logic of the function if needed. Though, it's more useful with e.g. statically compiled languages because in that case your code editor/IDE starts nagging instantly if you change the function params' type or count. I have no idea what it does from performance's perspective in SQF if you compile the functions
i have no idea either it'd just be nicer to have
KJW_CapitalShips_Ships = missionNamespace getVariable ["KJW_CapitalShips_Ships",[]]; than that ugly conditional
but it doesnt sound like a good idea to me for some reason
I intended it a bit differently; like make a function with a short name that takes the *etVariable parameters as params and sets the variable. Again, I have no idea if it makes sense from performance's perspective; probably not 😄
Oh right -- it's just this one use of it so there's not much point in doing so. that one use of it also means its a really ugly line in my code and i like my code looking nice (contrary to what lou will tell you)
["yourVariable", 10] call KJW_setVar;
one function to make a single line of code look nicer 🤔
ive done worse things before
now this has to be the daftest question I've asked
how do you find what an EH has been added to from within the EH? I'm running _x addEventHandler [...] and unsure how on earth I would find what _x is within the code I'm running
yeah so all ehs pass the object theyre assigned to as a parameter 
Working on a quest framework in Intercept, all you have to do is define points of interest in the editor, then define init and helper functions that run at the start, and alongside the quest
mortar_men_1 doArtilleryFire [getmarkerpos "fire_1_1", "vn_mortar_m2_mag_wp_x8", 1];
mortar_men_2 doArtilleryFire [getmarkerpos "fire_1_2", "vn_mortar_m2_mag_wp_x8", 1];
mortar_men_1 doArtilleryFire [getmarkerpos "fire_1_3", "vn_mortar_m2_mag_wp_x8", 1];
mortar_men_2 doArtilleryFire [getmarkerpos "fire_1_4", "vn_mortar_m2_mag_wp_x8", 1];
sleep 30;
mortar_men_1 doArtilleryFire [getmarkerpos "fire_2_1", "vn_mortar_m2_mag_wp_x8", 1];
mortar_men_2 doArtilleryFire [getmarkerpos "fire_2_2", "vn_mortar_m2_mag_wp_x8", 1];
mortar_men_1 doArtilleryFire [getmarkerpos "fire_2_3", "vn_mortar_m2_mag_wp_x8", 1];
mortar_men_2 doArtilleryFire [getmarkerpos "fire_2_4", "vn_mortar_m2_mag_wp_x8", 1];
this stuff works but it will always throw an "suspending not allowed in this context. its an sqf execute with execVM by a trigger
so the second half wont be executed
ive read https://community.bistudio.com/wiki/sleephttps://community.bistudio.com/wiki/sleep https://community.bistudio.com/wiki/Scheduler#Unscheduled_Environment and there is states that a sqf executed by execVM is scheduled
any idea why this crashes the game sqf _group addEventHandler ["Fleeing", { params ["_group", "_fleeingNow"]; if !(_fleeingNow) exitWith {}; private _units = units _group; private _leader = leader _group; private _targets = []; _targets = _leader targets [true, 300]; private _outnumbered = false; if (count _targets > (count units _group)*2) then {_outnumbered = true;}; private _surrenderCandidates = []; if (_outnumbered) then {_surrenderCandidates = _units;} else { _surrenderCandidates = _units select { (alive _x) && !(captive _x) && !(lifeState _x isEqualTo "INCAPACITATED") && (fleeing _x) && (isNull objectParent _x) && (count (magazines _x) < 2 || damage _x > 0.3 || _x != _leader || random 100 < 50) }; }; if (_surrenderCandidates isEqualTo []) exitWith {}; private _selectedCan = selectRandom _surrenderCandidates; [_selectedCan] joinSilent grpNull; _selectedCan doWatch objNull; private _newGroup = group _selectedCan; _newGroup setGroupId [format ["%1 SURRENDERED",name _selectedCan]]; _newGroup enableDynamicSimulation true; _newGroup deleteGroupWhenEmpty true; _selectedCan triggerDynamicSimulation false; _selectedCan setUnitPos "UP"; if isMultiplayer then { [_selectedCan, ""] remoteExec ["switchmove",0]; [_selectedCan, "AmovPercMstpSsurWnonDnon"] remoteExec ["playMove",0]; } else { _selectedCan switchmove ""; _selectedCan playMove "AmovPercMstpSsurWnonDnon"; }; _selectedCan setCaptive true; _selectedCan disableAI "ALL"; }];
How are you calling it?
Or well, execVM'ing. Yes, paste the exact code. Maybe triggers don't allow scheduled code, someone else knows better probably
execVM "scripts\mortar_1.sqf";
tigger is set to activation OPFOR type Present
you probably have another EH elsewhere and you're causing stack overflow again
Try to execVM it from a script and not a trigger; it will probably work then
I see, it is very easy to cause crashes with EHs... I could never crash Arma before using EHs extensively 😅
you should not do something that triggers an(other) EH in an EH
it's easy to see that it may cause an infinite recursion
an infinite recursion in SQF doesn't usually crash the game, because its "stack" is the heap (your entire RAM), while the stack of Arma itself is just ~1 MB (usually)
How to fix this?
thats works. thank you very much.
did you place it with eden?
yeah
disable simulation as is caused by object collision
I did
toggle these two
that doesnt have an influence at runtime
https://sqfbin.com thank you
place a game logic at the position you want the unit to be then attach them to it
however I can't disable the simulation on the player, only on the bench, because then he stops doing the animation
thats the only way to avoid that
you can attach him instead
I havent had much success with attaching things to objects
They seem to reset their placement
I tried attaching grafitti to a building and it rotated 90 degrees, all of it
BIS_fnc_attachToRelative
Yes thats what I use
do either have simulation disabled
both
enable it
I added a spawn in there to see if that helps with the crashes
Will try now
place it down again and only have that function in the init of it
dont change anything else
[this , house2] call bis_fnc_attachToRelative
screenshot the init
whats the classname of the graffiti youre using
Adding a spawn fixed the issue... for now.. gonna play some more 😉
Land_Graffiti_02_F
and the house?
monitor the number of scheduled scripts
Land_Workshop_02_grey_F
Identical to what I did...
send a screenshot of your 3den setup
what do you mean 3den setup
how everything is placed in 3den
show me how it is placed in 3den
How to determine name and type of terrain object? How to separate trees from rocks?
right
so when i said enable simulation on the house
that wasnt an optional part
and on the graffiti
yeah it works now
but can I not do it with disabled simulation?
I wouldn't like to have it turned on
no
I dont see why disabled simulation would have any effect on attaching
because you disable the simulation 
So what?
The command says to attach it regardless of which way its facing
or the simulation
no it doesnt
Attaches object 1 to object 2, while preserving object 1 initial position and orientation against object 2.
it doesnt say anything about simulation there
i also told you to have simulation enabled on the both of them
But why does the simulation matter?...
I dont understand
Why would it affect the orientation
because its no longer simulated
But the model is still there
how do you expect the engine to do a calculation on something it is no longer simulating
The model and collision is still there though
if youre not going to read what is being said to you then youre not going to get very far
you were told to have simulation enabled on them both and you said it made no difference when clearly that was not the case
I am reading I just have no clue what you mean by "its not being simulated anymore"".
Does the attach command not work on the 3d model?
Why would it be affected by simulation
We really need more info on those new group event handlers, the _fleeingNow for example it doesn't say if it only fires once and until the group is no longer fleeing or if it fires continuously during the group's having fleeing=true etc etc.... the same with all the other EHs... _enemyDetected, fires only once until i changes target? etc etc
because the object orientation, position and all of that is no longer being simulated by the game
How does it retain its orientation and position then if I place it down?
if its not simulated
shouldn't it always revert to a defeault one?
So how does it retain the position & orientation its placed in then?
its being simulated until it isnt?
it is simulated -> its position and orientation is set -> its no longer simulated -> its init code is ran
Right so its simulated initially and then it isnt anymore
no its never simulated at a point you can access
But you just said thats the first step
in the engine
Yes, and I place the grafitti in the engine also. Why does it change its orientation compared to engine?
you cannot access the point its not simulated if you select simulation disabled in the attributes and dont put it in the init
and even then that also doesnt work
because it is trying to set its orientation against an object that is not being simulated
So why does it go to a 'defeault' position like I showed?
Shouldn't it just remain the same way I placed it down
what is it orientating against
if there is nothing
😐
object not simulated; retains orientation
object attached to non-simulated object; resets orientation
that doesnt work i tried that before lou
dont know why but it just gets reset straight after
or attach-detach - it's not like the house is going to move, no?
It is, depending on the placement
If I place this down on a slightly uneven terrain, I want it to retain position relative to the house
Right now everything is flat
but its hard to find such a spot on a real map
you use attach because the house moves?
the house doesnt actually move you just place it in a different orientation?
house with disabled simulation at that
which the game... also accommodates for?
I dont know I know nothing about scripting
Ive only used like 3 commands in my life which I copy pasted
so, back to basics. What were you trying to achieve?
Just putting some grafitti up on a house's wall
and making this small base indestructible
to be a safezone
then place graffiti in world and don't bother with attaching. House isn't going anywhere. Graffiti doesn't go anywhere.
if simulation is disabled, no
doesnt work as far as i can figure out because script wont attach if spawned
but ive not given it much thought 🤷
Has anyone managed to make AI use direct fire on indirect fire vehicles? Kind of trying to do something similar right now but can't figure anything out 
@little raptor Can you elaborate on how you're calling sqf from a queue in on_frame? I'm getting a crash whenever I do anything in that function.
Edit: Nevermind, I got your bound function method working in on_frame.
Is there any way to disable RMB zoom ?
controls...
i would like to do it automatically for all players
It is possible to intercept a key event with a user interface event handler, https://community.bistudio.com/wiki/User_Interface_Event_Handlers but this may not be the case for the mouse button event
definitely not
Hey boss. I did some more testing on different maps. Both Altis and Tanoa get me kicked off for "BattlEye: Client not responding" before the script finishes executing (this is in multiplayer environment, executed server-side). This is with the 512 chunk size. I'll do some further testing with a lower number and report back my results.
For Altis, 256 worked best.
For Tanoa, had to get down to 128.
For Malden & Stratis, 512 was fine.
For Livonia, 512 worked, but my client froze up.