#arma3_scripting

1 messages Β· Page 14 of 1

still forum
#

one pixel will be a spike, if you change many pixels, you have a flat area

pastel pier
#

Are there any helper functions to make this easier?

#

besides the example

little raptor
#

those triangles make the terrain

pastel pier
#

Am i just moving the triangles ?

little raptor
#

each point in positionAndAltitudeArray corresponds to a terrain vertex

little raptor
pastel pier
#

vertices are not the same as vectors?

still forum
#

a vertex is a point

#

a triangle is made up of 3 points

#

the terrain surface is made up of triangles

#

setTerrainHeight sets the height of points

little raptor
#

I'll upload a picture to the wiki that better explains how the terrain is formed

pastel pier
#

It sets the 3 points of 1 triangle or just one point of that triangle?

little raptor
#

1

#

when you move 1 vertex you affect 6 triangles tho

#

because each vertex is shared by 6 adjacent triangles

pastel pier
#

K

proven charm
#

I have the Dll in @myAddon folder. how do i get that path?

little raptor
#

the question is why do you want the path to the DLL?

#

path to DLL has nothing to do with path to files inside a PBO

still forum
#

if you have filePatching on, then @myAddon might just work
if not, fileExists is for checkin ingame files, not files on your disk.

proven charm
#

trying to get around arma holding up the DLLs

still forum
#

I don't think you can

#

But you are using C# anyway, so there is generally no need to unload/reload the DLL, you can just live-edit

proven charm
#

well I was thinking of copying the DLLs with different names

#

@still forum live edit doesn't work, i tried

#

it says the changes were applied but they are not

still forum
#

make a dll that gets you the new name of the new dll's

pastel pier
#

The deform mod does a lot to make terrain transformation fun.

proven charm
#

im using fileexists check to find the latest copied dll πŸ™‚

still forum
#

You are trying to do that and failing, as far as I can see

proven charm
#

it works to a point

proven charm
#

thx leo

#

I put the DLL in arma root folder and they can be found from there... so my script seems to work πŸ˜„

open fractal
#

forgot to thank you for this, worked well

proven charm
#

not sure but I think I need the DLL to exist in addon folder inorder for arma to be able use it in the main folder

#

its so with .sqf files and filepatching as well

still forum
#

That is because sqf and filepatching use Arma's filesystem.
But DLL's don't at all

sullen sigil
#

...is there an EH that fires when the players cursor goes over another unit or am i going to have to use an oneachframe

still forum
#

no eh

sullen sigil
#

has anyone got any smart ideas for not using an oneachframe

sullen sigil
#

i suppose i could use a waituntil cursorobject type is a unit πŸ€”

#

but thats probably not that much better

winter rose
#

onEachFrame seems appropriate?

#

if isNull cursorObject exitWith, boom

sullen sigil
#

any better than a waituntil?

winter rose
#

none offered me chocolates, so nobody is better than anyone here

open hollow
#

you mean
oneachframe "code"
or
addmissioneventhanlder ["eachFrame",{}]

sullen sigil
#

either it doesnt matter which i do so long as its optimised

#

it'll be running as long as the ir laser is turned on

open hollow
#

the lastone is much better

sullen sigil
#

so add the EH when laser is activated

#

....which there's no EH for in the first place

still forum
sullen sigil
#

sounds like this might not be smart for performance

#

meh its a meme so i'll do it anyway

open hollow
#

you can add and remove the oneach frame when the laser is on and off... but yea

sullen sigil
#

yeah but i would need to be checking for when the laser is on and off

winter rose
open hollow
#

if you have an early exitwith that checks something simple wont be a problem

sullen sigil
#

...and then checking the units orientation towards the player

winter rose
#

and that the laser heats surfaces as well 🀣

sullen sigil
#

yeah this is a bug theres no ir laser on eh please fix!!!11!!

#

i'll do a proof of concept then tidy it

#

time to figure out how on earth i check the type of object returned

open hollow
#

cursorObject gives you the object so...

sullen sigil
#

yeah then i want errrrr

#

isEqualType player or something dont i

#

because player should always be an object..?

open hollow
#

to bohemia we are all objects notlikemeowcry

sullen sigil
#

this is going to be so stupid but i think its great

winter rose
open hollow
open hollow
winter rose
#

what he ↑ said

#

sorry, what it said πŸ˜‹

sullen sigil
#

wait yeah

#

christ

#

i mean checking its a unit

#

an unit

#

no its a unit

winter rose
#

a unit*

#

yep

sullen sigil
#

god i hate english

winter rose
#

NUnit is a unit test framework for Visual Studio

#

unrelated

open hollow
#

cursorobject iskindof "man" meowawww

sullen sigil
#

thats what im looking for

#

thanks πŸ˜…

open hollow
#

np πŸ˜„

sullen sigil
#

this is just a meme idea otherwise i would be scouring every inch of the wiki first

open hollow
#

the best scripts came from a meme idea

winter rose
#

"CAManBase"

sullen sigil
#

im literally blinding AI/players whenever they get an ir laser shone in their face

winter rose
#

otherwise, bunnies are "Man" (iirc πŸ˜„)

sullen sigil
#

omg yes

#

kill the bunnies

open hollow
#

bees too? lol

winter rose
#

that, IDK

sullen sigil
#

ive done something wrong with the exitWith thonk

#
if (player isIRLaserOn currentWeapon player == false) then {
        exitWith {};
    };```
#

probably something stupid

#

either that or the if statement isnt correct

open hollow
#

is just exitwith

#

no then

#
if (player isIRLaserOn currentWeapon player == false) exitwith {}
granite sky
#
if (player isIRLaserOn currentWeapon player == false) exitWith {};
sullen sigil
#

oh

#

brug moment

#

thanking you

#

this is a bit silly

#

...do i want to go full meme and put ace overlay to blind them or is that too silly

open hollow
#

can use lineintersect and use ace framework to cause burns on the selection lol

sullen sigil
#

yeah but zoom your eyes go bye

little raptor
#

they're not animals

sullen sigil
#

the cia will be with you shortly

little raptor
#

they're not even "vehicles"

sullen sigil
#

can i get the cursorobject of ai

#

im assuming no

little raptor
#

no

sullen sigil
#

sad

#

i suppose i cannot demonstrate this in that event

little raptor
#

you need to do that yourself

open hollow
#

cursorobject is just an lieintersect so... might be a litte more expensive, but posible

sullen sigil
#

ah what the hell this is just a meme idea why not

#

...could i not just checkVisibility from ai to player and the ais orientation

#

or is that a dumb and overcomplicated idea

coarse dragon
#

has the update affected unit catpure?

little raptor
#

afaik no. why?

coarse dragon
#

because mine doesnt work at all now

little raptor
sullen sigil
#

...so that i can then make the player blind if the AI's laser is on

little raptor
#

the simplest way is just checking their targetKnowledge

coarse dragon
#

i get no errors. and nothing happens

little raptor
#

ai is looking at player
i can then make the player blind if the AI's laser is on
what does it have to do with AI looking? thonk

open hollow
little raptor
#

we do?

sullen sigil
#

blinds player

#

funny

little raptor
#

for that you need to do line intersection

sullen sigil
#

how do i do that with the ais orientation

little raptor
#

selectionPosition, eyePos

#

selPos for getting AI's laser pointer location

open hollow
# little raptor we do?
_group addEventHandler ["KnowsAboutChanged", {
    params ["_group", "_targetUnit", "_newKnowsAbout", "_oldKnowsAbout"];
}];

yep πŸ˜„

little raptor
#

eyePos for player's eyePos

#

you also need the weaponDirection

little raptor
#

it's knowsAbout

open hollow
#

damn, you are right

coarse dragon
#

pilots where jumping out. all good now lol

sullen sigil
#

what is selpos?

#

not coming up on wiki

little raptor
#

I mean selectionPosition

sullen sigil
#

how do i use that to get the ai's ir laser

open hollow
#

vehicleName weaponDirection weaponName

#

gives you the vector

little raptor
#

I already showed you

sullen sigil
#

oh no matrices

#

my worst enemy

little raptor
#

that's too expensive for many AI's tho

#

you can just simplify things

sullen sigil
#

this is literally a meme idea to make the ai blind me when they shine an ir laser at me

little raptor
#

just do _unit modelToWorldWorld (_unit selectionPosition "proxy:\a3\characters_f\proxies\weapon.001")

#
onEachFrame {
  _laserPos = AI modelToWorldWorld (AI selectionPosition "proxy:\a3\characters_f\proxies\weapon.001");
  _eyePos = eyePos player;
  _weaponDir = AI weaponDirection "";
  _laserDist = _laserPos vectorDistance _eyePos;
  _faceSize = 0.1;

  if (_laserPos vectorFromTo _eyePos vectorCos _weaponDir >= cos (_faceSize atan2 _laserDist)) then {
    //blind player
  }
}
#

something like that

sullen sigil
#

bruh thanks lol

#

i assume AI needs to be predefined?

little raptor
#

yes

sullen sigil
#

thought so

#

i suppose i could do forEach camanbase or something and add a missioneh to them?

#

that way it'd work for the player too..?

little raptor
#

that'd be too expensive but yeah

#

also that code doesn't check the line intersection

#

you need to check that too

#

so that you're not blinded thru a wall

sullen sigil
#

roger

#

shouldnt toooo difficult

little raptor
#

you just need to check a line intersection between _laserPos and _aimPos

#

and ignore player and AI

#

lineIntersects works fine here, since you only need the "VIEW" LOD

sullen sigil
#

does that check for the laser on or not? dont think it is?

little raptor
#

no

#

you need that too

sullen sigil
#

roger thats easy enough

#

...now the ai isnt even turning on its laser fml

little raptor
#

set them to combat

sullen sigil
#

ah

#
_objects = nearestObjects [player, ["CAManBase"], 50];

{ _id = addMissionEventHandler ["EachFrame", {
onEachFrame {
_laserPos = _this modelToWorldWorld (_this selectionPosition "proxy:\a3\characters_f\proxies\weapon.001");
_eyePos = eyePos player;
_weaponDir = _this weaponDirection "";
_laserDist = _laserPos vectorDistance _eyePos;
_faceSize = 0.1;

if (_laserPos vectorFromTo _eyePos vectorCos _weaponDir >= cos (_faceSize atan2 _laserDist)) then {
  player addGoggles "G_Blindfold_01_black_F";
}}}];} forEach _objects;``` just testing before adding the extra bits but isnt working aa
#

am i being dumb

little raptor
#

wat?

#

are you adding an EachFrame EH that adds an EachFrame EH? meowsweats

sullen sigil
#

erm

#

yes it would appear i am

#

whoops

#

we'll pretend i never forgot to remove that bit

winter rose
#

*boom*

sullen sigil
#

ok i removed that bit but still no worky

#

i dont think im adding it properly to all the ai am i

winter rose
#

why not add ONE event that deals ALL the AI?

sullen sigil
#

wdym

#

like rather than having the foreach etc?

winter rose
#

you are adding one mission EH for every object

#

*buzz* wrong
add one mission EH that does the calculations

sullen sigil
#

i add the mission eh to each unit not object

#

i think

#

i also dont know how to fiddle with the ai calculations from one EH because i am stupid and have never touched anything other than the player

winter rose
#

you don't add a mission EH to a unit
you add a mission EH to the mission
one for each unit

sullen sigil
#

oh

#

i understand now

#

pea brain moment

#

this however does not solve my issue of having no idea how i would do that

sullen sigil
#

me except im not a dog

winter rose
#

OH YOU DEV ON A MAC??? BAN

sullen sigil
#

me except im not a dog and i dont dev on a mac

little raptor
#

changing it to work with all units is easy

sullen sigil
#

but AI isnt defined and i have no idea how to define it

#

thats my issue heh

little raptor
#

put a unit in 3den

#

right click

#

attributes

#

variable name

#

...

sullen sigil
#

oh

#

i promise im not a dog

#

cool it says eyes go zoom now

#

now time to erm

#

check ir laser is on and the intersect stuff

#

then bother with putting it on each ai

sullen sigil
winter rose
sullen sigil
#

erm

#

rubbish

#

i assumed _this would refer to the object it was added to

#

please dont kill me

winter rose
#

trololo

#

assume

#

when you assume, you make an ass out of u and me

#

that's bad

#

I am slightly disappointed

#

you will die for this. unplugs internet

sullen sigil
#

the AI is running away from me while i try to test it now

#

what have i done

winter rose
#

showed your face?

sullen sigil
#

...

#

thats rude

winter rose
#

to show it, yeah πŸ˜‚

sullen sigil
#

.......

#

i hope your country gets invaded again.

winter rose
#

okay, okay, all jokes aside: what's your code πŸ˜ƒ

little raptor
sullen sigil
#
onEachFrame {
  _laserPos = AI modelToWorldWorld (AI selectionPosition "proxy:\a3\characters_f\proxies\weapon.001");
  _eyePos = eyePos player;
  _weaponDir = AI weaponDirection "";
  _laserDist = _laserPos vectorDistance _eyePos;
  _faceSize = 0.1;

  if (_laserPos vectorFromTo _eyePos vectorCos _weaponDir >= cos (_faceSize atan2 _laserDist)) then {
    if (AI isIRLaserOn currentWeapon AI == true) then {
        if (lineIntersects [_laserPos, _eyePos] == true) then {
        systemChat "eyes go zoon";
        };
    };
  }
}``` i have no clue how lineintersects works if you couldnt tell
#

i tried using the wiki

little raptor
#
onEachFrame {
   if !(AI isIRLaserOn currentWeapon AI) exitWith {};
  _laserPos = AI modelToWorldWorld (AI selectionPosition "proxy:\a3\characters_f\proxies\weapon.001");
  _eyePos = eyePos player;
  _weaponDir = AI weaponDirection "";
  _laserDist = _laserPos vectorDistance _eyePos;
  _faceSize = 0.1;

  if (_laserPos vectorFromTo _eyePos vectorCos _weaponDir >= cos (_faceSize atan2 _laserDist) && {
  !lineIntersects [_laserPos, _eyePos, player, AI]
}) then {
    
  }
}
#

and plz stop writing blabla == true/false meowsweats

sullen sigil
#

i was thinking exitWith wouldnt work in that case because it was still within the if statement for some reason thonk

little raptor
#

when you want something to be true you just write it as is

#

and when you want something to be false you just put a ! behind it

sullen sigil
#

force of habit from poor computer science teachers

#

...and poor me for not breaking the habit

#

ok yeah that does work now thanks heh

#

so then its just erm

#

blinding them

#

and then adding to all units right

little raptor
#

another check I forgot was checking if player is looking at the laser

#

you don't want to blind a player when the back of his head is facing the laser

sullen sigil
#

thats fine just take players orientation from 180 and see if that equals the AI's..?

#

christ, maths...

little raptor
#
_laserPos vectorFromTo _eyePos vectorCos getCameraViewDirection player < -0.25
sullen sigil
#

vectors also works πŸ˜…

little raptor
#

only vectors are valid here

#

because a player's head doesn't move in 2D

sullen sigil
#

mine does

#

so i want if (_laserPos vectorFromTo _eyePos vectorCos getCameraViewDirection player < -0.25) then {/*do shit here*/} right

little raptor
#

yes

#

you might want to store those two vectors beforehand

sullen sigil
#

this is what my granddad must feel like trying to write a text

#

😎

#

it just puts a blindfold on the player for now idk if ill do some fancy stuff

#

now wtf do i do for sticking it on everything

little raptor
sullen sigil
#

that's... probably a better idea for removing it too

#

how on earth would i return the aperture back to the automatic one? just to 0..?

sullen sigil
#

ah so i can just do errrrrrr

#

set the aperture to something super high or something

#

then take it back down incrementally until it goes back to -1 right

little raptor
#

no

sullen sigil
#

wait i couldnt go to -0.5 could i

little raptor
#

just set to 1 to blind

#

and -1 to unblind

sullen sigil
#

yeah but i want incremental blinding and unblinding

#

fuck it this is a meme feature its fine

little raptor
#

the game already does it incrementally

sullen sigil
#

oh lol

#

wait you cant sleep within an oneachframe can you

#

...i can take it outside the oneachframe

#

i think?

#

no i cant

#

how on earth do i put delay within an oneachframe

winter rose
#

you don't

sullen sigil
#

sadness

#

guess the player is now blinded forever

winter rose
#

set a variable on the player when blinded and compare the last time it was blinded to now

#

ta-daaa, frame calculation

sullen sigil
#

no thank you i will simply make the player suffer.

winter rose
#

frame calculation that I dislike doing, with Reforger and all

sullen sigil
#

setaperture doesnt actually blind the player if they have nv turned on

#

i shall simply do an ace goggles function

#

thingy

winter rose
#

what about setApertureNew?

sullen sigil
#

whats the difference? i cant tell

past wagon
#

is there a way I can prevent pressing a key to auto-select an item in a listbox alphabetically?

little raptor
past wagon
# little raptor override the key using keyDown EH

I tried this already but it didnt work:

    findDisplay 3000 displayAddEventHandler ["KeyDown", {
        params ["", "_key"];
        if (_key in [30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44]) then {
            true
        } else {};
    }];
little raptor
#

if (_key in [30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44]) then { true } else {};
just write _key in [30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44]

#

anyway...

#

did you try adding it to the ctrl itself?

past wagon
past wagon
#
    displayCtrl 3001 ctrlAddEventHandler ["KeyDown", {
        params ["", "_key"];
        (_key in [30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44])
    }];
```I tried this and it doesnt work
#

I guess I just wont disable it, not a big deal

distant belfry
#

with the new SQF player setUnitFreefallHeight 1000; can I slap that in my script anywhere? Or does it have to be in a particular document? Like the initPlayerLocal.sqf for example?

warm hedge
#

Anywhere

distant belfry
#

Sick thanks, unlimited zero-G height here I come

past yarrow
#

Has anyone done snow yet?

warm hedge
#

Straight to the point please

sharp grotto
past yarrow
#

That should be easy enough.

sharp grotto
hallow mortar
#

Yes, snowflake4, snowflake8, and snowflake16 were added in 2.10. Per KK, the numbers are the number of frames in the animated texture, intended for use with different graphics quality settings

lofty oriole
#

Anyone know if theres a event or command that checks when a unit has eyes on an enemy or engaged in combat

past yarrow
#

reveal

warm hedge
#

reveal sets the reveal state, not a getter

#

behaviour I guess

lofty oriole
#

Is EnemyDetected event what it is?

warm hedge
#

If you prefer yes

past yarrow
#

Oh, maybe I was thinking knowsAbout

manic sigil
#

'Oh boy, finally my building-moving-with-tools feature is ready to test!'

Swing, hit, takes three seconds to update.

'Beautiful πŸ₯² '

past wagon
#

is there a way to override a player's night vision goggles and give them the full screen effect?

hallow mortar
#

Do you mean giving them full screen night vision?
One way is to give them this secret NVG item: Integrated_NVG_F
It will appear as a sand-coloured standard NVG, so that might be a problem if that doesn't fit your fashion.
If it's for a cutscene, you can make a new camera, switch the player's perspective to it, and set camUseNVG true on it.

past wagon
rough summit
novel delta
#

Is anyone aware of a way to completely disable thermals server wide including vehicles, NVG types and binos?

novel delta
#

do you have any suggestions for how to run that globally constantly?
if not its fine

rough summit
#

I think u need run it locally

#

for every player

novel delta
novel delta
open fractal
#

@novel delta ```sqf
player addEventHandler ["VisionModeChanged", {
params ["_person", "_visionMode", "_TIindex", "_visionModePrev", "_TIindexPrev", "_vehicle", "_turret"];
if (_visionMode != 2) exitWith {};
if (!isNull _vehicle) exitWith {};
_person action ["nvGogglesOff", _person];
}];

#

execute locally

#

like initPlayerLocal.sqf

novel delta
#

shiiiit thanks man

open fractal
#

disableTIEquipment will work on vehicles

#

except PIP

#

depending on the vehicle/modded asset

past wagon
#
player addEventHandler ["HandleDamage", {
    params ["", "_selection", "_damage", "_source"];
    _oldDamage = player getHit _selection; //The damage of the selection prior to the hit... I think?
    _damageAmount = _damage - _oldDamage; //The damage taken by the hit?
    switch (true) do {
        case ((vehicle player) isKindOf "Car" && (isNull _source || _source isEqualTo player)): { _oldDamage + (_damageAmount / 3) };
        case ((vehicle player) isKindOf "Steerable_Parachute_F" && (isNull _source || _source isEqualTo player)): { _oldDamage };
        case (!(isDamageAllowed player)): { _oldDamage };
    };
}];
```I'm using this script to reduce/remove the damage taken by players in certain situations, but it isn't working properly. I have been taking way more damage than I should in some cases. I'm not sure what the problem is...
granite sky
#

You're using _player in the cases, which isn't defined.

past wagon
#

oh dang

#

actually it was defined, I just removed it for some reason before I posted it here and never tested it lol

granite sky
#

Are you relying on that lot coming out as a nil return if none of the cases hit?

past wagon
#

if none of the cases hit, I want the default damage to be given

#

so I dont want it to return anything in that case

granite sky
#

shrugs

#

Identify a specific case where you're taking more damage than expected, and dismantle it.

past wagon
#

I jumped off a 5-foot ledge with 70% health and died instantly

#

I'll test it again

granite sky
#

That doesn't seem to be covered in your cases, so have you actually checked that it returns nil?

#

if no default block is provided and no case is matched, the switch block returns the default value true, otherwise it returns what the valid case block returns.

past wagon
#

ok

granite sky
#

true probably equates to 1? :P

past wagon
#

yeah

#

thanks

#

adding a default should fix it then, I'll try that

rough summit
#

how can i rotate tank turret?

obj animateSource ["mainturret",  rad 90];

This part of script works only in ugv

warm hedge
#

Is that a Simple Object?

little raptor
rough summit
#

lol, i first learned about them when i used nearEntities

rough summit
harsh vine
#

so i have script that checks when i kill a civ unit it show shows something...all works fine with units that i have placed from the editor but it does work with spawned units example:

_grp = createGroup civilian;
_ap = _grp createUnit [ "C_man_p_beggar_F", position player, [], 0, "FORM"];
little raptor
delicate lotus
#

How can I get an array of soldiers which the player has currently selected in the command bar / menu?

harsh vine
# little raptor And how does the script look like?
_civilanUnits = allUnits select {side _x == civilian}; 
{
_x addEventHandler ["Killed", {
params ["_unit", "_killer", "_instigator", "_useEffects"];
if (isPlayer _instigator) then {
hint "Hello";
    };

}];
} forEach _civilanUnits;
proven charm
#

why does the string passed to extension get extra characters when doing this: "ArmaTools" callextension ["doesFileExist",["file.txt"]] in debugger the string has become like this: "\"file.txt\""

warm hedge
rough summit
#

Just a tank, created via createVehicle

warm hedge
#

Which tank?

rough summit
#

t-100

#

But it didn't work for others, like Angara, Slammer, all IFV etc

#

I think i do something wrong, but not sure

warm hedge
#

Oh yeah, the UGV example... In the first place I don't really know why it does work πŸ˜„

rough summit
#

(=

#

Im try found something like selection setDir, but didn't find anything

hallow mortar
#

Some animations like turrets and wheels are engine-controlled and can't be modified on non-simple vehicles - the UGV is an exception.
For turrets and only for turrets you can use lockCameraTo. You'll need to create a dummy AI gunner to make it work.

rough summit
#

I know about dummy AI, but im try create system for land vehicles, which defend them against AGM. In my opinion tanks turret must turn to missile and launch smoke screen.

hallow mortar
#

lockCameraTo also works on players. I assumed you were using an empty vehicle, in which case you would need to give it a gunner, but if you've got a player in the seat that also works.

rough summit
#

Im write script, which intercept missile, if it fly near smokes, but for best experience i want turn turret on it)

rough summit
warm hedge
#

Ahh thanks for this unrelated convo with what I'm making, now I can finish the product... πŸ˜…

past wagon
#

since the wiki is down, does anyone know the command to set the image of an RscPicture?

warm hedge
#

ctrlSetText

past wagon
#

oh ok, thanks

winter rose
warm hedge
#

Not a script error. A faulty made Mod does

magic imp
#

happens after the first shot

#

i didnt know where to put it

winter rose
south swan
winter rose
#

negative

#

well, double negative

#

no, it does not include that πŸ˜„

rough summit
#

So, after some time my tank already turn turrent on the missile but...
I can't handle moment, when turret turns on missile side for launch smoke shells.
Im get relative direction from missile to tank and compare with main weapon direction, but it don't work.
Only when missile gets closer than 100m

        _target lockCameraTo [_missile, _target unitTurret (gunner _target), true];

        private _missileDirection = _missile getDir _target;

        _missileDirection = _missileDirection - 180;

        waitUntil {_missile distance _target < 100 || _missileDirection == ((_target weaponDirection (weapons _target select 0) select 0) atan2 (_target weaponDirection (weapons _target select 0) select 1))};

        [_target, "SmokeLauncher", [0,0]] call BIS_fnc_fire;
south swan
#

assumption 1: _missile getDir _target - 180 can be negative. Can you try _target getDir _missile instead?

rough summit
#

i know, but weaponDirection can be negative too πŸ˜„

#

weaponDirection has range from 180 to -180

tough abyss
#

is the biki down?

#

or how long till it goes down?

#

if so then i will go cry

rough summit
#

go cry bro πŸ˜„

south swan
tough abyss
south swan
rough summit
#

Ye, im check via systemChat nums of missile direction and turret direction with sleep 2;
so, missile dir is 76.1178 and turret dir is 76.8742

#

it works, thanks

winter rose
# tough abyss is the biki down?

but yeah biki down
I mean, the "maintenance in progress" screen is a hint πŸ˜„
back in an hour or so? updating stuffz
and yes, for commands and functions, the COMREF is available πŸ™‚

tough abyss
#

comref?

#

where is my biki lou?

stable dune
#

Hey, Is there an EH when an enemy eye contact/detects one of the players?

winter rose
stable dune
#

Nice, tried found out of that but wiki is maintenance

winter rose
#

BIKI down, please wait

stable dune
#

I will

#

Can I have some waiting music 🎡🎢

winter rose
little raptor
little raptor
#

So ofc it never recognizes units that are created after

coarse sedge
#

Anyone here familiar with R3F Logistics script? Or acutally the R3F Enchanced Logistics?

I've customized it and everything is working just fine. I am only unable to implement ''B. Creation credits management'' (from R3F documentation) which states:

You can interact on the credits of a specific creation factory. It can make an interaction with your mission progress (e.g. when an objective is done, money is sent to the factory as a recompense). The amount of credits is associated to a specific factory and is global to every players. The following script to be executed on the server side (or only one client) adds 15 000 credits to the creation factory named "my_factory" :

private ["_credits"];
// Get the current credits of my_factory
_credits = my_factory getVariable "R3F_LOG_CF_credits";
// Add 15 000 to the value
_credits = _credits + 15000;
// Set the new credits
my_factory setVariable ["R3F_LOG_CF_credits", _credits, true];```

I don't want 15000 credits to be added, I want _credits that are associated to my_factory to be set at 1000 every time my_factory enters the trigger area. My_factory is a HEMMT truck.
I've created a **credit_refill_1000.sqf** and adjusted it to:

```sqf
private ["_credits"];
// Define credits
_credits = 1000
// Set the new credits
my_factory setVariable ["R3F_LOG_CF_credits", _credits, true];```

I've placed a trigger:ο»Ώο»Ώ

Type: None
Activation: Any Player

Activation Type: Present
Repeatable: Yes
Server Only: Yes
Condition: this && credits < 1000
On Activation: _thisList execVM "credits_refill.sqf";

And it was suggested to me to adjust the** credit_refill_1000.sqf** to:
```sqf
params ["_vehicles"];
if (my_factory in _vehicles) then {
    _credits = 1000;
    my_factory setVariable ["R3F_LOG_CF_credits", _credits, true];
};```
#

Couldn't get it to work...Does anyone see what am I doing wrong?

proven charm
little raptor
#

Beacuse it sends a string to the extension

proven charm
#

but how do you send strings then?

little raptor
#

You just have to parse them by the extension I guess...

proven charm
#

hmm

little raptor
#

Or try texting them

proven charm
#

another thing I noticed was that \\ become \\\\

little raptor
#

Yes. \ has to be escaped

proven charm
#

I kinda understand that....

#

I solved it by using / instead

#

maybe string getting str'ed is a bug?

still forum
#

no its not

#

you have to handle that in your extension

proven charm
#

ok

#

though that applies only to args?

little raptor
#

First try texting as I said

still forum
#

because args can be multiple data types, that all get converted to string

proven charm
#

alright

copper raven
little raptor
little raptor
#

@copper raven

str """" -> """"""""""
copper raven
#

yeah but that's your problem if you pass a string like that already πŸ˜„

#

what i sent would give you the string you passed to the callExtension, before the extra stringifying, so if you passed """", you'd get "\"\"" back

little raptor
#

the thing is that the game already strs it tho...

#

you try to pass """" but you receive """""""""" in the extension

sullen sigil
#

does attaching a vehicle with collisions disabled to the player bring them back or something? having a hard time working out this bug where my player gets injured/dies due to colliding with helper objects even though allowdamage is false

little raptor
#

yeah it's really annoying... meowsweats

#

I gotta make a ticket about that
but don't know how to reproduce...

sullen sigil
#

is the functionality for that broken then

#

because its very occasionally causing my player to look like hes just hung himself when using the ascension cable πŸ˜…

little raptor
#

?
anyway idk what you mean by "bring them back"

sullen sigil
#

like

#

re-enable collisions

#

when you attach it to the player

#

oh you were talking about the previous thing there i got confused

little raptor
sullen sigil
#

its super weird because collisions seem to be returning when they shouldnt be

winter rose
little raptor
little raptor
#

but how it gets triggered idk

sullen sigil
#

using setvelocitytransformation

#

the weirdest part is i literally do not have damage enabled on the player

#

im attaching a pole (with no collisions) to the player and then setvelocitytransform on the player

#

the pole remains afterwards as is intended but the player can occasionally get killed or very badly damaged by what i can only assume is colliding with the pole

#

unless ropes have the ability to harm the player which afaik they do not

little raptor
sullen sigil
#

affirm

#

it similarly happens when the player gets dragged under the floor

little raptor
#

If you can find a way to reproduce it, report it on the feedback tracker

sullen sigil
#

trying to do that without any of my extra fluffy bits will be impossible for me as im too stupid

#

it took long enough to get the velocitytransform working as it was

little raptor
#

is damage always disabled?

#

or do you only disabled it during the fast-roping or whatever it was meowsweats

sullen sigil
#

always disabled until you hit the floor again

#

i can retry without disabling damage entirely in a mo

#

...its even happening without the changes i made that started it happening now

#

wtf

#

ok easy way its happening when the setvelocitytransform takes me through any surface too

#

as i assume playertouchingground fires then or something but i dont know how to detect when the transform is finished

open fractal
#

bistudio maintenance page scared the heck outta me

#

I was about to check, did the EntityCreated handler get added in 2.10?

little raptor
#

are you sure damage is disabled?

sullen sigil
#

but player was taking damage before coming into collision with anything beforehand

#

im going to retry with checking the interval for the transform is > 1 and player istouchingground

copper raven
sullen sigil
#

Okay so

#

I can't manage to reproduce when it was happening before but I'm unsure if the isTouchingGround checks for the ground actually having collisions or not as it's possible if not it could be thinking the pole is the floor?

#

however using waitUntil {isTouchingGround player and _interval > 1}; has rectified the issue before i made the change that increased the frequency of it

#

going to readd the change and see now

little raptor
sullen sigil
#

...yes i do

#

no need to explain you already did before heh

#

that'll be why thonk

little raptor
#

then that's why isTouchingGround is triggering

sullen sigil
#

yuppppppp

#

is there a way to filter out the classname of whatever EM uses for triggering isTouchingGround or nah

little raptor
#

you can use lineIntersectsSurfaces with ROADWAY LOD

#

and ignore the babe_helper object (check the actual name in the mod)

sullen sigil
#

i'll try that once the wiki comes back up so im not pestering everybody again πŸ˜…

little raptor
#

you can use the COMREF

sullen sigil
#

how big of a filesize is it ;-;

little raptor
#

idk 2-3 MBs iirc

sullen sigil
#

oh bruh

little raptor
#

11 MB

sullen sigil
#

i cant seem to find it in the comref

#

intersect then straight to is3DEN

little raptor
#

I said lineIntersects

sullen sigil
#

...because it doesnt start with intersect

#

how astonishing would it be if i could use my brain

#

so i'd want erm

#

if lineIntersectsSurfaces[playerPosASL, (playerPosASL vectorDiff [0,0,2]), babe_helper, objNull, true, 1, "GEOM"] then {dostuff right

#

or am i misunderstanding this

little raptor
#

lineIntersectsSurfaces returns array

#

and I said ROADWAY LOD

#

not GEOM

#

and you must set the second LOD to NONE

sullen sigil
#

oh bruh yeah

#

do i not want it to just fire if it returns anything..?

#

seeing as its just looking for roadway lods or

sullen sigil
#

its complaining babe_helper is not an object..? thonk

little raptor
#

I said find it in the mod

sullen sigil
#

i did

#

i found babe_helper

#

structures/village/helper, classname of babe_helper

little raptor
#

wat?

#

what does it have to do with class name?

#

that's a var name

sullen sigil
#

do i not use the classname of the object im ignoring..?

little raptor
#

...

#

read the wiki

sullen sigil
#

i have and it says object but im confused so

#

wait no

#

hang on

#

i can use nearestObject [player, "babe_helper"]; 😎

#

no i cant apparently

#

how on earth am i supposed to get the object

#
_emhelpers = nearestObject [player, "babe_helper"];
            waitUntil {count (lineIntersectsSurfaces[(getPosASL player), ((getPosASL player)vectorDiff[0,0,2]), _emhelpers, objNull, true, 1, "ROADWAY", "NONE"]) > 0};```
this is what im using so far but _emhelpers isnt defined properly and is returning `<NULL-object>`
sage falcon
#
[this,
"Download Data",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_Search_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",|
"isNil 'var_dataDownloaded'",
"isNil 'var_dataDownloaded'",
{format["%1 initiated the download",name (_this select 1)] remoteExec
["systemChat"]},
{format["%1% Complete" round ((_this select 4) * 4.16)] remoteExec
["hintSilent"]},
{hint format["%1 Download Complete", name (_this select 1),
_this select 3 select 0]; missionNamespace setVariable
["var_dataDownloaded",true,true]},
{"Download Aborted" remoteExec|["hintSilent"]},
[],
60,
10] call bis_fnc_holdActionAdd;
#

can anyone help me find the error in this code?

#

gives me an invalid number in expression

granite sky
#

you have a couple of random | in there

sage falcon
#

hmm they were there in the video

granite sky
#

...no

little raptor
sage falcon
#

taking out the |'s didnt work

granite sky
#

This one is busted too:
format["%1% Complete" round ((_this select 4) * 4.16)]

sullen sigil
little raptor
#

you can read the functions using the in-game function viewer

sage falcon
#

says the error is here

"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",|
"isNil 'var_dataDownloaded'",
"isNil 'var_dataDownloaded'",```
sullen sigil
little raptor
#

walkonstuff

sullen sigil
#

theres nothing in there for me

little raptor
#

which version of EM do you use?

#

official?

sullen sigil
#

the original version

#

yeah

#

babe_em_help is still a variable though

#

systemchat returns the object

#

so uh... great?

sage falcon
little raptor
#

use , instead of ;

sage falcon
#

9 and 10 supposed to be 1 sentence thougg

#

went wrong with copy paste

#

however it stil gives me error

little raptor
#

what's the error?

sage falcon
#

missing bracket on same line but i must be misplacing the ,

little raptor
sage falcon
#

ahh my bad, neevr used that program didnt notice it lol

sullen sigil
#

waitUntil {count (lineIntersectsSurfaces[(getPosASL player), ((getPosASL player)vectorDiff[0,0,2]), babe_em_help, objNull, true, 1, "ROADWAY", "NONE"]) > 0}; seems to be firing instantly again

granite sky
#

The hanging percentage sign on that line won't work either but I don't think it's fatal.

sage falcon
#

well the whole holdaction doesnt work

#

doesnt even pop up

little raptor
sullen sigil
#

ive got a 2 second sleep so surely the player should be away from the ground by then?

little raptor
#

what do you have rn?

sullen sigil
#

i'll try reduce it to like 0.1m below either way

sage falcon
#
[this, 
"Download Data", 
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_Search_ca.paa", 
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa", 
"isNil 'var_dataDownloaded'", 
"isNil 'var_dataDownloaded'", 
{format["%1 initiated the download",name (_this select 1)] remoteExec 
["systemChat"]}, 
{format["%1% Complete" ,round ((_this select 4) * 4.16)] remoteExec ["hintSilent"]},
{hint format["%1 Download Complete", name (_this select 1), 
_this select 3 select 0]; missionNamespace setVariable 
["var_dataDownloaded",true,true]}, 
{"Download Aborted" remoteExec["hintSilent"]}, 
[], 
60, 
10] call bis_fnc_holdActionAdd;
little raptor
#

where do you put it?

sage falcon
#

init

little raptor
#

of an object?

sage falcon
#

yes thats where it told me to put it

little raptor
#

what kind of object is it?

sage falcon
#

a rugged 3 screen laptop

little raptor
#

works fine

#

I just tested to be sure

sullen sigil
#

have you got simulation disabled or something on the laptop πŸ€”

sage falcon
#

i deleted the laptop and placed a new one it works now for some reason

sullen sigil
#

youd probably set something in attributes without realising 🀷

sage falcon
#

probable

sullen sigil
#

we've all done it

little raptor
sage falcon
#

while yall are so helpful i got another question.

Ive been trying getting a teleporter with the object logic trigger, now i have a script that works but it only works on a specific person thats called and i cant seem to edit the script to get it working for all players

sage falcon
#
[plr, "Enter the bunker",  "A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", "A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", "true","true",{},{},{player setPos (getposATL tp_pointentrance)},{}, [],0.5,0,true,false] call BIS_fnc_holdActionAdd;```
#

thats the original script i was using

little raptor
#

player setPos (getposATL that's new meowsweats

little raptor
#

all players in the game?

sage falcon
#

any player that interacts with the holdaction

little raptor
#

it already does that

sage falcon
#

so basically a single person

#

yes but i have to call the person which only works on that single person

#

as i cant give different units same variable name

sullen sigil
#

you dont need to

#

you already refer to the person who used the addaction

sage falcon
#

the plr on the beginning is the variable name of 1 unit

#

but its the only unit able to use the interaction

#

no other unit can use it

little raptor
#

replace plr with this and you're done

#

actually you should also check if the object is local

#

so just better to put it in initPlayerLocal.sqf

#

and replace plr with player

sullen sigil
#

can i get a sanity check on NE"]) > 0) and (player isTouchingGround)}; the and & after bit please

sage falcon
#

ill try the other one now

little raptor
sullen sigil
#

i swear thats how i had it before thonk

#

oh i need to swap them around dont i

little raptor
#

i swear thats how i had it before thonk
no

little raptor
winter rose
sullen sigil
#

now that is just mean

#

but also probably true

winter rose
#

:pepe-laugh:

sullen sigil
#

Aha Mr Montana! No external emojis for you!

little raptor
#

I mean the code

sullen sigil
#

tbf i still dont understand why you should use ASL over ATL

little raptor
sage falcon
# little raptor where did you put it?

with player it worked but its not getting off the scroll wheel menu once you leave the area and if u go back itll add another one that stays forever so my scroll-wheel menu is now super long

little raptor
#

have you put it in a trigger?

sullen sigil
sage falcon
#

yes

little raptor
#

change the condition to _target inArea triggerName

#

and remove it from trigger

#

put it in initPlayerLocal.sqf like I said

sage falcon
little raptor
#

no. just make a file named initPlayerLocal.sqf in your mission folder, and put this in it
just replace triggerName with the name of your trigger

params ["_player"];
[_player, "Enter the bunker",  "A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", "A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", "_target inArea triggerName","true",{},{},{player setPosATL (getposATL tp_pointentrance)},{}, [],0.5,0,true,false] call BIS_fnc_holdActionAdd;
sage falcon
#

or better said, how do i link this piece of code to the trigger

#

ah

sage falcon
#

if i put that in condition the teleporter doesnt work anymore at all

little raptor
#

condition?

#

when did I say anything about condition?

sage falcon
#

i swapepd the other code to the sqf file

little raptor
#

I meant the action condition. and I put that in the code

sage falcon
#

ah okay

little raptor
#

forget about the trigger

#

got it?

sage falcon
#

let me try'

#

doesnt work

#

i removed the lines so the trigger itself has no code in it

#

and its all in the sqf file

little raptor
#

do you have a debug console?

#

if you run the mission in editor you should

sage falcon
#

yes

little raptor
# sage falcon yes

run this:

[player, "Enter the bunker",  "A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", "A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", "_target inArea triggerName","true",{},{},{player setPosATL (getposATL tp_pointentrance)},{}, [],0.5,0,true,false] call BIS_fnc_holdActionAdd;
#

if the action does not appear you have not replaced triggerName or its wrong

sage falcon
#

doesnt work

#

i get a -1 as outpur

#

they are both the same name

#
params ["_player"];
[_player, "Enter the bunker",  
"A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", 
"A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", 
"_target inArea tp_trigentrance","true",{},{},{player setPosATL (getposATL tp_pointentrance)},{}, [],0.5,0,true,false] 
call BIS_fnc_holdActionAdd;
#

this is what i got in the sqf

copper raven
#

_player is null probably

sage falcon
#

what do i replace player with?

copper raven
#

add a sleep

#

it should work then

sage falcon
#

what do you mean?

#

isnt it the same code

copper raven
#

either of them should work, the latter if in initPlayerLocal.sqf

winter rose
#

(_player is different from player)

check with ```sqf
diag_log format ["is player null: %1", isNull player];

if your mission is MP and the units are deleted…
sage falcon
#

mission will be mp ye

winter rose
#

and how do you test it?

sage falcon
#

using the multiplayer function in eden

sage falcon
#

i ran it in the debug console

winter rose
#

…

sage falcon
#

idk which logs u mean

stable dune
# winter rose detects an _enemy_ yes, there is a group EH

If i add an group eh "enemyDetected" to all ai groups.
if group get killed and there is no anymore detects from ai groups. And i want change TimeMultiplier and want it back to what it was before the ai detected enemy (player). So when there is no more detected enemys from the ai side.

winter rose
#

ok

winter rose
sage falcon
#

i didnt change your code

winter rose
#

wasn't mine

#

I mean, the above code, provided by Leo

sage falcon
#

to the variable name of the trigger

sage falcon
#

and no code at all on the trigger in-game

copper raven
#

do that, and then check RPT

sage falcon
#

in the sqf file?

copper raven
#

yes

sage falcon
#
diag_log format ["is player null: %1", isNull player];

params ["_player"];
[_player, "Enter the bunker",  
"A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", 
"A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", 
"_target inArea tp_trigentrance","true",{},{},{player setPosATL (getposATL tp_pointentrance)},{}, [],0.5,0,true,false] 
call BIS_fnc_holdActionAdd;```
#

like this

copper raven
#
diag_log format ["is player null: player = %1 _player = %2", isNull player, isNull _player];

after params ["_player"];

sage falcon
#
params ["_player"];
diag_log format ["is player null: %1", isNull player];
[_player, "Enter the bunker",  
"A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", 
"A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", 
"_target inArea tp_trigentrance","true",{},{},{player setPosATL (getposATL tp_pointentrance)},{}, [],0.5,0,true,false] 
call BIS_fnc_holdActionAdd;```
#

like that

copper raven
#

check _player aswell

copper raven
#

?

sage falcon
#

or just start the mission and the ncheck the rpt

copper raven
#

better

sage falcon
#

i got the latest rpt

copper raven
#

ctrl + f "is player null"

sage falcon
#

true

copper raven
#

for both?

sage falcon
#

theres 12 lines with player null

#

all true

copper raven
#

wat, this is in initPlayerLocal.sqf?

sage falcon
#

no rpt

copper raven
#

i mean the script you're running

sage falcon
#

yes

copper raven
#
[] spawn {
  waitUntil { sleep .1; !isNull player; };
  [player, "Enter the bunker",  
    "A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", 
    "A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", 
    "_target inArea tp_trigentrance","true",{},{},{player setPosATL (getposATL tp_pointentrance)},{}, [],0.5,0,true,false] call BIS_fnc_holdActionAdd;
};

put this instead

sage falcon
#

instead of the line i just put in?

#

or the entire script

copper raven
#

no, entire code

sage falcon
#

oke

#

check rpt again?

copper raven
#

fixed the semicolon*

#

no

#

this should work now

sage falcon
#

Nope

#

Not working

copper raven
#
[] spawn {
  diag_log "Checking if player is not null.";
  waitUntil { 
    sleep .1;
    private _isNotNull = !isNull player;
    diag_log format ["Is player not null: %1", _isNotNull];
    _isNotNull
  };
  diag_log "Adding action now.";
  private _result = [player, "Enter the bunker",  
    "A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", 
    "A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", 
    "_target inArea tp_trigentrance","true",{},{},{player setPosATL (getposATL tp_pointentrance)},{}, [],0.5,0,true,false] call BIS_fnc_holdActionAdd;
  diag_log format ["Action added, id = %1", _result];
};

this then and check rpt again, i honestly have no idea how you have the mission setup

#

is tp_trigentrance defined? maybe the action is added but the condition is never true

sage falcon
#

i have the trigger itself with a blue square area with its name as "tp_trigentrance" then a invisible logic item variable name as "tp_pointentrance" where its going to teleport to

#

looking for the same thing in the new rpt?

copper raven
#

look for the diag_log i added

sage falcon
#

cannot find

copper raven
#

i mean the strings, not the diag_log itself

sage falcon
#

how? the rpt file is hundred of lines

copper raven
#

ctrl f

sage falcon
#

Player null?

copper raven
#

literally any of the strings Checking if player

sage falcon
#

searched on "checking" and couldnt find any

copper raven
#

is it the latest rpt? did you update the code?

sage falcon
#

Yes

#

Even made a second new rpt file to check

copper raven
#

then your code is not executing

#

did you perhaps write initPlayerLocal.sqf.txt or something

sage falcon
#

No

copper raven
sage falcon
#

initPlayerLocal.sqf

little raptor
drifting sky
#

"setUnitCombatMode". Does using this command override future use of "setCombatMode"? I.e. if I set a unit's mode to "GREEN", and then it's group to "YELLOW", does the unit have "GREEN" or "YELLOW" mode?

sage falcon
#

Oh no

#

Yes i did

#

I changed it from txt to sqf myself

little raptor
copper raven
sage falcon
#

ill restart arma

#

Oh wait a minute

#

Eden doesnt actually "close" the multiplayer server when i go back to eden

#

Is that the issue?

copper raven
#

just run fileExists "initPlayerLocal.sqf";

#

in debug console

drifting sky
sage falcon
copper raven
#

setting it on a unit, then on group, overrides the unit aswell

copper raven
sage falcon
#

A3\Functions_F\Scripts\initPlayerLocal.sqf

copper raven
#

wat the hell

#

are you making a mod?

sage falcon
#

No

#

I just reloaded the mission and now the playerlocal file is gone

copper raven
#

how is it gone?

sage falcon
#

Added it back and now it says the path directory to my mission folder where the sqm and sqf are

copper raven
#

is the action there?

sage falcon
#

Let me check the new rpt

copper raven
#

just check if the action is there, it should be now

#

you were executing the arma's default init file whatever it is, because you didn't have one in your mission directory

sage falcon
#

Weird

#

Probably didnt save it correctly when eden was still running multiplayer

#

Says its checking if player is null

#

No answer thougg

copper raven
#

meowsweats it's not supposed to show you that in the same line, scroll down

sage falcon
#

2 lines down

#

True

#

Player null

copper raven
#

ctrl f Action added

#

and check the id

#

should be 0

sage falcon
#

Its 1

copper raven
#

whatever, it's fine

#

so it's added now

copper raven
copper raven
#

i don't know about the null stuff in the player init, it's cursed

#

and next time make sure you have the script in the correct directory meowsweats

sage falcon
#

I did

#

I checked it like 5 times

#

The old code isnt working btw

copper raven
#

kay, so use the latter

sage falcon
#

neither codes work

sage falcon
#

can i send you screenshots in DM, its not allowing me to send them here

#

but on the video you dont have it linked to a trigger

#

that must be where the issue lays then for me

copper raven
#

you must be within the trigger area for it to show

#

that's what your condition is atleast

sage falcon
#

i am

winter rose
#

I vote that you didn't set your trigger conditions properly then

sage falcon
#

on the trigger itself?

#

i just chanegd the variable name to see if it worked with a new one

#

so dont be alarmed by that

#

got told earlier to leave the conditions here empty as its in the initplayer

copper raven
#

conditions shouldn't matter, just tested with a trigger area, works aswell

winter rose
#

ENTRANCETELEPORTER

#

what happened to tp_trigentrance??

copper raven
#

i just chanegd the variable name to see if it worked with a new one

winter rose
#

grrr

hallow mortar
#

Don't you need a this in the condition field to make it evaluate based on the conditions set above?

copper raven
#

shouldn't matter anyway, his code is just checking if the player is in area of that trigger

sage falcon
#

but i changed them in both the scripts and variables

copper raven
#
copyToClipboard str [loadFile getMissionPath "initPlayerLocal.sqf", entranceteleporter];

in debug console, and ctrl v https://sqfbin.com/

sage falcon
#

doesnt find initPlayerLocal.sqf

#

wtf

#

the paths are literally the same im lookign at it in windows explorer

copper raven
#

remove getMissionPath

#

my bad, that needs filepatching (unnecessary anyway)

sage falcon
#

no output

copper raven
#

yes because it's in your clipboard

#

open sqfbin and paste it, then send the link here

sage falcon
#

pasted in both

#

nothings happening on sqfbin

#

ooooooh wait

#

i get it

#

1 sec

copper raven
#

,any]

#

so entranceteleporter is undefined

sage falcon
copper raven
#

yes that variable is undefined

#

thus your condition returns nil and nothing happens

sage falcon
novel basin
#

Hey guys !
I have a little issue with a Cutrsc
I want to show the hours, so is use ctrlcreate and bis_fnc_timetostring
My text is like ''bliking'' and i dont know how can i solved that

copper raven
#

and then try

sage falcon
#

i saved it all

#

10 million times

#

spammed the button

#

even reloaded the mission file

copper raven
#

well in the screenshot you didn't so, try again

winter rose
#

with a bit of "luck"you are modifying a different mission directory

copper raven
#

i don't even know anymore πŸ˜„

sage falcon
winter rose
#

yep, still "any"

sage falcon
#

i can send the mission folder if you want lol

winter rose
#

that would solve it

sage falcon
winter rose
#

I'm after a long day of wiki update, pissed by scammers, pissed by a lame coop game with a friend, I should go to sleep but nooo, my brain finds this way more interesting πŸ˜„

sage falcon
#

lmfao

#

sleep should be on my schedule too but i have to solve this

winter rose
#
["[] spawn {
  waitUntil { sleep .1; !isNull player; };
  [player, ""Enter the bunker"",  
    ""A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa"", 
    ""A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa"", 
    ""_target inArea entranceteleporter"",""true"",{},{},{player setPosATL (getposATL entrancereceiver)},{}, [],0.5,0,true,false] call BIS_fnc_holdActionAdd;
};",entranceteleporter]
copper raven
#

it works fine for me

winter rose
#

Β―_(ツ)_/Β―

sage falcon
#

whats the code?

copper raven
#

literally what you sent?

sage falcon
#

mine didnt have the entranceteleporter on the end

copper raven
#
        class Item2813
        {
            dataType="Trigger";
            position[]={24860.248,23.971052,21064.727};
            class Attributes
            {
                name="entranceteleporter";
                condition="";
                sizeA=2;
                sizeB=2;
                sizeC=2;
                repeatable=1;
                activationBy="ANYPLAYER";
            };
            id=5631;
            type="EmptyDetector";
            atlOffset=-0.0059986115;
        };

the trigger is also in the sqm, i have no clue what's wrong

winter rose
#

wrong mission directoryyy

sage falcon
#

what you mean?

winter rose
#

that you are maybe editing loading whatever the wrong mission

copper raven
#

rename your mission to something else, and open that (rename the folder)

sage falcon
#

renamed the folder, loaded the mission. but the teleporter still not wrking

copper raven
#

still any?

sage falcon
copper raven
#

well atleast it's defined now, the issue now is that you have respawn on start, so the action does not persist on the player

sage falcon
#

no i have an actual respawn for multiplayer which does work a

copper raven
#

did i say it doesn't work?

sage falcon
#

oh i thought u meant instant spawn like it does if u dont have spawn

copper raven
#
[] spawn {
  waitUntil { sleep .1; !isNull player; };
  player addEventHandler ["Respawn", {
    params ["_unit"];
    [_unit, "Enter the bunker",  
      "A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", 
      "A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa", 
      "_target inArea tp_trigentrance","true",{},{},{player setPosATL (getposATL tp_pointentrance)},{}, [],0.5,0,true,false] call BIS_fnc_holdActionAdd;
  }];
};
sage falcon
#

so if i put that in the sqf file it should work?

copper raven
#

yes

sage falcon
#

lets put that to the test

copper raven
#

well + the trigger name

sage falcon
#

ohye i need to change that one

copper raven
sage falcon
#

lol was just gonna say it gave me an error

#

doesnt work

copper raven
#

i just tested it in mp and it worked, the exact same mission

sage falcon
#

heh wtf

#

oh 1 sec im dumb let me try again

hallow mortar
#

If you have any mods loaded, try it without them

copper raven
#

oh yeah well, i did have to remove all of them from mission.sqm so i can play it meowsweats might be an issue aswell

sage falcon
#

well ill tell you this

#

it works

#

damn

#

well, thank you guys for all the help😁

#

now i can start building the actual mission

copper raven
#

i don't think you should add more objects to it πŸ˜„

sage falcon
#

lmfao

winter rose
#

be sure to make the most of them "simple objects"

sage falcon
#

yeah i have to go over all that stuff i just copied it from a template

winter rose
#

(and "local only" too)
that will save the server as well as the perfs

sage falcon
#

alright thanks for the tip

sage falcon
#

😐 πŸ˜‚

#

anyway good night tho

naive needle
#

The new Inventory sorting system is not the same like the sorting system of the script commands notlikemeowcry

#

Does someone know how to sort the arrays like the new system

#

I guess I need to convert the classnames to the display name and filter it by that

#

but then it will be diffrent depending on the language you use ?

#

@still forum any idea on this ?

#

(((getUnitLoadout player) select 4) select 1);

#

Inventory of the vest of the player

naive needle
#
params [["_container",0],["_unit",player]];

if(_container < 1 || _container > 3) exitWith {[]};
_container = _container + 2; // Make it support getUnitLoadout select
private _items = (((getUnitLoadout _unit) select _container) select 1);
_DisplayNameArray = [];

{
    _ClassName = (_x select 0);
    _configName = _ClassName call A3SClient_fnc_util_gear_getConfigNameByClassName;
    _itemDisplayName = getText (configFile >> _configName >> _ClassName >> "displayName");
    _DisplayNameArray pushBack [_itemDisplayName,_forEachIndex];
} forEach _items;

//Sort Array
_DisplayNameArray sort true;

_itemsNew = [];
{
    _itemsNew pushBack (_items select (_x select 1));
} forEach _DisplayNameArray ;

_itemsNew
#
#define __filename "fn_util_gear_getConfigNameByClassName.sqf"
scriptName "fn_util_gear_getConfigNameByClassName";


 
private["_className","_configName"];
_className = _this;
_configName = "";
switch (true) do
{
    case isClass(configFile >> "CfgMagazines" >> _className):     { _configName = "CfgMagazines"; };
    case isClass(configFile >> "CfgVehicles" >> _className):     { _configName = "CfgVehicles"; };
    case isClass(configFile >> "CfgAmmo" >> _className):         { _configName = "CfgAmmo"; };
    case isClass(configFile >> "CfgGlasses" >> _className):     { _configName = "CfgGlasses"; };
    default                                                      { _configName = "CfgWeapons"; };
};
_configName```
#

I did a small fix for it

#

It first looks for the Display Name of each Item and then sorts it like the new Inventory Sorting System, it adds the Index to it so I can resample the Array with all needed Information such as Magazine Count.

#

It breaks if there is a weapon in the uniform , I will fix it later

#

Nvm it gets worst when there are other Uniforms , headgear in the inventory

#

TL;DR I have no idea how to sort this stuff like the new Inventory system

#

It probably breaks the rearm Magazin Script from ace as well

glad fable
#

Can't seem to find a solution anywhere else, I'm attempting to run a bit of code every time a vehicle or player fires.
In initServer.sqf:

addMissionEventHandler ["EntityCreated", {
    params ["_entity"];
    [_entity] execVM "entity.sqf";
}];```
In ``entity.sqf``:
```sqf
params["_entity"];
_watch = (count (weapons _entity) > 0)||(isPlayer _entity);
//hint (str (typeOf _entity)) + (str _watch))
if(_watch){
    _entity addEventHandler ["Fired", {
        params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
        hint str typeOf _projectile;
    }];    
}

The hint directly after watch prints out fine, but the hint inside the "Fired" event handler is never shown. What am I doing wrong here?

warm hedge
#

You missed then

#

Also:

#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
↓

// your code here
hint "good!";
glad fable
glad fable
warm hedge
#

Also do you mean hint (str (typeOf _entity)) + (str _watch)) does it fine?

glad fable
#

Yes

warm hedge
#

Are you sure the _watch is true in this context?

glad fable
#

Also tried a [str typeOf _projectile] remoteExec "hint"; to be sure

glad fable
# warm hedge Are you sure the `_watch` is *true* in this context?

Yes. At least that's what hint (str (typeOf _entity)) + (str _watch)) says. Have also tried with sqf _entity addEventHandler ["Fired", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; hint str typeOf _projectile; }];
outside the if to no avail

#

Ah, got it. Had naively assumed that the EntityCreated would be added before players were spawned. Should have checked the order of file executions. Testing it with a fresh vehicle or unit works.

warm hedge
#

Aha, that's the situation

glad fable
#

Thanks for the help

#

Just me being stupid as usual πŸ˜…

manic sigil
#

Logic check;

If Im coding for multiplayer and want a radio trigger appear for one player and no one else, I can have the trigger formation code - with the 'is global' parameter set to false - remote-executed on just that player's system?

copper raven
#

you can do that yes

glad fable
#

Hm, any way to grab info from a config file to get projectile explosion radius? Tried using getVariable but it always complained of the error being type string and not namespace: "Sh_120mm_HE_tracer_red" getVariable "explosive";, for example.