#arma3_scripting
1 messages Β· Page 14 of 1
Am i just moving the triangles ?
each point in positionAndAltitudeArray corresponds to a terrain vertex
triangle vertices
vertices are not the same as vectors?
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
I'll upload a picture to the wiki that better explains how the terrain is formed
It sets the 3 points of 1 triangle or just one point of that triangle?
1
when you move 1 vertex you affect 6 triangles tho
because each vertex is shared by 6 adjacent triangles
K
I have the Dll in @myAddon folder. how do i get that path?
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
if you have filePatching on, then @myAddon might just work
if not, fileExists is for checkin ingame files, not files on your disk.
trying to get around arma holding up the DLLs
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
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
make a dll that gets you the new name of the new dll's
The deform mod does a lot to make terrain transformation fun.
im using fileexists check to find the latest copied dll π
You are trying to do that and failing, as far as I can see
it works to a point
thx leo
I put the DLL in arma root folder and they can be found from there... so my script seems to work π
forgot to thank you for this, worked well
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
That is because sqf and filepatching use Arma's filesystem.
But DLL's don't at all
...is there an EH that fires when the players cursor goes over another unit or am i going to have to use an oneachframe
no eh
has anyone got any smart ideas for not using an oneachframe
i suppose i could use a waituntil cursorobject type is a unit π€
but thats probably not that much better
any better than a waituntil?
none offered me chocolates, so nobody is better than anyone here
you mean
oneachframe "code"
or
addmissioneventhanlder ["eachFrame",{}]
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
the lastone is much better
so add the EH when laser is activated
....which there's no EH for in the first place


sounds like this might not be smart for performance
meh its a meme so i'll do it anyway
you can add and remove the oneach frame when the laser is on and off... but yea
yeah but i would need to be checking for when the laser is on and off
2.10 hotfix!!1!
if you have an early exitwith that checks something simple wont be a problem
...and then checking the units orientation towards the player
and that the laser heats surfaces as well π€£
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
cursorObject gives you the object so...
yeah then i want errrrr
isEqualType player or something dont i
because player should always be an object..?
to bohemia we are all objects 
this is going to be so stupid but i think its great
no, just you β€οΈ

isplayer cursorobject
cursorObject (OBJECT) returns an Object
so checking the type is⦠redundant?
what he β said
sorry, what it said π
god i hate english
cursorobject iskindof "man" 
np π
this is just a meme idea otherwise i would be scouring every inch of the wiki first
the best scripts came from a meme idea
"CAManBase"
im literally blinding AI/players whenever they get an ir laser shone in their face
otherwise, bunnies are "Man" (iirc π)
i always used man... now that explain... a lot of things lol
bees too? lol
that, IDK
ive done something wrong with the exitWith 
if (player isIRLaserOn currentWeapon player == false) then {
exitWith {};
};```
probably something stupid
either that or the if statement isnt correct
is just exitwith
no then
if (player isIRLaserOn currentWeapon player == false) exitwith {}
if (player isIRLaserOn currentWeapon player == false) exitWith {};
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
can use lineintersect and use ace framework to cause burns on the selection lol
yeah but zoom your eyes go bye
the cia will be with you shortly
they're not even "vehicles"
no
you need to do that yourself
cursorobject is just an lieintersect so... might be a litte more expensive, but posible
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
has the update affected unit catpure?
afaik no. why?
because mine doesnt work at all now
what are you trying to do?
detect when ai is looking at player
...so that i can then make the player blind if the AI's laser is on
the simplest way is just checking their targetKnowledge
i get no errors. and nothing happens
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?
and now we have an EH for that π₯³
we do?
ai pointing ir laser at player
blinds player
funny
for that you need to do line intersection
how do i do that with the ais orientation
_group addEventHandler ["KnowsAboutChanged", {
params ["_group", "_targetUnit", "_newKnowsAbout", "_oldKnowsAbout"];
}];
yep π
that has nothing to do with targetKnowledge
it's knowsAbout
damn, you are right
pilots where jumping out. all good now lol
I mean selectionPosition
how do i use that to get the ai's ir laser
I already showed you
this is literally a meme idea to make the ai blind me when they shine an ir laser at me
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
yes
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..?
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
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
does that check for the laser on or not? dont think it is?
set them to combat
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
erm
yes it would appear i am
whoops
we'll pretend i never forgot to remove that bit
*boom*
ok i removed that bit but still no worky
i dont think im adding it properly to all the ai am i
why not add ONE event that deals ALL the AI?
you are adding one mission EH for every object
*buzz* wrong
add one mission EH that does the calculations
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
you don't add a mission EH to a unit
you add a mission EH to the mission
one for each unit
oh
i understand now
pea brain moment
this however does not solve my issue of having no idea how i would do that
me except im not a dog
OH YOU DEV ON A MAC??? BAN
me except im not a dog and i dont dev on a mac
how about you just try the original code for testing?
changing it to work with all units is easy
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
did you mean _eyePos here instead of _aimPos?
also, this code is rubbish, no?
what is _this
erm
rubbish
i assumed _this would refer to the object it was added to
please dont kill me
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
showed your face?
to show it, yeah π
okay, okay, all jokes aside: what's your code π
yes
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
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 
i was thinking exitWith wouldnt work in that case because it was still within the if statement for some reason 
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
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
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
thats fine just take players orientation from 180 and see if that equals the AI's..?
christ, maths...
_laserPos vectorFromTo _eyePos vectorCos getCameraViewDirection player < -0.25
vectors also works π
mine does
so i want if (_laserPos vectorFromTo _eyePos vectorCos getCameraViewDirection player < -0.25) then {/*do shit here*/} right
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
you should just use setAperture
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..?
-1
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
no
wait i couldnt go to -0.5 could i
yeah but i want incremental blinding and unblinding
fuck it this is a meme feature its fine
the game already does it incrementally
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
you don't
set a variable on the player when blinded and compare the last time it was blinded to now
ta-daaa, frame calculation
no thank you i will simply make the player suffer.
frame calculation that I dislike doing, with Reforger and all
setaperture doesnt actually blind the player if they have nv turned on
i shall simply do an ace goggles function
thingy
what about setApertureNew?
whats the difference? i cant tell
is there a way I can prevent pressing a key to auto-select an item in a listbox alphabetically?
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 {};
}];
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?
wait yeah why have I been doing that I'm dumb
I will try that now
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
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?
Anywhere
Sick thanks, unlimited zero-G height here I come
Has anyone done snow yet?
Straight to the point please
I tried but got no proper snow particle/texture and no clue how to do one xD
That should be easy enough.
https://community.bistudio.com/wiki/setRain
Looks like there might be one now with 2.10 π€
"a3\data_f\snowflake4_ca.paa", // rainDropTexture
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
Anyone know if theres a event or command that checks when a unit has eyes on an enemy or engaged in combat
reveal
Is EnemyDetected event what it is?
If you prefer yes
Oh, maybe I was thinking knowsAbout
'Oh boy, finally my building-moving-with-tools feature is ready to test!'
Swing, hit, takes three seconds to update.
'Beautiful π₯² '
is there a way to override a player's night vision goggles and give them the full screen effect?
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.
Thanks, Iβll go with the Integrated_NVG_F
βgetAttackTargetβ
Anyone can explain me what is that and for what it needed?
https://community.bistudio.com/wiki/agents
Is anyone aware of a way to completely disable thermals server wide including vehicles, NVG types and binos?
do you have any suggestions for how to run that globally constantly?
if not its fine
Thanks regardless, those will be a big help
alright, thanks
@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
shiiiit thanks man
disableTIEquipment will work on vehicles
except PIP
depending on the vehicle/modded asset
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...
You're using _player in the cases, which isn't defined.
oh dang
actually it was defined, I just removed it for some reason before I posted it here and never tested it lol
Are you relying on that lot coming out as a nil return if none of the cases hit?
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
shrugs
Identify a specific case where you're taking more damage than expected, and dismantle it.
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.
ok
true probably equates to 1? :P
how can i rotate tank turret?
obj animateSource ["mainturret", rad 90];
This part of script works only in ugv
Is that a Simple Object?
it returns agents (or rather, their "Team Member"). agents are units with very simple AI, such as animals.
https://community.bistudio.com/wiki/createAgent
lol, i first learned about them when i used nearEntities
Are u asking me?
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"];
And how does the script look like?
How can I get an array of soldiers which the player has currently selected in the command bar / menu?
_civilanUnits = allUnits select {side _x == civilian};
{
_x addEventHandler ["Killed", {
params ["_unit", "_killer", "_instigator", "_useEffects"];
if (isPlayer _instigator) then {
hint "Hello";
};
}];
} forEach _civilanUnits;
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\""
Yes
Which tank?
t-100
But it didn't work for others, like Angara, Slammer, all IFV etc
I think i do something wrong, but not sure
Oh yeah, the UGV example... In the first place I don't really know why it does work π
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.
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.
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.
Im write script, which intercept missile, if it fly near smokes, but for best experience i want turn turret on it)
Wow, thats cool. Need try it then
Ahh thanks for this unrelated convo with what I'm making, now I can finish the product... π
since the wiki is down, does anyone know the command to set the image of an RscPicture?
ctrlSetText
oh ok, thanks
you can see the COMREF (without search though)
also, back in a couple of hours max afaik π
Not a script error. A faulty made Mod does
in the chest, and double-tap
but it's a faulty mod yes.
#arma3_troubleshooting next time π
does COMREF not include EH lists?
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;
assumption 1: _missile getDir _target - 180 can be negative. Can you try _target getDir _missile instead?
i know, but weaponDirection can be negative too π
weaponDirection has range from 180 to -180
go cry bro π
should be up in couple of hours, apparently. The message here has the command reference for local usage <#arma3_scripting message>
one click on your profile reminded me why i dont click on discord profile
keep me updated
assumption 2: == on floating point numbers can be flaky, can you try abs (_missileDirection - _turretDirection) < 0.1 instead?
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
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 π
Hey, Is there an EH when an enemy eye contact/detects one of the players?
detects an enemy yes, there is
a group EH
Nice, tried found out of that but wiki is maintenance
BIKI down, please wait
Because the whole thing is stred
This only runs once
So ofc it never recognizes units that are created after
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?
why? π€
Beacuse it sends a string to the extension
but how do you send strings then?
You just have to parse them by the extension I guess...
hmm
Or try texting them
another thing I noticed was that \\ become \\\\
Yes. \ has to be escaped
I kinda understand that....
I solved it by using / instead
maybe string getting str'ed is a bug?
First try texting as I said
because args can be multiple data types, that all get converted to string
alright
just substring 1, cnt-2 in the extension, you're using C# so str[1..^1] will do
thx π
Only valid if no " is already in the string π
@copper raven
str """" -> """"""""""
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
the thing is that the game already strs it tho...
you try to pass """" but you receive """""""""" in the extension
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
yeah it's really annoying... 
I gotta make a ticket about that
but don't know how to reproduce...
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 π
?
anyway idk what you mean by "bring them back"
like
re-enable collisions
when you attach it to the player
oh you were talking about the previous thing there i got confused
afaik no
its super weird because collisions seem to be returning when they shouldnt be
there are the bees, and the flowersβ¦
I know for a fact that it's related to setVelocity (or any other velocity command)
that'll be why
but how it gets triggered idk
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
via allowDamage right?
If you can find a way to reproduce it, report it on the feedback tracker
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
is damage always disabled?
or do you only disabled it during the fast-roping or whatever it was 
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
bistudio maintenance page scared the heck outta me
I was about to check, did the EntityCreated handler get added in 2.10?
doesn't happen for me
are you sure damage is disabled?
thats what im saying here as damage is enabled again when the player touches the floor
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
i literally thought that """" should give "\"" (so str this again, in the extension i was expecting "\"\"\"" but instead "\"\"\"\""), but it doesn't you're right
i mean that's technically wrong, because in SQF we "escape" " by typing it twice instead of \
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
do you use Enhanced Movement or a similar mod?
then that's why isTouchingGround is triggering
yuppppppp
is there a way to filter out the classname of whatever EM uses for triggering isTouchingGround or nah
you can use lineIntersectsSurfaces with ROADWAY LOD
and ignore the babe_helper object (check the actual name in the mod)
i'll try that once the wiki comes back up so im not pestering everybody again π
you can use the COMREF
here
how big of a filesize is it ;-;
idk 2-3 MBs iirc
oh bruh
11 MB
I said lineIntersects
...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
lineIntersectsSurfaces returns array
and I said ROADWAY LOD
not GEOM
and you must set the second LOD to NONE
oh bruh yeah
do i not want it to just fire if it returns anything..?
seeing as its just looking for roadway lods or
its complaining babe_helper is not an object..? 
I said find it in the mod
do i not use the classname of the object im ignoring..?
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>`
[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
you have a couple of random | in there
hmm they were there in the video
...no
just read the EM functions...
babe_em_help
taking out the |'s didnt work
This one is busted too:
format["%1% Complete" round ((_this select 4) * 4.16)]
I tried looking for their github but it was nowhere to be found
you can read the functions using the in-game function viewer
says the error is here
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",|
"isNil 'var_dataDownloaded'",
"isNil 'var_dataDownloaded'",```
I also did that and still don't know where babe_em_help is from π
walkonstuff
theres nothing in there for me
the original version
yeah
babe_em_help is still a variable though
systemchat returns the object
so uh... great?
removed the |'s and added the ; but not working
use , instead of ;
9 and 10 supposed to be 1 sentence thougg
went wrong with copy paste
however it stil gives me error
what's the error?
missing bracket on same line but i must be misplacing the ,
it already tells you where to put it
ahh my bad, neevr used that program didnt notice it lol
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
The hanging percentage sign on that line won't work either but I don't think it's fatal.
because you've said 2 m below
ive got a 2 second sleep so surely the player should be away from the ground by then?
if you fixed those it should work
what do you have rn?
i'll try reduce it to like 0.1m below either way
[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;
where do you put it?
init
of an object?
yes thats where it told me to put it
what kind of object is it?
a rugged 3 screen laptop
have you got simulation disabled or something on the laptop π€
i deleted the laptop and placed a new one it works now for some reason
nope was all enabled
youd probably set something in attributes without realising π€·
probable
we've all done it
anyway as @granite sky said % doesn't work. change this line to:
{[str round ((_this select 4) * 4.16) + "% Complete"] remoteExec ["hintSilent"]},
to make the % sign work
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
alright
[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
player setPos (getposATL that's new 
are you using an addaction
who do you want to teleport?
all players in the game?
any player that interacts with the holdaction
it already does that
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
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
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
can i get a sanity check on NE"]) > 0) and (player isTouchingGround)}; the and & after bit please
this one didnt work
ill try the other one now
player isTouchingGround is wrong 
i swear thats how i had it before
no
yes
maybe, but it threw an error π
:pepe-laugh:
Aha Mr Montana! No external emojis for you!
tbf i still dont understand why you should use ASL over ATL
if you know the diff between absolute and relative coordinates you will
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
have you put it in a trigger?
i understand what they are and what the difference is but not why you should use it one over the other
yes
change the condition to _target inArea triggerName
and remove it from trigger
put it in initPlayerLocal.sqf like I said
read the orange box:
https://community.bistudio.com/wiki/Position
like, just copy the OnActivation in the sqf? or how does that work with a different file?
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;
oh gotchu now
if i put that in condition the teleporter doesnt work anymore at all
here
i swapepd the other code to the sqf file
I meant the action condition. and I put that in the code
ah okay
this is all you have to do
forget about the trigger
got it?
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
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
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
_player is null probably
what do i replace player with?
this code
either of them should work, the latter if in initPlayerLocal.sqf
(_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β¦
mission will be mp ye
and how do you test it?
using the multiplayer function in eden
not sure what i need to do here
i ran it in the debug console
β¦
idk which logs u mean
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.
ok
if you run the provided code in the debug console, I sure hope you use player and not params ["_player"]; _player
i didnt change your code
only changed triggername on this one
to the variable name of the trigger
and i got this in my initplayer sqf file
and no code at all on the trigger in-game
you aren't supposed to run it in debug console, it was meant to run before you add the action, to check if it the player is null or not
do that, and then check RPT
in the sqf file?
yes
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
diag_log format ["is player null: player = %1 _player = %2", isNull player, isNull _player];
after params ["_player"];
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
check _player aswell
^
and now i run this in debug
?
or just start the mission and the ncheck the rpt
better
i got the latest rpt
ctrl + f "is player null"
true
for both?
wat, this is in initPlayerLocal.sqf?
no rpt
i mean the script you're running
yes
[] 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
no, entire code
[] 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
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?
look for the diag_log i added
cannot find
i mean the strings, not the diag_log itself
how? the rpt file is hundred of lines
ctrl f
Player null?
literally any of the strings Checking if player
searched on "checking" and couldnt find any
is it the latest rpt? did you update the code?
then your code is not executing
did you perhaps write initPlayerLocal.sqf.txt or something
No

initPlayerLocal.sqf
have you enabled file extensions in Explorer?
"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?
Like hidden files?
Oh no
Yes i did
I changed it from txt to sqf myself
maybe, the unit variant forces it on a unit i'm guessing
ill restart arma
Oh wait a minute
Eden doesnt actually "close" the multiplayer server when i go back to eden
Is that the issue?
So using the unit and then the group variants, in that order, the unit will still retain the mode set using the unit variant?
True
doesn't seem to be the case actually
setting it on a unit, then on group, overrides the unit aswell
execVM "initPlayerLocal.sqf"
A3\Functions_F\Scripts\initPlayerLocal.sqf
how is it gone?
Added it back and now it says the path directory to my mission folder where the sqm and sqf are
is the action there?
Let me check the new rpt
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
Weird
Probably didnt save it correctly when eden was still running multiplayer
Says its checking if player is null
No answer thougg
it's not supposed to show you that in the same line, scroll down
Its 1
remove all the debug stuff, literally this code should work
in case it doesn't stick to this one
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 
kay, so use the latter
neither codes work
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
you must be within the trigger area for it to show
that's what your condition is atleast
i am
I vote that you didn't set your trigger conditions properly then
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
conditions shouldn't matter, just tested with a trigger area, works aswell
i just chanegd the variable name to see if it worked with a new one
grrr
Don't you need a this in the condition field to make it evaluate based on the conditions set above?
shouldn't matter anyway, his code is just checking if the player is in area of that trigger
also simplified the name a bit lol
but i changed them in both the scripts and variables
copyToClipboard str [loadFile getMissionPath "initPlayerLocal.sqf", entranceteleporter];
in debug console, and ctrl v https://sqfbin.com/
doesnt find initPlayerLocal.sqf
wtf
the paths are literally the same im lookign at it in windows explorer
no output
yes because it's in your clipboard
open sqfbin and paste it, then send the link here
but its here
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
click ctrl + s in editor, you have unsaved changes
and then try
i saved it all
10 million times
spammed the button
even reloaded the mission file
well in the screenshot you didn't so, try again
with a bit of "luck"you are modifying a different mission directory
i don't even know anymore π
yep, still "any"
i can send the mission folder if you want lol
that would solve it
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 π
["[] 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]
it works fine for me
Β―_(γ)_/Β―
whats the code?
literally what you sent?
mine didnt have the entranceteleporter on the end
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
wrong mission directoryyy
what you mean?
that you are maybe editing loading whatever the wrong mission
rename your mission to something else, and open that (rename the folder)
renamed the folder, loaded the mission. but the teleporter still not wrking
still any?
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
no i have an actual respawn for multiplayer which does work a
did i say it doesn't work?
oh i thought u meant instant spawn like it does if u dont have spawn
[] 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;
}];
};
so if i put that in the sqf file it should work?
yes
lets put that to the test
well + the trigger name
ohye i need to change that one
fixed the missing ]
i just tested it in mp and it worked, the exact same mission
If you have any mods loaded, try it without them
oh yeah well, i did have to remove all of them from mission.sqm so i can play it
might be an issue aswell
well ill tell you this
it works
damn
well, thank you guys for all the helpπ
now i can start building the actual mission
i don't think you should add more objects to it π
lmfao
be sure to make the most of them "simple objects"
yeah i have to go over all that stuff i just copied it from a template
(and "local only" too)
that will save the server as well as the perfs
alright thanks for the tip
The new Inventory sorting system is not the same like the sorting system of the script commands 
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
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
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?
```sqf
// your code here
hint "good!";
```
β
// your code here
hint "good!";
Yes, realized, still doesn't seem to work
Ah, thanks
Also do you mean hint (str (typeOf _entity)) + (str _watch)) does it fine?
Yes
Are you sure the _watch is true in this context?
Also tried a [str typeOf _projectile] remoteExec "hint"; to be sure
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.
Aha, that's the situation
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?
you can do that yes
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.