#arma3_scripting

1 messages Β· Page 58 of 1

stray kindle
#

you sure @jade abyss? scrolling up a few lines there's X39 discussion about Macros (that are used in CBA)

granite sky
#

Mine just dips slowly down to 9m after it terminates the loop.

#

Issue is that it's visibly going from some forward velocity to zero.

tough abyss
#

GVAR etc. is from CBA

tough parrot
stray kindle
#

(CBA is everywhere :D)

granite sky
#

starts up Arma again :P

#

yeah, looks like the AI can't adjust quite that fast.

tough parrot
granite sky
#

uses pen and paper :P

tough parrot
solar geode
#

If you're arguing against the macro namespacing, you're arguing against every namespacing scheme invented. They use this one because it's clearly the best SQF can offer.

jade abyss
#

@stray kindle same is/was active in general.

#

bs Sniper.

stray kindle
#

^ true

jade abyss
#

Where did i argue against namespacing?!?!?!

granite sky
#

If you set the flyInHeight to 10m until the loop terminates, it lurches up instead.

tough abyss
#

those macros are SQFs namespaces effectively

granite sky
#

Maybe if you continually set it to the current altitude it'd work better, although it might be adjusting to something else.

#

Trouble is that the AI's still controlling the rotors through the setVelocityTransformation.

#

Better to have it terminate well above the flyInHeight here though, I'd have thought.

jade abyss
#

And?!

tough abyss
#

namespaceing is nice, so ACE uses namespaces

#

Thats why there are GVARs. Thats all there is.

solar geode
#

If you want to rail against ACE, rail at their documentation. :P

tough abyss
#

Anyone know of a way to force broken legs in ACE?

tranquil nymph
#

The salt in this room is delicious :D

lone glade
#

If you want to rail against ACE, rail at their documentation. Get me minions

glossy raft
#

lol

#

fight em @lone glade

coarse needle
#

@lone glade I don't see a wiki-entry in features about logistics.. CHOP CHOP ;)

lone glade
#

PR is here for cargo, I'm going to do repair soon

gleaming rivet
#

@lone glade still no logistics stuff come on

#

probably all my fault since I took up 2 hours of his time yesterday

lone glade
#

2 minutes and it's fine.

gleaming rivet
#

:P

coarse needle
#

^ blame Schwerer

solar geode
#

:P

coarse needle
#

lol :D

lone glade
#

Don't know if photoshopped or if it's an actual protest

prisma glen
#

looks incredibly shopped

coarse needle
#

No it doesn't. Totally real.

lone glade
#

the reflects make it look very real, which brings a question

#

what is CBA refering to in that case :D ?

coarse needle
#

Cocaine Based Alcohol

#

obviously

solar geode
#

Cutting Babies Apart

coarse needle
#

:'D

tranquil nymph
#

cis born asshats ;)

full swan
#

@winter rose I figured out the issue with the sleep - it was caused by "lookAt"

#

removing the lookAt line from the script solved everything πŸ˜„

winter rose
#

wat

full swan
winter rose
#

your magical catastrophe cascade amazes me

full swan
#

πŸ˜„ πŸ˜„ πŸ˜„

winter rose
tepid vigil
#

Will setting a keys value to nil remove the element from hashmap?

little raptor
warm hedge
#

deleteAt does?

tepid vigil
#

Nil is not a supported key type but it is a supported value IIRC and my question was whether or not it removes the element

private _hashMap = createHashMap;
_hashMap set ["Example", "Something"];
_hashMap set ["Example", nil];
winter rose
#

ah, a key's β†’ value

reading

a keys value
I thought "setting a key"

but, no, it doesn't

full swan
coarse dragon
#

so how would i get this guy to stop moving via a trigger? aka die after a amount of time has passed? im using enhanced artwork by polox

warm hedge
#

I would thankful if you don't try to use in that way, since this Mod is not for such purpose

coarse dragon
winter rose
coarse dragon
#

is there any that can be used for my intended use?

warm hedge
#

Scripts

coarse dragon
#

they dont have that kind of one 😦

hallow mortar
#

If you want to kill a man after a certain amount of time has passed, all you need is sleep and setDamage

#

If you want to apply animations without Artwork Supporter, you just need commands such as switchMove

kindred zephyr
#

is there any reference page for CfgActions?
I remember reading one a long time ago but i dont recall if it was even in the wiki

hallow mortar
cerulean sundial
#

Hey, looking to see if people know of a mod such as this one exsiting current or how I would go about doing it https://forums.bohemia.net/forums/topic/159754-menu-extension/

kindred zephyr
#

find it weird that is not listed in wiki though

astral bone
#

it's not possible to change textures of something being worned, right? Without making an entirely new thing that is via mod.

hallow mortar
#

You can change the textures of a backpack or uniform while it's being worn, using setObjectTexture. Other equippables can't be dynamically retextured because they're just proxies, not real things.

astral bone
#

Helmets?

sullen sigil
#

that is not a backpack or uniform so no

#

only backpacks or uniforms can be altered with setobjecttexture

astral bone
#

oh so not "For example, backpacks and uniforms" it's only those

hallow mortar
#

If I meant "for example" I would've said "for example"

astral bone
#

Well, uniform, is that the whole uniform texture or just a certain part or?

hallow mortar
#

Note that uniform textures are not automatically persistent - if the unit's uniform is changed the textures will be reset, and the textures don't stick to a dropped uniform. Backpack textures are persistent because the backpack is a separate vehicle.

solid star
winter rose
warm hedge
#

a3\functions_f_mp_mark\Revive\_eventHandlers_add.inc
Ye defined here, seems like not just documented

solid star
#

ty

still forum
kindred zephyr
#

i'm under the correct assumption that the refract particle cannot be static otherwise it wont refract/be visible?

If not, how does that particle works?

warm hedge
#

Static, as in?

modern meteor
#

Hi, I am using crateUnit to spawn some enemies on the map. What is the best way to check that the new spawn point is outside a certain radius of the last spawn point? If it is inside I do not want to spawn the units.

warm hedge
#

distance command is to check how far it is

kindred zephyr
warm hedge
#

Surely will work

modern meteor
#

Thank you. This is the code I am currently using:

taskarray = player call BIS_fnc_tasksUnit;
taskcount = count taskarray;
selectedarray = taskarray select 0;
tasklocation = selectedarray call BIS_fnc_taskDestination;
hint format["%1",selectedarray];

opUnitList = [

"O_R_Soldier_AR_F",
"O_R_Soldier_LAT_F",
"rhs_msv_emr_grenadier_rpg",
"rhs_msv_emr_strelok_rpg_assist",
"O_R_recon_M_F",
"rhs_msv_emr_machinegunner",
"O_R_soldier_M_F",
"O_R_Soldier_TL_F",
"rhs_msv_emr_sergeant",
"O_R_recon_GL_F"

    
];

taskruns = 1;
for "taskruns" from 1 to taskcount do {


//opUnitSpawned = [];

total = (count opUnitList);
rnd = 1;

for "rnd" from 1 to total do {   
    pick = opUnitList select rnd -1;


    sleep 0.2;
    
    grp = createGroup east;
private _spawnpos = [tasklocation, 5, 50, 3, 0, 0, 0] call BIS_fnc_findSafePos;    
_myUnit = grp createUnit [pick, _spawnpos,["myMarker1","myMarker2"], 50, "NONE"];    
    [grp, tasklocation, 60] call bis_fnc_taskPatrol;
    
  };
selectedarray = taskarray select taskruns;
tasklocation = selectedarray call BIS_fnc_taskDestination;
sleep 0.2;
hint format ["%1", selectedarray];
sleep 1;
};
hint "Spawn complete!"
kindred zephyr
#

there is an example in the wiki that uses a smoke puff and that does work, but when using the refract texture the particle is not visible

modern meteor
#

Just thinking how I could incorporate the distance command to ensure that the new spawn point is lets say 500m from the last spawn point? Otherwise do not spawn and proceed.

kindred zephyr
# warm hedge How you've wrote?
_particleEffectStatic setParticleParams [
        ["\A3\data_f\ParticleEffects\Universal\Refract",1,0,1],
        "",
        "Billboard", 1, 60,
        [0, 0, 0],
        [0, 0, 0],
        1, 1.275, 1, 0, [3.5, 3.5],
        [[0, 0, 0, .65]],
        [1],
        1, 0,
        "", "",
        _object
    ];
winter rose
#

oh, the indentation

kindred zephyr
#

n++ doens like when you copy the tabs

warm hedge
#

You maybe should to try a BIG alpha like 100 so you know it is error on your side or the particle side

kindred zephyr
#

xD

#

im using a lower one for moving particles of refract type and they are visible, but will try a bigger one then

cobalt path
#

What command would I look for if I want to lets say move an object forward by 1 meter? (forward being where ever its pointing)

little raptor
kindred zephyr
nocturne bluff
#

Heh, alive mission 4000 vehicles after 30 minutes

#

Its all ACE_WHEELS

tranquil nymph
#

:D Fixed in next version

nocturne bluff
#

πŸ‘

tranquil nymph
modern meteor
#

Can I check with the command distance also the distance of one coordinate against an array of 5 different coordinates. The objective is to check if the coordinate is more than 500m away from each of the coordinates in the array.

granite sky
#

_posArray inAreaArray [_pos, 500, 500] isEqualTo []

#

If you want the closest one instead then there is no fast method.

nocturne bluff
#

Sweet, just the way i was thinking as well.

modern meteor
#

Trying to understand the code. Would this make sure that the position is 500mm away from each other position in the array?

#

I have the following code which spawn enemies around a mission objective on the map. This avoids that enemies spawn again around an objective IF the coordinate of the last objective is less than 900m from the new coordinate. But now I realised that I have to compare against each coordinate of a new array which contains the coordinates where enemies have been spawned already. I am not sure how to achieve this. Any idea how to do this?

sleep 90;
taskarray = player call BIS_fnc_tasksUnit;
taskcount = count taskarray;
selectedarray = taskarray select 0;
tasklocation = selectedarray call BIS_fnc_taskDestination;
hint format["%1",selectedarray];
lastspawnpos = getpos player;

opUnitList = [

"O_R_Soldier_AR_F",
"O_R_Soldier_LAT_F",
"rhs_msv_emr_grenadier_rpg",
"rhs_msv_emr_strelok_rpg_assist",
"O_R_recon_M_F",
"rhs_msv_emr_machinegunner",
"O_R_soldier_M_F",
"O_R_Soldier_TL_F",
"rhs_msv_emr_sergeant",
"O_R_recon_GL_F"

    
];

taskruns = 1;
for "taskruns" from 1 to taskcount do {


//opUnitSpawned = [];

total = (count opUnitList);
rnd = 1;

for "rnd" from 1 to total do {   
    pick = opUnitList select rnd -1;


    sleep 0.2;
     
    grp = createGroup east;
spawnpos = [tasklocation, 5, 50, 3, 0, 0, 0] call BIS_fnc_findSafePos;
distancemeter = spawnpos distance lastspawnpos;    
if (distancemeter > 900) then {
_myUnit = grp createUnit [pick, spawnpos,["myMarker1","myMarker2"], 50, "NONE"];    
    [grp, tasklocation, 60] call bis_fnc_taskPatrol;
    };
    
if (distancemeter <= 900) then {
hint "Skipped - too close!"
    };
    
    
  };
lastspawnpos = spawnpos;  
selectedarray = taskarray select taskruns;
tasklocation = selectedarray call BIS_fnc_taskDestination;
sleep 0.2;
hint format ["%1", selectedarray];
sleep 1;
};
hint "Spawn complete!"
tranquil nymph
#

Yeah, physically preserving stuff is super useful for containers and objects saved in variables, but for all the generic stuff added via script it's unnecessary

dusk geyser
#

Does anyone know how to make text appear when you look at an object? Similar to when you use an AddAction, but no action, just have text appear

quiet gazelle
#

what is the best way to do a chain of if.. else if... else if... else if... else ?

still forum
#

use a switch(true)
(might not be best way, but it is a way)
best way depends on case-by-case

quiet gazelle
#

sometimes

#

this time i'm looking to id the largest of 3 values

#

generally everytime i type a else {if} in sqf i wonder if there's a better way

drifting portal
#

Sort the values and pick the largest?

quiet gazelle
#

in this case they have names and i'm looking to find the name of the largest one

drifting portal
#

Character length?

quiet gazelle
#

nah

still forum
quiet gazelle
#

private _longestSide = 0;
if (_length0 >= _length1 && _length0 >= _length2) then {
    _longestSide = 0;
} else {
    if (_length1 >= _length0 && _length1 >= _length2) then {
        _longestSide = 1;
    } else {
        _longestSide = 2;
    };
};

this is what i ended up doing

#

i'm just mildly annoyed at that extra indent

drifting portal
granite sky
#
_array = [_length0, _length1, _length2];
_array find selectMax _array;
#

find selectMax is kinda revolting but it works here.

quiet gazelle
#

i love it

granite sky
#

single pass version for laughs:

_hm = [_length0, _length1, _length2] createHashMapFromArray [0,1,2];
_hm get (selectMax keys _hm);
#

(do not do this)

quiet gazelle
#

(i know)

sullen sigil
#

daft question
how on earth would you get the vectordir of the direction of travel? running out of ideas here thonk

granite sky
#

vectorNormalized velocity _object

modern meteor
sullen sigil
#

ah thanks
now time to try figure out how to make my eachFrame position comparison to velocity more accurate to stop it stuttering everywhere πŸ™‚

granite sky
#

@modern meteor inAreaArray filters the input array down to positions/objects which are within the specified area.

#

And then there's just a check for whether the output array is empty.

modern meteor
#

Oh okay. I am trying to find a way to check the distance of one coordinate against an array of coordiantes. Eg. min distance has to be 500 compared to each coordinate in the array.

#

I guess I can't use your code for it?

granite sky
#

what's a coordinate here?

modern meteor
#

coordinate of a task location which i store in a variable

granite sky
#

So a 3d position?

modern meteor
#

yes

#

x,y,z coord

granite sky
#

So when you do you want true and when do you want false?

modern meteor
#

True if it is more than 500m and false if less than 500m vs. each location in the array

#

The array is basically storing the location of each task location as x,y,z

granite sky
#

what if it's within 500m of some elements?

modern meteor
#

Now i need to find a way to check the min distance of a new loaction against the locations in the array

#

If it fails to be more than 500m against at lest one other location then it returns FALSE

granite sky
#

struggles to parse the double negatives

modern meteor
#

in other words the new location needs to have a distance of 500m compared to each location in the array.

granite sky
#

I give up :P

quiet gazelle
#
_return = true;
{
  if (_x distance2d _pos < 500) then {_return = false; break;};
} foreach _posarray;
_return;
#

@modern meteor does this do it?

modern meteor
coarse dragon
#

is there a script one can apply to dropped weapons from dead troops making players ect unable to pick them up?

sullen sigil
#

setDamage 1

#

done on the ground weapon holder it stops players being able to pick it up

coarse dragon
#

what do you mean?

sullen sigil
#

use setdamage 1 on the ground weapon holder and it stops players being able to pick it up

granite sky
#

(dropped weapons in Arma are handled by creating a simulated weapon holder object and adding a weapon to it)

coarse dragon
#

oh

#

thanks

sullen sigil
#
KJW_CapitalShips_Ships = if (isNil "KJW_CapitalShips_Ships") then {[]} else {KJW_CapitalShips_Ships};
KJW_CapitalShips_Ships = KJW_CapitalShips_Ships pushBack _shipHelperObject;
publicVariable "KJW_CapitalShips_Ships";``` -- am i being blind to something or is there a reason that this makes `KJW_CapitalShips_Ships = 0`? ![thonk](https://cdn.discordapp.com/emojis/700311400152825906.webp?size=128 "thonk")
#

_shipHelperObject is an object created a couple lines above with createVehicle

coarse dragon
#

have ya got a link on where to do this?

sullen sigil
#

variable is never touched other than those lines, except running the function then returning the variable gives 0 back

coarse dragon
#

creating a simulated weapon holder object and adding a weapon to it

granite sky
#

Arma does it itself when units die.

coarse dragon
sullen sigil
#
private _myobj = createVehicle ["GroundWeaponHolder", [0,0,0]];
_myObj addWeaponWithAttachmentsCargoGlobal [_myarrayofweaponinfo,1];```
modern meteor
hallow mortar
#

Well, is spawnpos (and the elements in spawnedpositions) an Array, Object, or Location? If it's something else (e.g. a marker) then there's your issue.

modern meteor
#

spawnpos is the x,y,z coordinate of the task location

quiet gazelle
granite sky
#

pushBack returns the index it inserted at, hence 0

sullen sigil
#

oh duh of course

#

thank you, wouldn't have figured that out πŸ˜…

modern meteor
#

spawnpos has the value [10695.6,2886.03]

quiet gazelle
#

and spawnedpositions?

modern meteor
#

looks like it has only x,y actually

quiet gazelle
#

doesnt't matter

hallow mortar
#

Being only x,y isn't the issue, distance works with position2D as well

modern meteor
#

the value of spawnedpositions

quiet gazelle
#

that's a singular position, not an array of positions

modern meteor
#

yes, because i am adding spawnedpositions to the array

#

1 sec, let me past the full code

#

maybe then it is more clear

hallow mortar
#

spawnedpositions is, apparently, an array containing 2 numbers. So when you do forEach on it, _x is just a number. So your if condition is trying to do _spawnpos distance 10695.6, which isn't a valid syntax

modern meteor
#
taskarray = player call BIS_fnc_tasksUnit;
taskcount = count taskarray;
selectedarray = taskarray select 0;
tasklocation = selectedarray call BIS_fnc_taskDestination;
hint format["%1",selectedarray];
lastspawnpos = getpos player;
spawnedpositions = [];

opUnitList = [

"O_R_Soldier_AR_F",
"O_R_Soldier_LAT_F",
"rhs_msv_emr_grenadier_rpg",
"rhs_msv_emr_strelok_rpg_assist",
"O_R_recon_M_F",
"rhs_msv_emr_machinegunner",
"O_R_soldier_M_F",
"O_R_Soldier_TL_F",
"rhs_msv_emr_sergeant",
"O_R_recon_GL_F"

    
];

taskruns = 1;
for "taskruns" from 1 to taskcount do {


//opUnitSpawned = [];

total = (count opUnitList);
rnd = 1;

for "rnd" from 1 to total do {   
    pick = opUnitList select rnd -1;


    sleep 0.2;
     
    grp = createGroup east;
spawnpos = [tasklocation, 5, 50, 3, 0, 0, 0] call BIS_fnc_findSafePos;


_return = true;
{
  if (_x distance2d spawnpos < 1500) then {
  _return = false; 
  hint "Skipped - too close";
  break;
  };
} foreach spawnedpositions;
_return; 

   
if (_return == true) then {
_myUnit = grp createUnit [pick, spawnpos,["myMarker1","myMarker2"], 50, "NONE"];    
    [grp, tasklocation, 60] call bis_fnc_taskPatrol;
    };

    
    
  };
lastspawnpos = spawnpos;
spawnedpositions = spawnedpositions + lastspawnpos;  
selectedarray = taskarray select taskruns;
tasklocation = selectedarray call BIS_fnc_taskDestination;
sleep 0.2;
hint format ["%1", selectedarray];
sleep 1;
};
hint "Spawn complete!"
#

This is the full code

modern meteor
#

I use the position of the play to give "lastspawnpos" initially some value

sullen sigil
hallow mortar
#
spawnedpositions = spawnedpositions + lastspawnpos;```
This is causing you problems. `+` combines the 2 arrays. So you're combining `[]` and `[1234,5678]` (an empty array and an array of 2 numbers). The end result is...an array of 2 numbers, _not_ an array containing a valid position array.
#

You should use spawnedpositions pushBack lastspawnpos instead

modern meteor
#

Oh, i see. Let me try this. One sec

open hollow
# sullen sigil quite possibly

nope, this is the longest:
getCalculatePlayerVisibilityByFriendly

and this the longest function:
BIS_fnc_OM_moduleCheckpoint_checkDistanceFromObject

sullen sigil
#

oh getcalculate

#

wtf

#

why on earth is that a thing

#

and why isnt there one for enemy

open hollow
#

ive cheated, i used a pythonscript lol

open hollow
sullen sigil
#

undercover mods notlikemeowcry

hallow mortar
#

You'll know if an enemy saw you because you'll start growing bullet wounds. ez

modern meteor
sullen sigil
#

nobody tell lou but im testing code by building a pbo every change

open hollow
#

if (damage player < 1) then { spotted = True }

modern meteor
hallow mortar
sullen sigil
#

permanently spotted

#

you are no longer spotted upon death

open hollow
#

a few years ago i saw a post from a guy who wanted to know if its day or night, so he used isLightOn on a light pole... i dont know if it works... but i envy the out of the box thinking there

sullen sigil
#

i still need to figure out a way to find the suns position so i can find if the player is facing it to make their visor tint increase

#

if (islookingatsun player) then {blind player};

sullen sigil
#

oh

open hollow
#

i has a lightDirection vector, so maybe... can work

sullen sigil
#

that would make it quite useful for non pilots too
time to add it to the list

#

thank you! πŸ™‚

wind hedge
digital hollow
sullen sigil
open hollow
#

sounds like something can go undetected in a ACE update, and some pilot crash because of it lol

quiet gazelle
#

what are protected .ebo addons?

hallow mortar
#

Addons that are encrypted so the contents can't be extracted

quiet gazelle
#

in a different way from binarizing things?

sullen sigil
#

binarizing isnt encryption

#

its converting it into a format more easily readable for the game

quiet gazelle
#

i thought it kind of was
isn't it impossible to open models that have been binarized?

sullen sigil
#

yes and no

hallow mortar
#

Binarised stuff being harder to read is more of a side effect than the purpose of doing it. EBOs are specifically intended to prevent the contents being extracted by unauthorised parties, regardless of whether it's binarised or not. So yes, in a different way, and for a different reason.

quiet gazelle
#

i see

sullen sigil
#

binarize -> makes nearer to binary -> computers read binary -> easier for computer

#

(thats not how it works but its how to best imagine it)

#

if you want to encrypt your content youll need to use tools to obscure it but thats not irreversible

quiet gazelle
#

i'm not planning on doing that, i just got curious when i saw the addonFiles wiki mention .ebos

winter rose
#

(or use missionNamespace getVariable ...)

sullen sigil
#

would use missionnamespace but for some reason i didnt

#

cant remember what it was

sullen sigil
fluid wolf
#

Can someone help me understand why

{private _vecdir = vectorDir _x; private _vecup = vectorup _x; [_x, anchor] call BIS_fnc_attachToRelative; _x setVectorDirAndUp [_vecdir, _vecup]} foreach [maproom1,maproom2,maproom3];

does not appear to work in the vector up manner? This correctly attaches the object as far as I can tell and rotates it appropriately as if using Setdir, but any X or Y rotation seems to be ignored. Isn't that what Vectorup is for?

winter rose
#
{
  private _vecdir = vectorDir _x;
  private _vecup = vectorup _x;
  [_x, anchor] call BIS_fnc_attachToRelative;
  _x setVectorDirAndUp [_vecdir, _vecup]
} foreach [maproom1, maproom2, maproom3];
```_haaah._
#

shouldn't BIS_fnc_attachToRelative take care of that already?

fluid wolf
#

It does not appear to in testing, it seems to only take into account Z rotation

#

I'm running this on a MP server as well, which may be altering some behaviours

winter rose
#

so test in Eden first

#
  [_x, [_vecDir, _vecUp]] remoteExec ["setVectorDirAndUp", _x];
```should do
fluid wolf
#

remote exec to the object...?

quiet gazelle
#

runs it on the machine it's local on

winter rose
#

that's what remoteExec does yes

fluid wolf
#

huh... I did not know you could put an object into that parameter to make it run local to the machine its on

#

that's incredibly intresting

winter rose
fluid wolf
#

also yes sorry my code is not always formatted well I know >.>

full swan
#

@winter rose I figured it out...

#

it was a combination of multiple nuances that caused premature script termination by a safeguard

late parrot
#

Is there anyway I can grab the name of a player who interacted with an item to display in sideChat

full swan
#

You see, I have a safeguard right after the spawn block containing the sleep, that is checking the _ai knowsAbout player and if it's above a certain threshold, it terminates the spawned block to prevent further logic inside from executing, replacing that by another behaviour
Thing is, the lookAt or doWatch commands brings up the knowsAbout level to 4, satisfying conditions of the safeguard which then terminates the block few scheduler cycles later

#

that is why it stopped dying after I commented out the lookAt line πŸ˜„ it just took the safeguard few cycles to catch up, test the condition and then terminate the block.. I kinda figured it out by removing the sleep and realizing, that the code won't go much further either.. Sleep only paused further executing until it was terminated waiting for the sleep to complete - so I basically just found a "magic" number that represents time for the safeguard to kill the script on my computer πŸ˜„ πŸ˜„ πŸ˜„

late parrot
#

i assumed its just
player chatSide "Test"; would grab their name specifically

winter rose
winter rose
late parrot
#

No?

winter rose
#

chatSide is not a command

late parrot
#

I mean sideChat lmao

sullen sigil
#

vectorNormalized (_ship getVariable ["KJW_CapitalShips_Velocity",[0,0,0]]), //EXPECT THIS TO LOOK SHIT.
for some reason is making it go on its side and perpendicular to the direction of travel? is vectorDir in setVelocityTransformation thonk

#

i can pm video but cannot post here or get bonked

#
addMissionEventHandler ["EachFrame", {
    {
        private _shipLastPos = _x getVariable ["KJW_CapitalShips_LastPos", [0,0,0]];
        private _shipPos = getPosASL _x;
        private _shipVel = (_shipLastPos vectorDiff _shipPos) vectorMultiply 1/diag_deltaTime;
        _x setVariable ["KJW_CapitalShips_LastPos", _shipPos];
        _x setVariable ["KJW_CapitalShips_Velocity",_shipVel];
    } forEach KJW_CapitalShips_Ships;
}];``` is what handles the velocity
winter rose
sullen sigil
#

...that would probably be it πŸ˜…
thanks πŸ™‚

#

serves me right for not copy pasting from my working one

granite sky
#

shouldn't matter, / has higher precedence than binary commands?

winter rose
winter rose
sullen sigil
#

i am moving an immovable object

#

ya john was correct

#

didnt fix it

#

velocity looks correct too -- but let me get in a truck and drive next to it

granite sky
#

I think you pasted the wrong bit of code anyway.

sullen sigil
#

...velocity variable doesn't have negative stuff in it thonk

sullen sigil
# granite sky I think you pasted the wrong bit of code anyway.

whole transformation command is

_ship setVelocityTransformation [
    _currentShipPos,
    getPosASL _logicObject,
    [0,0,0],
    [0,0,0],
    vectorNormalized (_ship getVariable ["KJW_CapitalShips_Velocity",[0,0,0]]), //EXPECT THIS TO LOOK SHIT.
    vectorNormalized (_ship getVariable ["KJW_CapitalShips_Velocity",[0,0,0]]),
    vectorUp _ship, //Needs to get changed for banking.
    vectorUp _ship,
    _interval
];``` 🀷
#

...i could just do vectorfromto _logicObject couldn't I facepalm

winter rose
#

if you "move" something that cannot move, velocity won't apply

sullen sigil
granite sky
#

yeah you asked the wrong question earlier :P

#

vectorFromTo is much better for this.

winter rose
sullen sigil
#

it does

#

it moves the dir is just wrong thats all

#

(along with how i manipulate how quickly the interval passes but that's a later problem as its too complex maths for right now πŸ˜…)

granite sky
#

Your calc for _shipVel is backwards too but you probably shouldn't be using that for anything due to issues at the endpoints.

sullen sigil
#

Yeah it's only getting used for finding the modelspace velocity of the ship prior to the transformation so I know how quickly it's "travelling"

granite sky
#

should be _pos vectorDiff _lastPos anyway

sullen sigil
#

Oh right -- shippos and lastpos need to be reversed?

#

ye

#

will rectify now as that could be causing the issues I'm having with acceleration -- and I need it for angular velocity

#

thanks πŸ™‚

granite sky
#

Also precalculate the velocity based on the path and don't mess with it each frame.

#

Unless you actually want non-constant velocity.

sullen sigil
#

I do want non constant velocity

granite sky
#

uh oh

sullen sigil
#

acceleration/deceleration

#

its some cursed shit as im modifying how quickly the interval passes to make it look like its speeding up and slowing down

winter rose
#

why not… lerp and all these magic things?

granite sky
#

Does velocity actually do anything on those objects anyway?

sullen sigil
#

it's not using the velocity for anything other than calculating how quickly it is currently moving (and even then i need to change that)

granite sky
#

Like if you just setVelocity, does it move?

sullen sigil
#

nope

winter rose
sullen sigil
#

I can sqfbin the function if you'd like but it's erm
everything you hate about how i code in one file

granite sky
#

Can't be bothered to do someone's else's maths project anyway. I have to finish this dive bombing function myself :P

winter rose
sullen sigil
sullen sigil
#

i dont really see alternatives to them

#

how else am i supposed to figure out how fast an object that has no velocity is going in the next function πŸ˜…

winter rose
#

even the parser refused to colour that

sullen sigil
#

sqfbin hasnt been working properly for months for me

#

it colours it fine but then when i share it
it just doesnt like to have colour

winter rose
#

ah yep, it loses the colour on reload

full swan
winter rose
#

agrrrrrr

sullen sigil
#

i did manage to make a function that spawns the ship from config in less than 100 lines though :)

full swan
#

well I can throw 15 years of programming experience out the window, I am becoming old ... πŸ˜„

sullen sigil
#

(getPosASL _ship) vectorFromTo (getPosASL _logicObject) now makes it sideways
just a different sideways kekw

granite sky
#

You know vectorDir for this thing isn't necessarily where the ship is pointing, right

sullen sigil
#

yes -- though the ship is attached to the object in the same direction as it
but it also shouldnt be sideways (as in, half of its horizontal length is in the floor)

#

like, the vectorUp seems to change -- when I've not touched it, and it's perfectly fine with vectorDir _ship (albeit the direction not changing)

#

vectorup is changing if vectordir _ship isn't anything but that. it's always vectorUp _ship in the svt command thonk

fervent wyvern
#

hi, i'm trying to create a inventory that appear when a key from the keyboard is press (like in classic survival horror), where i can find information, video or something of how to create it?

sullen sigil
meager granite
#

Arma corrects orientation vectors if you supply one that is not orthogonal to the other, that's probably where your issue comes from

sullen sigil
#

its been working fine for a similar instance (identical setvelocitytransformation parameters)

meager granite
#
    (getPosASL _ship) vectorFromTo (getPosASL _logicObject),
    (getPosASL _ship) vectorFromTo (getPosASL _logicObject),
    vectorUp _ship, //Needs to get changed for banking.
    vectorUp _ship,

There is no guarantee that previous vectorUp will be orthogonal with result of your vectorFromTo

#

I didn't look into code deep enough to see how your _ship and _logic objects work

sullen sigil
#

theyre just objects
and the vectorup breaks from the moment the transformation starts.

#

this however works fine

queen cargo
#

fiinally home
read through everything
lets continue

#

@solar geode Thx for giving me the chance to show you how dump you are

They rename a PBO
should never ever happen! It is a nightmare for every end-user (or better: for the admins) to detect that and WILL lead to errors, in case the addon stops getting maintained and somebody else continues it, it is a nice way to prevent a renaming ==> people will still find the addon just with a different maintainer
the rest is also simple to argue against as its a nonsense argument but ye ... lets quote it first:
You're right. Who the fuck needs things like namespaces.
Pointless in every single language that implements them.
Namespaces are logical construct
guess how they are archived in SQF/C/AnyOtherLanguageNotSupportingAbstractionOfNamespacesNativly?
Namespace1_Namespace2_NamespaceN
thus nobody said namespaces are useles shit
i said that the macros are useles overhead which make no fucking sense to ever use as they just make things more complicated to debug but ye ... like you would even think about it
you took it personal which is indeed a problem of yours
anyway ... lets continue with

#

@lone glade

I'm still waiting for you to stop your salt factory
so i stop throwing it into the open wounds? ha ha ... no way
it's easier for everyone to type GVAR(size) instead of mod_pbo_varName
Wait wait wait wait wait wait ... so you want to tell me
instead of having to type the whole damn complicated string which nobody never ever ever could remember you just type GVAR + the ( and the ) so that it does that automatically for you?
ohh you are so damn right
totally forgot that
nope, nope. really an argument
but ... actually its not
it is just putting the focus away from what youre working with right now and that is a macro which will lead to the thing that as soon as you want to check the global variable ingame using some kind of debug UI you will have to do the resolving per hand
and do not say that thats "the price you pay for easier access to the global var" because thats exactly what it is not!
GVAR is not making things more simple
it just makes things shorter, causes you to not be in need of checking in which pbo project you are (which could be a pro and a con in the same time)
and more complicated as soon as you come to the point where you would have to debug your code
in fact, it is like saying "hey, i drive to the store because ??? to buy a bottle of water instead of walking the 20 meters over there onfoot"
compleete nonsense

meager granite
sullen sigil
meager granite
#

Use [0,0,1]

sullen sigil
#

roger one moment

queen cargo
#

@tough abyss

We all know that X39 is the SQF god.
no im not but thx anyway (yes i take that sarcasm as compliment)

#

greetings
X39

sullen sigil
#

[0,0,0] keeps it flat but doesnt allow turning left and right thonk

meager granite
sullen sigil
#

no, [0,0,0] is

meager granite
#

Vector up = [0,0,1] should be up right

#

[0,0,0] is invalid

sullen sigil
#

that'll be why its standard then

meager granite
#

Standard where?

sullen sigil
#

[0,0,0] as vectorUp makes it appear "standard"

#

[0,0,-1] the end of it points into the sky

granite sky
#

[0,0,0] is not a valid direction :P

meager granite
sullen sigil
#

ya that's what I'm saying πŸ˜…

#

well
trying to

meager granite
#

I think you don't understand how these vectors work

#

Do some debug drawing to see it visualised

sullen sigil
#

i have
and it works fine for the arrow example

meager granite
#

Your arrow example has [0,0,0] vectorFromTo (imabox getVariable ["KJW_CapitalShips_Velocity",[0,0,0]]) which I assume is pretty much [0,0,0]

sullen sigil
#

no its the vectordir of its velocity relative to [0,0,0]

#

i.e the vectordir of its motion

meager granite
#

drawLine3D your vector dir and up to see what they end up being

#

Also observe how they look on normal objects

#

Also log acos(_vectorDir vectorCos _vectorUp), it must be 90 and nothing else

#

Before you set them to an object

sullen sigil
#

what i am not understanding is why the arrow example works but this one does not

meager granite
#

Do you even set anything to KJW_CapitalShips_Velocity for the arrow?

sullen sigil
#

yes

#

or else it would not be orienting in its direction of motion

#
addMissionEventHandler ["EachFrame", {
    {
        private _shipLastPos = _x getVariable ["KJW_CapitalShips_LastPos", [0,0,0]];
        private _shipPos = getPosASL _x;
        private _shipVel = (_shipPos vectorDiff _shipLastPos) vectorMultiply (1/diag_deltaTime);
        _x setVariable ["KJW_CapitalShips_LastPos", _shipPos];
        _x setVariable ["KJW_CapitalShips_Velocity",_shipVel];
    } forEach KJW_CapitalShips_Ships;
}];```
#

that is KJW_CapitalShips_fnc_velocityHandler

meager granite
#

This approach has a problem of sim vs render position scopes btw

sullen sigil
#

i know but how else would you get the velocity of an object that has none

meager granite
#

You need getPosASLVisual or even getPosWorldVisual

meager granite
#

Anyway, draw your vectors with drawLine3d to get an idea what's going on

sullen sigil
#

and rgr one mo

#

ok so just needs to be a right angle between the two lines always, right?

meager granite
#

Yes

sullen sigil
#

right.
and thats always the case with the arrow as its always "up" -- my problem is that even though the vectorUp of _logicObject is perpendicular to its motion-
no it isnt fuuuck as if it goes up then itd need to be tilted up(?)

#

no it wouldnt motion has nothing to do with vectorDir

#

its vectorDir is only 2 dimensional -- and its vectorUp should surely be fine to remain the same as the start of the transformation..?

meager granite
#

Sure if you can make sure vectorDir is 90 degress to vectorUp

tranquil nymph
#

Nice bait :)

sullen sigil
#

my next question is how to do that as in my head i just have [0,0,0] but it all needs to add to 1?

queen cargo
#

they took it
not my fault

meager granite
#

Why do you even do [0,0,0] vectorFromTo to your velocity?

sullen sigil
#

to get the direction of travel to orient the object towards it

meager granite
#

But velocity is already in world space

sullen sigil
#

bruggin i could just normalise the velocity couldnt i

meager granite
#

I guess you use it to normalize the vector?

sullen sigil
#

vectornormalise probably cheaper

queen cargo
#

maybe i could have added to the second @ the note that you ALWAYS have to fucking debug your code

meager granite
#

There is vectorNormalized

sullen sigil
#

switched it to that now yeah

meager granite
#

I thought you needed vectorFromTo for something else

sullen sigil
#

nope just a daft decision made after writing this one function for about a week πŸ˜…

meager granite
#

Do you always need your ships to be parallel to XY plane?

sullen sigil
#

i would like them to be able to bank however it's not the utter end of the world if thats not possible in this context

meager granite
#

You'll need to do some vector math to calculate proper vectorUp from your vectorDir

#

Assuming your KJW_CapitalShips_Velocity as vectorDir is correct each frame, I don't like it it all for multiple reasons

#

it also might be [0,0,0] the very first frame because your object stood still

sullen sigil
#

thats correct
i hate it too but its the only way i can get the velocity of something that doesnt have any as far as i can tell

sullen sigil
queen cargo
#

if you do not have to then you are either the best coder in the world wasting your time with modding instead of quickly writing arma yourself again and some algorythm that generates the tanks atomatically for you
or you are simply a moron who is not testing his code

meager granite
#

Maybe, but you can do it yourself

sullen sigil
#

I feel like you already told me what I need

meager granite
#
private _vector_aside = vectorNormalized(_your_vector_dir vectorCrossProduct [0,0,1]);
private _vector_up = vectorNormalized(_vector_aside vectorCrossProduct _your_vector_dir);
#

You can collapse it into a single expression

sullen sigil
#

thanks, was trying to figure out how to reverse the function to get _vectorUp = [...]
what is _dir there? _vectorDir? πŸ˜…

meager granite
#

Mistypes, meant your original vector dir you have

sullen sigil
#

Thank you for the help, I'll give that a try now πŸ˜…

meager granite
#

Calculating side vector from [0,0,1] won't let your object bank though, only pitch and yaw

sullen sigil
#

bruh, still got sword in the stone look meowsweats
this is probably user error

meager granite
#

Make sure your vector dir is not null, take current vectorDir off an object if your variable is [0,0,0]

sullen sigil
#

aha
it is now flat -- however going sideways

[{
    _this#0 params ["_ship", "_logicObject", "_logicObjectPos", "_intervalConst", "_maxIntervalChange", "_destination", "_timeToTake", "_currentShipPos"];
    private _interval = _ship getVariable ["KJW_CapitalShips_Interval",0];
    private _dirOfTravel = vectorNormalized (_ship getVariable ["KJW_CapitalShips_Velocity",[0,0,0]]);
    private _vectoraside = vectorNormalized ((vectorDir _ship) vectorCrossProduct [0,0,1]);
    private _vectorUp = vectorNormalized (_vectoraside vectorCrossProduct (vectorDir _ship));
    
    _logicObject setVelocityTransformation [
        _logicObjectPos,
        _destination,
        [0,0,0],
        [0,0,0],
        vectorDir _logicObject,
        vectorDir _logicObject,
        vectorUp _logicObject,
        vectorUp _logicObject,
        _interval
    ];

    _ship setVelocityTransformation [
        _currentShipPos,
        getPosASL _logicObject,
        [0,0,0],
        [0,0,0],
        _dirOfTravel,
        _dirOfTravel,
        _vectorUp,
        _vectorUp,
        _interval
    ];``` πŸ˜…
#

believe I'm doing something incorrect there r.e the vectorDir shenanigans

meager granite
#

Use your _dirOfTravel in these calculations

#

This is what I meant with _your_vector_dir

sullen sigil
#

That was giving sword in the stone look -- if it's [0,0,0] should I be using vectorDir _ship in just that instance?

meager granite
#

Yeah

fervent wyvern
#

where i can find a tutorial/well explained video/page about creating a interactuable gui?, i'm trying to recreate the inventory from survivals horror like resident evil

sullen sigil
#

Ah rgr

#

_dirOfTravel = if (_dirOfTravel isEqualTo [0,0,0]) then {vectorDir _ship} else {_dirOfTravel}; gives sword in the stone and removing the else gives script error thonk -- placed right under where it's defined initially

tough abyss
#

What? Who is testing what code?

meager granite
#

Did you change it in _vectoraside and _vectorUp?

sullen sigil
#
 private _interval = _ship getVariable ["KJW_CapitalShips_Interval",0];
 private _dirOfTravel = vectorNormalized (_ship getVariable ["KJW_CapitalShips_Velocity",[0,0,0]]);
 _dirOfTravel = if (_dirOfTravel isEqualTo [0,0,0]) then {vectorDir _ship} else {_dirOfTravel};
 private _vectoraside = vectorNormalized (_dirOfTravel vectorCrossProduct [0,0,1]);
 private _vectorUp = vectorNormalized (_vectoraside vectorCrossProduct _dirOfTravel);``` yep
#

and yes the svt is using _vectorUp and _dirOfTravel

pulsar bluff
#

Is there an easy way to get the targeted position of an artillery shell?

#

we have like "ETA to hit" but not "targeted position to hit"

#

only way i can think of now is to get the map position of the target position crosshair at time of weapon fire

sullen sigil
#

ok so using private _vdirandup = [getPosASL _ship, (getPosASL _ship) vectorAdd (_ship getVariable ["KJW_CapitalShips_Velocity",[0,0,0]])] call BIS_fnc_findLookAt; is also giving sword in the stone so i think this is just a problem with something else

meager granite
#

Also, just do setVectorDirAndUp after velocity transformation?

sullen sigil
sullen sigil
#

vectormagnitude and arccos isn't it

meager granite
#

diag_log ["angle", acos(_dirOfTravel vectorCos _vectorUp)];

sullen sigil
#

ah thanks

#

systemchats are saying always 90 but will try diag_log for more precision

#

πŸ˜…

meager granite
#

Have some other object that you don't do setVecloityTransformation on and set your vectors on it

sullen sigil
#

roger

meager granite
#

Or just draw them so they're visualised

sullen sigil
#

I tried that with

addMissionEventHandler ["Draw3D", {
    drawLine3d [getPosASL player, ((getPosASL player) vectorAdd (vectorDir (KJW_CapitalShips_Ships#0))) vectorMultiply 2, [0,0,0,1]];
    drawLine3d [getPosASL player, ((getPosASL player) vectorAdd (vectorUp (KJW_CapitalShips_Ships#0))) vectorMultiply 2, [0,0,0,1]];
}];``` and nothing showed up which made me think I just did smth wrong
meager granite
#

Command takes positions as AGL

sullen sigil
#

ah

#

probably didn't look high up enough

meager granite
#

Also black lines might not be super visible

#

Use ASLtoAGL getPosASL player

sullen sigil
#

πŸ˜… setting vdirandup on the block

meager granite
#

Also visualise calculated vectors too

#

not ones taken from the object

sullen sigil
#
private _vdirandup = [getPosASL _ship, (getPosASL _ship) vectorAdd (_ship getVariable ["KJW_CapitalShips_Velocity",[0,0,0]])] call BIS_fnc_findLookAt;
barry setVectorDirAndUp _vdirandup;```
#

barry is the left cube

#

But then goes 90 degrees the wrong way when being svt ❓ (is moving away from camera, i assume its pointing downwards too but cant really tell, will use different obj to confirm)

#

barry setVelocityTransformation [
    _currentShipPos,
    getPosASL _logicObject,
    [0,0,0],
    [0,0,0],
    _vdirandup#0,
    _vdirandup#0,
    _vdirandup#1,
    _vdirandup#1,
    _interval
];``` same vdirandup command from above, yes i noted out the first one
meager granite
#

Didn't get what you mean

#

But yeah, use some better objects, spawn a jet or something, gonna instantly tell its orientation.

sullen sigil
#

Using a house -- seems to be the correct side (and isn't pointed downwards) -- but doesn't have left and right turning either thonk

#

orientation just never seems to change now

#

and fwiw _ship setVectorDirAndUp _vdirandup; doesnt have any influence even if i change the bits in the svt to vectordir _ship etc

#

i am however into hour 7 of trying to debug this so I will head to bed to save myself from insanity -- thanks for the help πŸ™‚

meager granite
#

Wish there was something like ARRAY ctrlShow BOOL to quickly hide\show array of controls

#

I know you can do that if they're grouped by operating the group, but I need to do that within same group

#

Rewriting my icons over head scripts, trying to squeeze as much ms as possible out of each frame execution

pulsar bluff
#

black pill = players dont care about the ms

meager granite
#

Guess the only way would be to calculate it yourself

meager granite
pulsar bluff
#

best case is to save a chrome tab worth of ms

meager granite
#

The topic is very complex in general, so get ready for some rough time

meager granite
#

@still forum On a scale of 1 to 10 how bad of idea it would be to make ARRAY set ARRAY command return the left operand array instead of Nothing?

#

This will let stuff like:

private _pos = getPosWorld player;
_pos set [2, 100];
_pos;
```to be written as single expression of
```sqf
getPosWorld player set [2, 100]
pulsar bluff
meager granite
pulsar bluff
#

im just very skeptical re the dev time cost of working on marginal optimizations

meager granite
#

To get 60 FPS you only have 1 / 60 = 0.016 seconds, which is 16 ms

#

And like 15.5 of it is engine stuff, so you can use like 0.5 ms for your scripts

#

If its some loading or one time operation that happens during dialog usage, it doesn't matter

pulsar bluff
#

yea, put some ugly scripts in, look at the sky and get 90 FPS ... look at some buildings and back down to 50

meager granite
#

But per frame should be as quick as possible

pulsar bluff
#

yea i agree on spending time optimizing the high frequency stuff

meager granite
#

I'd even suggest something like vectorSetComponents [nil,nil,100] but that's too much, array creation, extra values, etc.

pulsar bluff
#

not vectoradd?

meager granite
#

No, set

pulsar bluff
#

_above = (getposworld player) vectoradd [0,0,100]

meager granite
#

Not above, exactly 100 meters above sea

pulsar bluff
#

ah

meager granite
#

XY from getPos, Z from your needed value

#

I'd even argue for add command similar to set but it adds number to number in the array

#

There is vectorAdd, but that won't work if you're operating some long numbers array

pulsar bluff
#

what are you working on broadly .. koth code refactor/optimize, or content/features

meager granite
#

Both, adding new KotH features, having to refactor and optimize existing code.

pulsar bluff
#

i will say managing Z axis is always a pain in arma πŸ˜‚

meager granite
#

Back in OA, ASL commands returned values above wave level, not general sea level, yet some other commands that took ASL expect it to be sea level

#

So icons above players that are over water always went up and down with the waves really

pulsar bluff
#

ah that sort of thing

meager granite
#

So yeah, Zs can be painful in Arma

pulsar bluff
#

yea

#

dont you use selection position?

meager granite
#

I do, its proper in Arma 3

#

But returned over the waves AGL back in OA

pulsar bluff
#

lol glad i wasnt around for that

meager granite
#

This is the expression that sparked me to write that set return suggestion:

    private _icon_pos_agl = if(_x distance _camera_agl > 200) then {
        getPosVisual _x vectorAdd [0,0,2.5];
    } else {
        private _pos = getPosVisual _x;
        _pos set [2, (_x modelToWorldVisual (_x selectionPosition "head") select 2) + 0.5];
        _pos;
    };
#

Wanted second else to look liked single expression of:

getPosVisual _x set [2, (_x modelToWorldVisual (_x selectionPosition "head") select 2) + 0.5]
pulsar bluff
#

have u tried the selectionposition render scope syntax?

meager granite
#

Or have that distance check only for Z

meager granite
pulsar bluff
#

selectionPosition [object, selectionName, LODIndex, isVisual, returnMode]

meager granite
#

huh

pulsar bluff
#

ahh i didnt even see it was default on

meager granite
#

Making commands operate on sim scope by default was stupidest engine decision ever

pulsar bluff
#

yes i am dealing with that issue with "taskDestination" command at the moment

meager granite
#

Sure sometimes you might not want to register some remote unit lag glitch into an area\trigger due to position prediction\interpolation

pulsar bluff
#

need a taskdestinationvisual

#

for task icon

meager granite
#

But in 99% cases you want to operate over actual object visible state

#

not some internal jumpy position

pulsar bluff
#

only time i use simulation pos is for some rope stuff to attach to remote vehicle... when attaching with render scope, sometimes vehicle surface is in a slightly different position... think when you get into a vehicle and the suspension settles.. sometimes that suspension state is not synced

meager granite
#

Maybe you can create a dummy object and setSimpleTaskTarget to it instead of position

#

And move the dummy object each frame locally

pulsar bluff
#

havent tried too much. i attach a task to a person, but when he is loaded into a helicopter, my task icon is still at (getpos # 2) == 0 and skipping in that simulation state way

meager granite
#

Create local dummy object and setPos it each frame for perfect position where you want it?

#

Actually my own task moves with:

client_game_hillTask setSimpleTaskDestination _position_asl;
#

It moves very slowly though

#

but super smoothly

nocturne bluff
#

Don't worry, im the best SQF coder.

#

And don't engage X39 too much

queen cargo
#

feel free to show me where im wrong @nocturne bluff
its that what im waiting for dude

queen cargo
#

a beautiful function isnt it?
its the result of some argumentation with one of the fancy mods of /r/armadev in some other subreddit where he said that he will ban me from armadev
well
i took it my way then and banned him from my mods

#

also XLib is garbage code which i usually write when im drunk

nocturne bluff
#

Dear god

#

what is that

lone glade
#

The salt emperor in person @nocturne bluff just don't bother

nocturne bluff
#

I know haha.

barren valve
#

Hi, does anyone know how to pass a parameter to a dialog? I want to access _spawnLocations in the script run by onload in PlanesDialog

params["_object", "_name", "_vehicleTypes", "_spawnLocations"];

{
    if(_x == "Planes") then {
        _object addaction ["Spawn plane", { 
            _dialog = createDialog "PlanesDialog";
        }];
    };

    // Other vehicle types
} forEach _vehicleTypes;
meager granite
#
            _dialog = createDialog ["PlanesDialog", false];
            _dialog setVariable ["spawnLocations", _spawnLocations];
#

Though I'm not sure if onLoad is called right away or on the next frame so your variable is available there

barren valve
#

Thanks mate I'll try that

meager granite
#

Oh btw I just realised its an addAction there

#

Your params-ed variables won't be visible there

#
        _object addaction ["Spawn plane", { 
            _this select 3 params ["_spawnLocations"];
            _dialog = createDialog ["PlanesDialog", false];
            _dialog setVariable ["spawnLocations", _spawnLocations];
        }, [_spawnLocations]];
#

@barren valve ^

#

You also need to pass arguments into addAction so they're available when action runs

barren valve
#

Thanks for your help should be ok from here

tough abyss
#

bis_fnc_diagkey is fixed

#

And what is the point of
format["%1%2%3%4%5%6%7%8%9%10", "B", "IS", "_f", "nc", "_En", "dM", "i", "s", "si", "on"]
?

meager granite
#

inAreaArray makes me wish for something like terrainIntersectArray*

#

to cast terrain checking rays in bulk

#

And have it accept entities as arguments too

still forum
#

throws a specific steam user out of the mission everytime he tries to play with XLib

meager granite
#

Though checking for entities also requires to know which point to check for exactly, checking against origin might not be enough

#

Here's me dreaming of new commands again

#

[_camera_pos, [0,0,2]] terrainInersectArray allUnits => return all units that are visible to camera, checking for 2 meters above them

#

Or similar unary syntax of existing commands:
terrainInersectArray [_camera_pos, allUnits, [0,0,2]]

nocturne bluff
#

Well that might be the point of the entire function

#

But why split and reformat the string again

still forum
#

"Obfuscation" ?

tough abyss
#

Yeah. Why that?

#

pls explain. I wanna know

queen cargo
#

there is nothing i hate more then to repeat myself
@still forum is right
a way to simply prevent a simple CTRL+F to find it
and the rest is already explained

tough abyss
#

So that guy is not supposed to find that piece of code?

#

What would he do with it?

still forum
#

Well not that anyone would need to search for long... that was the first source file i looked at in XLib...

tough abyss
#

uiNamespace setVariable["bis_fnc_diagkey", compileFinal ""]; doesn't really do anything if he uses compileFinal too

grizzled cliff
#

lol there are some fucking dumb people in this chat.

nocturne bluff
#

Its a public bis chat.

tough abyss
#

Sry, Nou. I'm trying hard.

nocturne bluff
#

Im suprised there isnt a bunch of racist jokes in here.

grizzled cliff
#

Not to throw an argument from authority fallacy out here, but ACE/CBA has been doing this for almost 10 years now. I think we know what we are doing when it comes to maintaining HUGE projects in SQF.

nocturne bluff
#

I disagree!

#

For some reason.

grizzled cliff
#

lol

nocturne bluff
#

Have some salt.

#

and don't forget that im the god of SQF.

grizzled cliff
#

psh, i said i am A god... Damn monothesists

nocturne bluff
#

I only believe in one true god, myself!

#

And, i should stop derailing these intelligent discussion

queen cargo
#

ohh ye ... i see that

#

CBA is complete gibberish where everybody more or less agrees without even arguing against it

#

most code is damn outdated

#

and nobody rly updates that code

#

lets also ignore that components like the XEH are completly unoptimized and cost fucking FPS

#

ACE2 was just as much a hell to read like CSE was

tough abyss
#

Make a PR and improve XEH then

queen cargo
#

ACE3 however, looks way better but you still did not got rid of those stupid retarded macros

#

and still got functions where you are not using the native arma ways to eg. get parameters

lone glade
#

"stupid retarded macros", try handling a project this big without them

tough abyss
#

Why get rid of something that works perfectly fine?

lone glade
#

we'll enjoy.

queen cargo
#

@lone glade i already argued against you, feel free to proove that my points are wrong

lone glade
#

Well, it's not wrong, it's retarded

queen cargo
#

@tough abyss already said why i will never contribute to CBA unless thats somewhere easy to access
but stuff like that tends to get forgotten

still forum
#

We already prooved it.. But you just say "No thats wrong cuz its just dumb"

queen cargo
#

you did nothing

still forum
#

okey they did ^^

tough abyss
#

It's on github. Isn't that easy enough?

nocturne bluff
#

ITS TOO HARD MAN

#

Github is watching us!

queen cargo
#

you brought up shit and tried to denounce me AFTER i argued against you

#

@tough abyss do i rly have to repeat myself? thats not what i look for

#

i fucking know its on github

nocturne bluff
#

D U RLY NEED 2 SHORTEN UR WORDS

tough abyss
#

So how is it hard to access then?

queen cargo
#

@nocturne bluff we are in some randome online chat
rly is a common shortage of really
so ... yes

lone glade
modern meteor
#

How can I assign a unit which I just spawned into a group?

warm hedge
#

Assign as in?

nocturne bluff
#

I disallowed myself from commiting to public githubs due to my nature of witty commit messages instead of informative ones

modern meteor
#

Trying to find the command for it

tough abyss
#

So CBA is hard to access even though it's on Gihub? I don't get it.

queen cargo
#

@tough abyss ... so i REALLY have to fucking repeat myself? just read the backlog! its like three fucking days in the past and its not like i usually show up in chat like ton of times but the one fucking time i start some talk here agian

tough abyss
#

Don't have a mousewheel. Scrolling is a pain in the butt.

#

You are making no sense.

hallow mortar
#

You can use join...but doesn't createUnit require you to specify a group to put the unit in to begin with?

little raptor
queen cargo
#

ok ... so two blog posts today get published so i do not have to type the same shit down again and again and again

still forum
#

I like that idea but it gives me a bad gut feeling right in this moment

meager granite
#

Yeah, thought about possible backwards compatibility issues as well, its bound to break something somewhere at some point πŸ€”

#

Probably none of official and semi-competent content though

tough abyss
#

You could copy paste it. I have no idea what to look for.

meager granite
#

ARRAY set2 ARRAY
ARRAY setR ARRAY
ARRAY setRet ARRAY
ARRAY ret ARRAY

nocturne bluff
#

I just realized something.

tough abyss
#

You are Putins Head?

nocturne bluff
#

X39 is ARMA's Derek Smart.

meager granite
#

Maybe some symbol to be comparable with select's #

#

ARRAY << ARRAY

nocturne bluff
#

Also that

meager granite
#

Will be confusing with configs though

#

ARRAY @ ARRAY πŸ€”

#

Though I like setX, setY and setZ too

#

Much more limited but skips creating array for right operand, even faster

meager granite
modern meteor
warm hedge
#

It is very rude not to leave the actual answer.

quiet geyser
#

Curious about the execution order on an object for a use case I have. If I’m a simple script in the init line of an object, have it set to not simulate in the editor, but then have it enable simulation later on (say, due to a trigger), does the script pass then the simulation is disabled? Or will the init line execute when the simulation is reenabled later on?
Additionally, should I sync a vehicle respawn module to an unsimulated vehicle, will that module take effect once the vehicle is later simulated?

queen cargo
#

dont worry @tough abyss will ref it for you as soon as i rewrote it

quiet geyser
#

Cool, that doesn’t really answer my second question though - will an unsimulated object still be passed to the vehicle respawn module if synced?

queen cargo
#

in a longer and nicer version

tough abyss
#

Oh, I don't care about profanities.

grizzled cliff
#

lol

#

X39 do you have stack traces in your projects? Because we do.

#

you know how we get those? Macros

#

also apparently you've never seen a C project.

still forum
grizzled cliff
#

macros everywhere

#

and trust me, I hate macros too, but guess what I know how to do something the right way and the only way that really makes sense in Arma is using macros to control namespaces.

winter rose
#

you can't say that, they are your children

pliant stream
#

out of curiosity how do you do a stack trace in sqf?

tough abyss
meager granite
#

Big feature vs Potential faint probably not likely issue in some workshop mission

stray flame
#

Is there any way to test if locality and remoteexec works as it should without having more players join me?

meager granite
#

remoteExec is very reliable

#

You can join your own server by running another game exe

stray flame
#

When testing an op yesturday with some friends, I noticed some dialogue was said once, as it should. Others were said repeated times for some reason. They were all remoteExec'd scripts

meager granite
#

Host it as LAN with one game instance, join 127.0.0.1 with another

stray flame
#

hu

#

alright

#

how would I do this?
Do I need 2 computers or something?

grizzled cliff
#

we use macros for all of our function names

meager granite
#

Make a bat file with this in it:

arma3_x64.exe -nopause -nosplash -world=none -skipIntro -noLauncher -useBE -ShowScriptErrors
```and run it after having main game open
#

Then join your own host

grizzled cliff
#

in debug mode we can insert function wrappers that trace the calling locations

winter rose
#

for a global command that would make the command repeat for everyone on a player connection

stray flame
#

I will look at it wait a sec

grizzled cliff
#

then in release mode tada the wrappers are gone because of macros

stray flame
#

I host using UPnP (as far as I know)

pliant stream
#

yeah i see

winter rose
#

that shouldn't be the issue

grizzled cliff
#

there is obviously significant overhead doing that, which is why its used only when you really need to track something down

#

but its saved my butt a few times

stray flame
#

and the script is activated by a trigger doing
remoteExec on execVM with targets being set to 0
(yes I did formulate it as it should be in the actual trigger I just dont have the game up to copy it. But I know its the correct one)

Basically doing
[DataTerminal1, 3] remoteExecCall ["BIS_fnc_dataTerminalAnimate", 0]; to a execVM for my script.

First time, it works fine, second time on another voiceline also using that, i belive it just repeated 3 time (3 players on server if you include me)

#

now I was wondering if for this situation having targets set to 0 could have anything to do with the seemingly odd change of outcome

#

or if I should just double check so some trigger isnt set to not be "server only" or something

winter rose
#

why remoteExec, animate is global, no? 🀨

stray flame
#

say3d

#

is my main thing

winter rose
#

why post another code then

stray flame
#

Yes for the example given

#

I did it to be safe

#

I mean I could undo it probably I just had no idea

winter rose
#

I have no idea what you are about

post the code that repeats and let's start from there?

stray flame
#

okay, I did a remoteexec on a execVM (script) containing this. Target set to 0



Captive_1 disableAI "move";
Captive_1 switchmove "Acts_AidlPsitMstpSsurWnonDnon03";
Sleep 1;
Captive_1 switchmove "Acts_AidlPsitMstpSsurWnonDnon_loop";
Captive_1 playmove "Acts_AidlPsitMstpSsurWnonDnon_out";

Sleep 5.3;


Captive_1 playmove "Acts_starterPistol_in";
Sleep 1;
Captive_1 say3D "Prisonner_Thanks";
Captive_1 playmove "Acts_starterPistol_loop";
Captive_1 playmove "Acts_starterPistol_loop";

Which would end up with it saying that voiceline 3 times.
Is setting target to 0 the issue, or something else causing this to be said 3 times in repeat

#

maybe say3d when being handled this way is more acward than sideRadio

winter rose
#

my current bet:
you remoteExec something in a repeat trigger
and everytime someone enters it it triggers that

OR

maybe triggers are created on the client and the condition is true immediately therefore triggering the thing

stray flame
#

that is possible

#

and I will then check that

winter rose
#

so yeah, make it server only and let the server remoteExec what needs to be remoteExec - e.g only say3D
also use disableAI before joinSilent

stray flame
#

ah alright

winter rose
#

wait, playMove/switchMove are local too
so rather remoteExec the whole script on the group's owner

stray flame
#

is there anything on the wiki for these commands that gives me and idea if its worthwhile doing remoteexec on them?

#

ah

#

on the groups owner?

winter rose
winter rose
queen cargo
#

also apparently you've never seen a C project.
well @grizzled cliff where you have a debuger it does not matters how your variables are built

stray flame
winter rose
#

Global Argument, Local Effect

stray flame
#

ahhhhhh

#

alright

#

that makes much more sense

winter rose
#

as in "any unit can be chosen, but only you will see the person talking"

stray flame
#

I thought it said like "yeah this is global sometimes and local other times"

#

that makes a lot make more sense

winter rose
#

yeah no, we try to be a tad more precise than that usually πŸ˜„

stray flame
#

I would hope so but this is already borderline witchcraft

winter rose
#
  • make a server-side, no-repeat trigger
  • link that trigger to the group (if you have only one group that can free that guy)
  • set the trigger to "any unit"
  • on activation: remoteExec on the group (remoteExec ["stuff", groupWest])
  • in the script file, remoteExec what is required

so only one machine tells others what to do

stray flame
#

I will write this down in a note to myself as rules thanks

#

its probobly worth a mention

#

that the players arent the talkers.

#

but that maybe a given

queen cargo
#

for the tracing, i have very basic tracing as i never was a fan of footers

stray flame
winter rose
#

ideally:
server-side trigger
condition: units groupWest inAreaArray this isNotEqualTo []
activation: server exec one script or server tells another machine to exec that script
the script is run on one machine only, so it may use remoteExec

meager granite
#

@still forum Actually, having resize return resized array will be useful too

pliant stream
#

you could always write an sqf debugger...... ;D

meager granite
#

My practical example, adding UI coordinates, [0.5,0.5] vectorAdd [0.1,0.1] returns [0.6,0.6,0] and if you feed that into ctrlSetPosition, it changes control dimentions and not just the position.

#

If resize returned the array, you could do:
_ctrl ctrlSetPosition (_old_pos vectorAdd [0.1,0.1] resize 2); without extra variables or selects

#

Some other array commands could've used it too.

grizzled cliff
#

heh, all the hooks are in the code for a debugger in sqf

queen cargo
#

sure @pliant stream, just gimme access to the scriptengine

grizzled cliff
#

just not released

#

probably not that stable

#

:P

pliant stream
#

yeah talk about overhead

grizzled cliff
#

they could add it to the diag exe though

#

that'd be nice since we were promised sorta a sqf debugger

tough abyss
#

!help

#

Bot was lying to me

#

!roll 10

#

commy2 rolled 8!

#

Wow. Thats silly.

lone glade
#

!roll 100

tough abyss
#

alganthe rolled 47!

lone glade
#

yep that's a dice roll

tough abyss
#

!roll 0

#

aww

#

!roll -1

#

!roll 1

#

commy2 rolled 1!

pliant stream
#

!roll 1

tough abyss
#

Foxy rolled 1!

pliant stream
#

!roll 1

tough abyss
#

Foxy rolled 1!

pliant stream
#

is this thing zero exclusive?

still forum
#

!roll 2147483648

pliant stream
#

that makes no sense

lone glade
#

how do you physically roll something with only one face ?

still forum
#

!roll 2147483646

tough abyss
#

Dedmen rolled 2106052863!

still forum
#

32 bit ^^

tough abyss
#

!roll 1E2

#

!dice 2

#

commy2 rolled 2 dices. Result: 0, 2

#

Nice dice. Rolled a 0

bold comet
#

gosh some of the discussions above really hurt the eyes and head

lone glade
#

I know right ? all those dices

bold comet
#

@tough abyss as you don't seem to read your forum pms :p I was asking if it's cool to use/modify your cleanup script

#

and nope not talking about the dices

tough abyss
#

dices?

lethal cave
#

floor (random 6)

bold comet
#

gives a number between 0 and 5

lethal cave
#

yeah

tough abyss
#

But thats wrong. My dice always go from 1 to 6

bold comet
#

ceil (random 6) :>

lethal cave
#

yeah much better

#

i fucked up

bold comet
#

lol

tough abyss
#

ceil random 6 makes the 6 slightly less probable

#

1 + floor random 5

bold comet
#

yay nerd talk incoming

tough abyss
#

Well the channel is called scripting

lone glade
#

put the numbers into an array, shuffle it and then _array select floor random count _array

bold comet
#

random 6 gives anything between 0 and 5.999(...) doesn't it ?

#

or bis_fnc_randomSelect

tough abyss
#

In SQF yes

bold comet
#

if it's really random

#

if someone checked

tough abyss
#

random 6 is always lower than 6

#

And might be 0

bold comet
#

yes it is

#

ha ok so it's a real nerd talk :

#

:p

pliant stream
#

All missions see the same profileNamespace.

tough abyss
#

[1,2,3,4,5,6] select random floor 5

winter rose
bold comet
#

i'd go with bis_fnc_randomSelect

#

in actual sqf

lethal cave
#

[1,2,3,4,5,6] call BIS_fnc_selectRandom

queen cargo
#

do you guys rly try to randomly get some floored value ?

lone glade
#

select random is just select floor random count put in a function

bold comet
#

yeah people are bored apparently

#

yeah but that function has a cool meaningful name

#

hiding ugly code being cool meaningful names is cool

#

behind*

tough abyss
#

I like having 4 blue words next to each other in my syntax highlighter, so I write select floor random count

lethal cave
#

i'm impressed that this chat doesn't support selecting and copying

#

and that's a scripting channel

lone glade
#

it does in the desktop app

#

yeah people are bored apparently
7:18 PMZbugyeah but that function has a cool meaningful name
7:18 PMZbughiding ugly code being cool meaningful names is cool
7:18 PMZbugbehind*
7:19 PMcommy2I like having 4 blue words next to each other in my syntax highlighter, so I write select floor random count(edited)
7:20 PMrebeli'm impressed that this chat doesn't support selecting and copying
7:21 PMrebeland that's a scripting channel

lethal cave
#

oh okay

#

i heard there's an addon for firefox that can make copying happen in the web version

lone glade
#

uuuse the desktop aaaaaap

tough abyss
#

don't listen to the frenchman

open hollow
#

How a β€œmission” is identified ?
So can use the values in more than one mission

hallow mortar
solid star
queen cargo
copper cedar
#

Pr0gramm User? 4Head

bold comet
#

well if it runs better i'd like to try the new version :) not that there's any performance issues atm but it can't hurt

#

X39 your way to make points is much too aggressive and everyone will consider you a troll, just saying

lone glade
#

The "problem" you mention X39 is non existent

daring zinc
#

@queen cargo you don't seem to understand what you're looking at when you linked that github search for define FUNC

queen cargo
#

@bold comet would not make fun without it

#

mimimi @daring zinc small issues with that post

#

it is not getting better with EFUNC

#

but dont worry

#

will fix the link for ya

lone glade
#

Do you even understand what you're looking at ?

shut flower
lone glade
#

The pbos, folders and file hierarchy NEVER changes.

queen cargo
#

The pbos, folders and file hierarchy NEVER changes.
THANKS

#

SO WHY YOU USE FUCKING MACROS

daring zinc
#

jesus christ dude. get laid. get high. or just try to finally dislodge that redwood from your digestive tract

tough abyss
#
The arguments of the pro-macro side

Nonsense ... ALL of em

I vote X39 for republican presidential candidate!

queen cargo
#

the ENTIRE argument of @lone glade was about maintainablility
and that is ONLY the fucking case when you rename stuff or move it to the endles swhatever

daring zinc
#

also, good job adding extra line breaks to your example you fucking tryhard

queen cargo
#

pff @daring zinc, resolved your bollock so it matches fine into half display and did not modified the original code so nobody could say "HE MODIFIET IT BLA" and flame like that shit on me

#

thats why the reflink is there too

shut flower
daring zinc
#

@queen cargo i have no idea what that trainwreck of a sentence is supposed to mean

shut flower
#

Looking at this code could look like: if(_sideCheck != sideUnknown && {playerSide != _sideCheck}) exitWith {hint localize "Ultra_log_message..................................."};

winter rose
fervent wyvern
#

hi, i'm trying to create a inventory like old survival horror games but i don't know how to create the inventory itself (the gui i know how to do it), have anyone idea where i can find info of how to do it?

lone glade
#

three ` before and after your code

winter rose
#

I don't know how to do that, I know it's a pain to do so though

#

like, big time

sullen sigil
#

gui in arma is uh
just dont

still forum
#

what looks better

[QGVAR(colorTextMax), QGVAR(colorTextMin), QGVAR(colorShadowMax), QGVAR(colorShadowMin), QGVAR(textSize), QGVAR(shadowSetting)]
or
["ACE3_interact_menu_colorTextMax","ACE3_interact_menu_colorTextMin","ACE3_interact_menu_colorShadowMax","ACE3_interact_menu_colorShadowMin", "ACE3_interact_menu_textSize", "ACE3_interact_menu_shadowSetting"]
fervent wyvern
#

i just got the idea of detecting the item on the real inventory and use a 'if' to detect it, in case it is on the inventory, it shows the image of the item in the gui inventory

daring zinc
#

nah all those "interact_menu"s are crucial information bruh

fervent wyvern
#

i'm trying to remake dino crisis maintaining some old things like the inventory and interactions

lone glade
#

especially when you have 72 modules.....

tough abyss
#

I don't get how macros prevent you from debuging.

shut flower
#
    "ACE3_interact_menu_colorTextMax",
    "ACE3_interact_menu_colorTextMin",
    "ACE3_interact_menu_colorShadowMax",
    "ACE3_interact_menu_colorShadowMin", 
    "ACE3_interact_menu_textSize", 
    "ACE3_interact_menu_shadowSetting"
]```

looks the best
daring zinc
#

i'm gonna go get myself a pumpkin spiced latte and write a blogpost about all of this.

queen cargo
#

i also fixed your stupid syntax of yours @daring zinc ((in blogpost))

daring zinc
#

huh?

tough parrot
tough abyss
#

Well the intendation is slightly off

#

Also the second example still uses macros

queen cargo
#

read further commy2

daring zinc
#

let's talk about what caused @queen cargo to fall to the dark side

#

or rather, the salty side

queen cargo
#

so you want to start to denounce like the rest too now?
feel free to do so

pliant stream
#

whys everyone in this channel so mad

tough abyss
#

@daring zinc Any idea how to go about scripting a units legs as broken in ACE?

shut flower
#

Well the intendation is slightly off

Bug caused by discord. raw version looks fine

tough abyss
#

I mean on the blog

daring zinc
#

@tough abyss that's @tough abyss 's business

#

i'm a "basic bitch"

queen cargo
#

copied 1:1 from the ACE3 example @tough abyss
just modified the stuff after the if a lil so it matches in small screens too

tough abyss
#

I still don't get how it prevents you from debuging. There is no sense in resolving the name any time. Just let the preprocessor do that. The macros can stay while debuging

jade abyss
#

Okay, carry on guys. I just made popcorn (salty - lol)

tough abyss
#

The macros even help when debuging , because you can redefine the macro and print potential valuable info in the RPT

#

How do I summon @tough abyss ?

shut flower
#

Yeah, let's overload the preprocessor with unnecessary macro shit :P

daring zinc
#

... maybe it was an over abundance of sweet food in his childhood, so now his body produces unnatural amounts of salt as a countermeasure...

tough abyss
#

The preprocessor is not overloaded though

#

That doesn't even make sense

shut flower
#

It's unnecessary load at all

tough abyss
#

@tough abyss we currently do not have a proper way of doing so for third parties.

#

You compile everything on init anyway. After that nothing is "overloaded"

#

You could try using the handleDamage function directly

nocturne bluff
#

Pewpew

#

Wow this is amazing

queen cargo
#

You compile everything on init anyway
thanks god we do not have better ways of doing that in A3 by today

nocturne bluff
#

You really set fire to this place while i played with a full team of ruskies on CSGO

tough abyss
#

Though of course using hitpoint damage would prevent walking as well, but I assume you would want some specific injuries to go along with it, no? @tough abyss

sullen sigil
#

(It should be horizontal and pointing in its direction of travel)

#

private _vdirandup = [getPosASL _ship, (getPosASL _ship) vectorAdd (_ship getVariable ["KJW_CapitalShips_Velocity",[0,0,0]])] call BIS_fnc_findLookAt; -- gets vectordirandup of the current position to the position of its motion

jade abyss
#

(now imagine, doing this in Skype -> Hell)

sullen sigil
tough abyss
#

I don't get it. How would the preprocessor be overloaded? The more you make with the preprocessor, the less the engine has to do when calling the functions

sullen sigil
pliant stream
#

let's just create a new shiny OO language that compiles to SQF and never deal with this circle jerk again :D

tough abyss
#

@tough abyss That's correct. Looking to leave a player in a relative incapacitated state. I can set them unconscious, but not break their legs

shut flower
#

Compiling on init? Wait, have seen this in epoch and exile server side code, it's the elegant way to compile funcs

little raptor
sullen sigil
#

hemtt is vertical, should be horizontal and pointed in its direction of travel

little raptor
#

what is the code you move it with?

shut flower
#

At least in arma 2

sullen sigil
tough abyss
#

@tough abyss Maybe force fractures?

sullen sigil
#

all parameters explained at the top

#

cba pfh so i can pass params in

shut reef
#

Where can I retrieve the respawn delay that was set in the mission attributes?
I only found missionConfigFile >> "respawnDelay", but that is only valid if the respawn delay is set in the description.ext, not if it's only set in the attributes.

Google ain't helping 😦

I would assume it's in the missionNamespace maybe?

tough abyss
#

Fractures are not implemented

nocturne bluff
#

We do have the CfgFunctions system..,

little raptor
#

also I'm not sure what BIS_fnc_findLookAT does. wiki page doesn't say anything useful

#

params [["_start", [0.0, 0.0, 0.0], [[]]], ["_end", [0.0, 0.0, 0.0]

queen cargo
#

@pliant stream ha ha ... nice reference

sullen sigil
# little raptor what is barry and _ship?

_ship is the cba logic object, says at the top.
barry is a minivan ruin object to make sure im not going insane, which im not
(initial position is 90 degrees the other way -- facing player)

sullen sigil
#

so vectordirandup from one position to another

little raptor
#

what is the point of the _logicObject? meowsweats

sullen sigil
#

so i can attach more objects (like the hemtt) to without desync due to lower simulation rate

little raptor
#

is _ship attached to it?

sullen sigil
#

yes

#

no

#

wait

#

sorry i got confused

#

_ship is the logic object for the ship, it has the hemtt attached to it
the logic object is placed equidistant from the destination (diagram coming) and moved in the direction of the destination, with _ship moving towards it in order to form a curve

#

drawing diagram now

sullen sigil
#

apologies for the flashbang, hope that helps

pliant stream
#

thanks :) what was i referencing again..? :innocent:

sullen sigil
#

_logicObject moves straight to destination, _ship moves towards _logicObject whilst it does that in order to make it curve towards destination

queen cargo
#

OOS

sullen sigil
unborn zinc
#

Sorry to interrupt anything, just get back to me when you can. I am looking for a script/addon that replicates the logistics/building of Mike Force. Tried R3F but it seemed very unbalanced/unsupported and bare bones at the time. Thanks for your time

tough abyss
#

@tough abyss Balls. Alright thanks for the reply, I appreciate it

little raptor
sullen sigil
little raptor
little raptor
sullen sigil
#

it's bis_fnc_attachToRelative but yes

#

setvectordir is done just before that -- but not after

little raptor
sullen sigil
#

hm?

little raptor
#

just do a simple attachTo

unborn zinc
#

For what it seems yes, I’ve asked about ripping it for other maps and whatnot and people seemed to shy away like it was pulling teeth. I’d be willing to attempt it if I knew where to begin

sullen sigil
little raptor
#

right now you want the hemtt to have the same dir and up as the CBA obj

#

so its vdup must be [[0,1,0], [0,0,1]]

sullen sigil
#

Am I able to have anything like that in that case as there's some objects I don't want to have that thonk

tough abyss
#

If you need some specific information on how to deal with injuries, send me a PM.

sullen sigil
#

Also -- attached objects don't get touched after they're attached at any point either

#

Only exception is _obj setFeatureType 2

shut reef
# little raptor what function do you use?

You mean which function do I use to set the time?
setPlayerRespawnTime
But the issue is that I don't know how I can retrieve the default time set in the mission attributes at runtime to reset it after I changed it to sth else