#arma3_scripting
1 messages · Page 600 of 1
So a player could ddos your server with it if you dont set amy limitations

That's just a hypothesis
But still
Commands with global effects should be used sparingly
Ok so it is possible to place things relatively and accurately, using the aforementioned method and this code
relDirAndUp = ([axe_1, house1, false] call BIS_fnc_vectorDirAndUpRelative);
relPos = (house1 worldToModel (ASLToATL getPosWorld axe_1));
axe_2 setVectorDirAndUp [(house2 vectorModelToWorld relDirAndUp#0), (house2 vectorModelToWorld relDirAndUp#1)];
axe_2 setPosWorld (house2 modelToWorldWorld relPos);```
Just posting this here so it's available
GJ!
command attachTo disables ai use of lasers, anyway to make an ai unit "stick" to a vehicle without that command? (setpos doesn't work either)
ai use of lasers
laser target or weapon IR laser?
IR
other than the proper cargo positions, no
i wonder iff attachTo has some preset to disable some ai functions that i could later re-enable but idk
a config entry in cfgMagazineWells contains multiple arrays, how can i fetch all of them?
i tried BIS_fnc_getCfgDataArray on the entry, but it returned an empty array
well im trying to get a jet to shine an IR laser by using an ai and making his vectorDir the pilot camera direction, which all works, the only issue is the actual laser part
ive also tried making a invisable object he could stand on and setpos to but, no luck
honestly, it was just the past render distance thing, plus it doens't really give that whole "laser" effect. i made the right steps i feel like, just need to debug this last part
what "laser" effect?
and you can get the render distance and not draw the line if it's past render
which way are you trying to point it?
like, im kinda about realism and i have a lot of nvg and IR laser mods that kinda make it all pop, especially with bloom, kinda just a glowing effect, and im trying to point where the camera is looking
what camera?
the plane im using, it has to be a solo seater so getPilotcameradirection works
i chose the harrier, cause it also has this function with a litening pod irl
quite difficult thing you want to do I suppose
targetting pod with laser would probs work if it is compatible with that stuff
IR laser from targeting pods doesnt have the "laser" effect he wants
i recommended drawline3d, but that's not good enough 🤷♂️
its not like its not good enough, i just, think there's a way to execute this, setPos kinda works, if i gave him a surface to stand on and constantly setPos and go slow with the jet
i can probably figure it out, we will see tho
lol
i dont recommend this
but have you tried setting the pos on an EH that runs on each frame?
this is not a good solution for multiplayer, btw
i actually did, but the problem is, it makes him like float in the air and have a little bit of latency, thus making the laser flail everywhere, but, like i said, if he has like setVehicleposition to a surface i attach to the jet, then he might not have the same problem because he is technically on the ground, because when i was testing setPos while standing still, phenomenal outcomes, but otherwise, its been a struggle. Also, the end use is ive noticed with A3TI that there is an IR marker, but it really annoyed me because it didn't have a "spotlight" effect, so you couldn't really see it from the air, and get a better view of what the aircraft is looking at, so i thought of the real use of IR lasers on TGP and trying to implement it. TLDR;;;; IR Laser shines from the sky, making it easier to spot what the aircraft is looking at. a function also used IRL
TLDR at the end
is there a better EH for this? is there like a position change EH?
no
we would have already told you if there was a great foolproof and MP frame friendly solution
well what causes it be hard with multiplayer, sorry lol im just tryna learn why and improve from mistakes :D
synhronization between clients for each frame
the setpos commands and such are not meant to be run constantly
attachTo is a bit better for that but as you noticed it disables stuff for characters
I need some help. The trigger is created and it works, as the hint 'boom' is appearing, but the ied isn't exploding?
_ied = "IEDLandSmall_F" createVehicle getMarkerPos _spawnPoint;
_ied attachTo [_vehicle,[0,0,0]];
hideObjectGlobal _ied;
_ied setVehicleVarName "ied";
ied = _ied;
_trigger = createTrigger["EmptyDetector",getMarkerPos _spawnPoint];
_trigger setTriggerArea[5,5,0,false];
_trigger setTriggerActivation ["WEST","PRESENT",false];
_trigger setTriggerStatements["this","ied setDamage 1;hint 'BOOM!'","nil"];
_trigger attachTo [_vehicle,[0,0,0]];
@unkempt sorrel to continue on that, what you are trying to do is probs one of the most hacky method of doing what you want to do.
but also right now I dont have the luxury of time to explain it further. You could perhaps try using a vehicle that has laser on its turret instead of a character
@peak bridge is there a question related to that
@peak bridge you need to detach the IED for it to explode properly.
stated in https://community.bistudio.com/wiki/attachTo notes
Thanks, that might work :D didn't think of that man
Ok, the problem is that it isn't recognizing "ied" inside setTriggerStatements
And yes, I've deatched it
if you… killed… the ragdoll… does it ragdoll?
I wanna make an extension similar to https://imgur.com/a/u6UZOPL the open scenario folder button, where it makes the files necessary for Zeus entities to work. Its part of a template tool. Does anyone know rough where to look at finding the extension (or script that calls it).
Can be found at configfile >> "Display3DEN" >> "Controls" >> "MenuStrip" >> "Items" >> "MissionFolder".
my feeling right now: (image attached below)
and no, the ragdoll doesnt ragdoll when it's killed
@brave jungle maybe somewhere in ui_f?
let me see
Yeah i've been searching in there
really annoying me
hahaa
I hate how they categorize it
so, back to Arma 2 death animation?
@winter rose you're god damn right
made these a while back
video features a script with the a2 death animations
and a display of my poor aim
also the old version of the ivnentory
y u do dis
some worlds just want to burn men's watches
I… you… er…
also, here's the new inventory-look:
https://i.imgur.com/IIetbIj.png
so you can wash your eyes from what it was originally
and video of me testing no-ragdoll:
https://streamable.com/81pfno
this unit has damage disabled
so that i can make sure it wont sink through the car
aaah yes, good ol' A2
it's pretty fine
don't forget to make them balance their chest back and front when hit!
yeah, cant forget that
XD
but im working on the catapulting atm
need to apply the vehicle's movement vector to the dead player and give it some lift
so that i can get that nice flinging effect of arma 2
W.I.P.
now this is what i call pod racing 😅
this mod should be called "arma 3 reduction"
but it's called "Tom"
Arma 3 -1
watches and matches
i do it because i can
I mean
and if i cant, i find out how
without worrying whether you should
it's a very detailed project into the arma 3's bowels
Science has gone too far!
so it makes me find out these obscure things
it's a learning experience
it's surprising how much arma 3 can actually do
and how much you can make it not do
if you want to see any of the code and work off of it, feel free to ask me
If you can't do it, you haven't found da wae yet
de wey*
if you go that way, don't forget that you could die in OFP by shooting at/between your feet
including getting damaged by opening gates
So when are you going to release your 'A2IA3' mod 
cant miss that
class MissionFolder {
text="$STR_3DEN_Display3DEN_MenuBar_MissionFolder_text";
data="FolderMission";
};
```Found this but fck knows what data links to in `cfg3DEN`..
the release itself will hopefully be an extension of @restive leaf's excellent work. Just an addon
but i will release a script-package with unbinarized everything
Hm we have IFA3, A2A3,
OWA3 #soon ?
@brave jungle better use f or 🦆
if i have the time, i will probably take it all the way
😄
@brave jungle check stringtable
That wouldn't really help me though
i'm after either script that calls the extension or the the ext itself
never mind that's jsut textures
apart from that
controls
Ye
only one user per drone
as for the feed, it is scriptable (if you want the UAV feed in the bottom right corner)
@winter rose
Sorry for digging up old advice...but I'm looking to build something like this for my community (a player controlled UAV broadcasted live to players on the ground)...I've been exploring the customInfo Module but seem to be drawing a blank...any way you could point me in the right direction?
theres no function for it
A3DZE @oblique arrow 😉
Arma 3 in DayZ Enfusion
?
which makes me think the script is done onLoad in a var space
But this is #general_chat_arma talk @restive leaf
@signal sky https://community.bistudio.com/wiki/BIS_fnc_liveFeed ?
i can't wait to get to play with Grahame's arma 3 custom content
@winter rose Thanks for the quick reply. I was taking a look at this which could work in worse case but I was looking to perhaps use the same feed as the operator. Perhaps creating a cam identical to the operator like the UAV retexturing scripts?
better? 😅
it was just to toy with you (and words), you actually didn't infringe any rules at all
I just found https://community.bistudio.com/wiki/getMissionPath - I guess I can pass the path to my extension with this instead...
getMissionPath "mission.sqm"
then adjust the path as I need
Right...?
What a handy command
😎
ha
nca_fnc_itemtype > bis_fnc_itemtype
but hey, another man's trash is another man's treasure
my internet is trash right now, does that count aswell?
56k-era lovers would envy you!
i have 500k
buuuuuuuut, for some reason, i have to watch youtube in 140p right now
nvm
360p
laughs in 16k
the problem is, i have less than 1k right now probably, for some damn reason, i cant even look up the wiki or forums to get help
maaaybe I shouldn't show off about my sync 400Mbps right now… oooooops
@slender schooner want the COMREF?
comref?
https://cdn.discordapp.com/attachments/105465701543723008/720997940520288296/2020-06-12_COMREF.7z
(direct link to save you from loading the forums)
well, in my current problem, this might probably not help a lot, but for the rest, might help
have you tried restarting your router?
are you wifi'd?
wait, let's head towards #arma3_troubleshooting maybe
its fine, already downloaded
guess i ll let the gui part sleep for now, and move on to the backend part of it
soooo, if i have the server running with two addons, addon 1 functions will be able to use addon 2 options, right?
yeah?
well, all i wanna do is to write a small addon for the backend of my server
it should be able to use the life_server addons db_fnc_asynccall function to do database queries
but nothing on startup whatsoever, so i think that the start order shouldnt be an issue, no?
Yeah, doesnt matter if it's nothing at startup
i see
something i searched for already, but didnt really find any real answer yet, if the addon starts getting loaded, i want to make a diag_log saying that the addon now gets loaded in, and when it is done loading, i want it to also say that
is there an easy way to do that?
no, I would say that part is engine-side
i see
hi, i have a question ? i know that is not scripting but how to edit a "soldier texture" and preview in real time in arma 3 ?
previewing it real time isnt possible, no?
if you can with "settextureobjectglobal" in the editor
yea, but dont you need the texture in the mission for that?
idk
i think
i will try
but when the texture is loaded
i need to change the name
so how to clear the cache ?
i think you need to reload the scenaryo everytime you change the texture
euhm
good question actually, i usually simply take other names for each edit of a texture
like, texture1.paa, texture2.paa
yes but it's long
because i need to save the texture
convert it to .paa
after i need to change the name
and after i need to change the name in the script
yes
if you want
well, its the only way i know works, but to be fair, i m not very good at arma scripting
oh ok don't worry
i have an other question ? how to use the filepatching ?
how do i exit the eden enhanced animations so they will go to a waypoint?
i have an other question ? how to use the filepatching ?
@faint oasis
afaik filepatching allows you to basically use an addon in a non-pbo format. So, you dont have to pack it to use the addon making the editing a lot easier and faster
@slender schooner yes if you know how to i want to know because i have enable the filepatching but my addon is not loaded so where i need to put my addon ? what is need to do ?
oh boi, soooo i only know how to make a script addon so far
so, this is how my addon is structured
https://prnt.sc/t8pxiz
@slender schooner ok i'm not bad but that doesn't help me
because i need to know how to do that
because i want to create a texture and see the preview at real time
and i have hear speak of that
you make the addons main folder
@yourAddon
|_addons
|_Your stuff
where ?
in the arma root folder
wiat
about implementing textures tho, thats a bit over my competences yet, so i cant help you any further, sorry
no i know don't worry
but if i can change a file when the game running
i can change the texture
sowait
the @file can be wherever you want if youre using the launcher
then just define a local mod
what's the structure?
vehicle_custom.pbo overrides vehicle_custom
if youre using filepatching, you shouldnt have the pbo in there too
yes but if i remove it
yes?
what's in vehicle_custom?
does your addon work when packed as pbo?
yes
it's my addon and he is on the workshop
so yes he work
but only if the .pbo is in the folder
@faint oasis just read this: https://community.bistudio.com/wiki/CMA:DevelopmentSetup#Develop_with_unpacked_data
follow the guide and if youre still having issues, let us know
@ebon citrus i have already see this but i don't understand most of thing
i will try
i mean, i cant explain it much better unless you tell us which part
no
i dont udnerstand your issue here
i want to know if in the mod i need to keep the pbo
if you already have the mod in the unpacked version, and you want to use filepatching, then no
you dont need to
ok
just a shot in the dark - if a player throws a frag grenade (and some other types), the ability to throw another one is taken away for a few seconds. Is there a way to return that state?
something like sqf _canThrow = player canFire "THROW"; - fictional example which of course makes no sense
i would take a look at the eventhandlers, there should be one that triggers on "throwing", that way you can execute your code already on throw, but for the code itself, i dont know
thanks for answering @slender schooner - i was hoping to avoid eh's but tried that as well - I searched cfgAmmo for any time values that resemble the approx 3 seconds that it takes to throw a frag again vs the 0 seconds it takes for a smokeshell. no success unfortunately
hm, might be a tough one
but yea, i think the "Fired" or "FiredMan" EHs should work, i havent tried them out yet tho
okay thanks - hopefully I can find something to reference since not all grenades have that property
if you find something, make sure to tell me
I also tried ```sqf
player setWeaponReloadingTime [player, (currentThrowable player) select 1, 0];
maybe you cant change it at all
but it could be aiAmmoUsageFlags or something maybe, I'll keep testing
Changing it was only a cheap shot, ideally I'd just know if the unit can currently throw something
I think it's just a reload time. If you have a single one of a bunch of throwables, you can throw them all in quick succession.
interesting - indeed i can switch grenade types and throw the next one immediately
but if i throw rgo's in succession, i need to wait 3s per throw
any idea where the grenades are defined in the config?
cfgMagazines and cfgAmmo unless I'm overlooking something
I am getting a cannot find collect.sqf error even though it is in the same sqm file and file extensions are not hidden?
I am using a .paa image that is blue for an RscImage. When I open the file in TexView2 it still shows as blue, but when open it in the GUI Editor it comes up as orange. Any idea why?
i have added the .pbo in the mod folder and i have adder the mod folder and after i have add the "pboprefix" in the .pbo and it doesn't work
kind of a weird question but is there a way to just play a lip sync animation without an actual sound? I want the character to say something but the sound to be controlled by a different object.
@burnt cobalt configFile >> "CfgWeapons" >> "Throw" >> "HandGrenadeMuzzle" >> "magazineReloadTime"
so i will repeat my question ? who know how work the "filepatching" ?
filepatching requires you not to have a pbo, as this kill the purpose of the process
no
check then
filepatching literally MAKES you a "fictional" pbo on gamestart
thats the whole point of filepatching
i need a "%PBOPREFIX%"
yes
where is put the pboprefix if is not in a .pbo
your folder
and in that textfile you write the name of your addon
ok
well, i use it with .txt and it works, i think
so
PBO Manager require to use $prefix$ filename instead.```
depends on the tool you're using to build
and i use pbo manager
i use pbo manager
vehicule_custom
change it to pboprefix.txt and then test it
i mean, writing addons is about testing
but i precise
i personally dont havy any experience with it
@digital hollow boss, thank you!!
@burnt cobalt configFile >> "CfgWeapons" >> "Throw" >> "HandGrenadeMuzzle" >> "magazineReloadTime"
@slender schooner i have change "$PREFIX$" by that : pboprefix.txt and in i have only : vehicule_custom
it's very simple
the addon is not loaded

Now my issue is getting the text to show in front of the RscImage. Any ideas?
- it's
$PBOPREFIX$, see https://community.bistudio.com/wiki/PBOPREFIX - this file is not required when you use mikero tools (don't use official tools, since they're buggy)
- afaik does -filepatching require the pbo, see https://community.bistudio.com/wiki/CMA:DevelopmentSetup
@exotic flax i have already tested with "$PBOPREFIX$"
and it doesn't work
because the addon is not loaded
Did you create a proper mod?
btw... this has become out-of-scope for #arma3_scripting thought
yes it's my mod and it work perfectly if i put the .pbo
So, load the mod normally, have the same mod unpacked on your P drive and use -filepatching in the startup parameters
i don't have loaded the P drive
And there's your issue
that is important ?
very
f***
It's like driving a car without wheels
it happens to the best of us
I would suggest to unpack the Arma 3 pbo's (can be done with Arma Tools), make sure your mod is placed there the correct way (P: drive is root of mod paths, similar to what you have in PBOPREFIX)
where is the P Drive ?
If it's mounted you should see it in explorer
yes
So there it is 👀
What did you put in PBOPREFIX?
Normally a mod has the structure:
tag/modname/addons/addon.pbo -> config.cpp
So unpacked it should be:
P:/tag/modname/addons/addon/config.cpp
And in PBOPREFIX it will be:
tag/modname/addons/addon
You don't need tag, but to prevent other mods with the same name messing stuff up it's highly advised
Although I also just use a single letter (like x or y)
and i unpack it on the p drive
Yes
No, just let the tool make it
yes but the tool will make a folder with the mod take like this \modname\config.cpp
I'm that case fix the directory structure
It should be able to work
ok
so i launch the game ?
in the folder i have the config.cpp and the pboprefix
and in the pboprefix i have the mod name
so that : vehicule_custom
@exotic flax he doesn't load the mod
in that case you did something wrong...
@exotic flax can you accept "DM"
because i will send you the screenshot$
because here i can't
i think it's more simple to understand
I don't accept DM's because in this Discord more people can help than just me
and you can upload images to imgur (or similar) and put link here
ok
so wait
@exotic flax ok you can see : https://imgur.com/a/O5L1Aam
i have 2 time this mod
one unpacked in the p drive
and the other in my mods folder
but i have disable it
and it doesn't load the mod folder in p drive
if you disable it it won't load 🤷♂️
-filepatching will load the pbo, but it will check for changed files in P drive
again; read https://community.bistudio.com/wiki/CMA:DevelopmentSetup on how to set it up correctly and how to use it
in the loaded pbo i need to add the pboprefix ?
in the pbo prefix i need to precise the "P:" ?
no...
so it's strange
because i have added the pboprefix file in 2 mods
and I really advise to use proper directories to prevent issue
so that is a problem ?
PBOPREFIX is needed for each pbo for Arma to know where the files are, and that MUST be unique for each pbo
PBOPREFIX or PREFIX ?
$PBOPREFIX$ file (nothing else)
so it's strange
because that is what is have in the pboprefix
vehicule_custom
only that
and the mod works when loaded?
the mod work
because
the mod have the .pbo
so it work perfectly
but i can't do any change
when the game running
just read the link I've sent, it explains how it works (since I never use filepatching)
and note that filepatching does NOT allow you to change config files, only scripts and textures
since config files are loaded when the game starts
yes i know don't worry i have read the link
i need to change the texture in real time
so that is why i want to do that
well, for quick testing I usually use https://community.bistudio.com/wiki/setObjectTextureGlobal
in a mission 😉
you need to rename the texture
for each chagne
so it's for that i want a new system
and thx
that is a very good way
btw
when i do a change
i need to do on the folder in p drive right ?
That's how I understand it
k
that
x\vehicule_custom\
and that in pboprefix "x\vehicule_custom\"
and it doesn't work
i think i know
@exotic flax it work i know why it's me. I'm a noob. i need to read that : "PBO Manager require to use $prefix$ filename instead."
i have rename the "pboprefix" to "prefix" and it work but now the texture doesn't show up xD
i have removed the "x" folder and the texture is showed but when i change the texture i don't see the change on the game
so i will check that later
so thx and bye
i have a small question, is it possible to add stuff to a class mid mission? or overwrite stuff?
like, i have this class
class zb_test {
class oof {
name = "oof";
hello = "you";
}
}
can i add stuff to it or edit/remove stuff from it without having to reload the mission?
No… otherwise it wouldn't be a config
i see
You can load the config as an array, then edit that array
But config itself is read-only
yea, i already thought about that solution
I have an addAction on a sign and want to make it so that it will create a premade dialog named "ExDialog". My init for the sign is this allowDamage false; this enableSimulation false; this addAction[" Raffle", "ExDialog.sqf"];
All the mission files are in one folder together, but when I press the Raffle action it just says "Resource ExDialog.sqf not found"
How do I map them together?
there is a line break in the file name
is the sqf file in the mission root?
what do you mean?
same folder as mission.sqm or a sub folder?
yes
yes... the same folder?
Yes they are in the same folder
I should clarify that the issue is not getting the ExDialog.sqf to run, its running the createDialog "RR_Raffle_Menu"; line in that sqf
I have a .hpp that includes a parent class called RR_Raffle_Menu in the same folder
is ExDialog.sqf used anywhere else? maybe could you send the ExDialog.sqf contents if it isnt too large
or was that one line it?
It is an sqf file
Ok
Let me simplify the question since I made it hard to understand
if it says "ExDialog.sqf not found" then that means it's not in the root of the mission
also, that's a bad way of calling a function, but whatever
I am trying to Local Exec createDialog "RR_Raffle_Menu"; How do I make that class identifiable?
you make it a class?
Yes
include it into the description.ext
the class needs to be defined in description.ext, like connor mentioned
or in config.cpp
@copper needle did you fix your issue of missing script-file?
the script wasnt missing
if it were it would say Script xyz.sqf not found not Resource xyz.sqf not found
iirc Resource not found happens either when including a missing file or when trying to do something like createDialog "xyz.sqf" where the class doesnt exist
what?
you would never call a class "xyz.sqf"
anyways, yeah
i think we're being misslead here
@copper needle can we see the full error message?
i know you wouldnt call a class that, but trying to open a file like that gives the error wanderer was getting
11:53:55 Warning Message: Resource xyz.sqf not found
so that is one possible explanation for it is my point
yeah, youre right
missing script files report missing script
not resource
would have to see the full error message
and possibly where the dialog is defined
I have a sign with the init this allowDamage false; this enableSimulation false; this addAction[" Raffle", "fn_raffleStart.sqf"]; It then runs fn_raffleStart.sqf which contains two lines (as of right now) _uid = getPlayerUID player; and createDialog "RR_Raffle_Menu"; . I believe the issues is that createDialog "RR_Raffle_Menu" can not run because RR_Raffle_Menu can not be found because the error message I get is "Resource RR_Raffle_Menu not found".
My question is how can I make that class be found and runnable
#include "RR_Raffle_Menu.hpp" in the description.ext
or whatever your hpp is called
if you have RR_Raffle_Menu.hpp
point is, the code needs to be in Description.ext
the code where the dialog is defined
the dialog's class
understood?
I just added a bunch of remoteExecs on addActions (on a script) and suddenly everything just stopped working?
yeah?
you made a mistake
if it's giving you errors, then you've probably made a syntax error
if it's not, then it's probably a logic error
@peak bridge can you go into a bit more detail?
I have a bunch of addActions to remove some wrecks on a script. And they were working fine... for me, as I was the server. I was testing this with a friend just now. He couldn't see the added actions, so I went and placed those addActions in a remoteExec. And then nothing worked
No vehicle spawns, no crew spawns, nothing at all
I just removed said remoteExecs and everything went back to normal
if(isServer) then{
while{true} do {
_isVIEBD = floor random 4;
_vehicleArray = ["C_Offroad_01_F","C_SUV_01_F","C_Hatchback_01_F","C_Hatchback_01_sport_F","C_Van_01_box_F","C_Offroad_02_unarmed_F","C_Van_02_transport_F"];
_spawnPointArray = ["vehicleSpawn_1","vehicleSpawn_2","vehicleSpawn_3"];
if(_isVIEBD == 0) then {
_spawnPoint = _spawnPointArray select floor random count _spawnPointArray;
_vehicle = (_vehicleArray select floor random count _vehicleArray)createVehicle getMarkerPos _spawnPoint;
createVehicleCrew _vehicle;
So this is the basic spawn part, nothing new around here
isSuicidal = {
params["_vehicle","_stop"];
_vehicle doMove getMarkerPos _stop;
waitUntil {
_vehicle distance2D getMarkerPos _stop < 10;
};
_vehicle deleteVehicleCrew driver _vehicle;
_vehicle setDamage 1;
_actionID = _vehicle addAction["Remove Wreck",{deleteVehicle (_this select 0)},nil,1.5,true,true,"","true",3,false,"",""];
sleep random[30,60,90];
};
As soon as I turn this addAction into a remoteExec, everything just stops working
yeah, no way?
you dont say
youre spawning vehicles at the speed of light
while{true} do {```
(_vehicleArray select floor random count _vehicleArray)createVehicle getMarkerPos _spawnPoint;```
anyways
How are you "turning" it into remoteexec?
Not what happens in game. See that sleep? Every vehicle spawned calls one function similar to that, and that controls. Also a few waitUntil in the middle
i dont "see that sleep" because you didnt show it
can you show how youre remoteExec:ing?
[_vehicle, "Remove Wreck",{deleteVehicle (_this select 0)},nil,1.5,true,true,"","true",3,false,"",""] remoteExec ["addAction"];
[_vehicle, ["Remove Wreck",{deleteVehicle (_this select 0)},nil,1.5,true,true,"","true",3,false,"",""]] remoteExec ["addAction"];
I've tried both ways like this
also, just a personal side-note. There is NEVER a reasonable justification to having a while {true}-loop
I'm aware. I will limit it once I actually get it into a playable mission, right now i'm just working solo
so the action doesnt show up?
Nope, its' that it doesn't even start the script
what doesnt start the script?
I have got everything in working order. I really appreciate the help! Now I have a new issue though which is that the RscPicture does not appear when the dialogue is created. Any ideas?
The code:
the code?
{
idd = 9999;
movingEnabled = false;
class controls
{
class RscPicture
{
idc = 1200;
text = "images\Raffle_Background.jpeg";
x = 0.293495 * safezoneW + safezoneX;
y = 0.225 * safezoneH + safezoneY;
w = 0.413011 * safezoneW;
h = 0.55 * safezoneH;
};
};
};```
It doesn't spawn a single vehicle. I would understand if it spawned infinite vehicles, but it spawns 0
do you want me to copy and paste 167 lines of code?
did i ask you to?
No, but you're asking for the script and I've already provided the important bits of it
im asking where it is running?
how are you executing it?
debug console?
init?
something else?
exevVM "script.sqf" on a Radio Alpha trigger
exactly
no errors?

ok, i'd like to see all 167 lines
pastebin, if you please
if the issue concerns the whole file, then i guess i'll have to see the whole file
what is this: span class="re5">
pastebin issue
I reverted to the working script, I literally just changed the addActions to remoteExecs
wait...
so you sent the WORKING script?
and expect us to work out what's wrong with it?
i too like to fix scripts that arent broken 🙂
i mean, i can complain a lot about this script
but i dont think that will fix your issue at hand
it will make your code "better"
😅
It works, but my friends can't see the addActions on that code, because it's local to the server, right? I'll change it now to the remoteExec I tested
Hey, I haven't coded in a few years, you could give me a break 🙂
send the broken version
Tyrandar... dear fellow, i am only trying to help you here. I cannot help you if you dont let me help you
and the longer you keep me from helping you, the more i will unload my urge to help you as being bickering and childish
so please...
let me help you
or i will go and wash the dishes
oh no, not the dishes 😱
yeah the dishes
i'¨m having a friend stay over at my place for a couple of weeks
he got evicted
so i need to actually clean up proper
but back to topic
Going to double check
im confused... that script is no different to the one before?
oh no it is. i have it open twice 🤦♂️
one issue i see is you're trying to use the remoteExec return on removeAction, but remoteExec does not return the addAction ID, it returns a JIP ID.
Yeah... Well, I'm going to kill myself now. It's working now. It displayed an error, but that's in the removeAction, as pointed out by @robust hollow
And that's an easy fix, it displayed Expected Number, but it's Type String
how do you plan to fix it?
removeAllActions
why are you removing the action?
yep, that will do it 👌
i mean, yeah
if you dont have ANY other actions you need
but why are you removing the actions?
I have, but they are added AFTER removeAllActions
sure
there's jsut a lot wrong with this
but you do you
if it works, i guess the original issue is solved
but jsut because it works doesnt always mean it's the right way to do it
doing things in a bad way will most commonly result in poor performance
or incompatibility
you should learn out of using while {true}
like, completely
anyways, Good luck!
Small steps 🙂 Thank you
Anyway to see all of the ctrlEventHandlers added to something without the ID's?
dont think so
Thanks Connor, and to confirm (if you know), control event handlers don't stack? E.g. cant have two of the same with different actions?
they stack if you added them with ctrlAddEventhandler
thats the point of the id, so you can remove a specific one
Here's a good one. Somehow this simple code, which does basically nothing but define a variable in two circumstances (one of which must be true at any given time)...produces an undefined variable. I'm confused.
// _geigerRange is verified to correctly store an appropriate number value of metres
_geigerRange = player distance vehNATO_bomb;
// The value must be either above or below 2000, so one of these options must be chosen
if (_geigerRange > 2000) then {
// Option 1: _geigerRead is defined as "Out of Range"
_geigerRead = "Out of range"
}
else {
// Option 2: _geigerRead is defined as "x metres" or, if _geigerRange fails somehow, " metres"
_geigerRead = [_geigerRange,"metres"] joinString " "
};
// undefined variable in expression: _geigerRead
systemChat format ["Distance to radiation source: %1",_geigerRead];
@hallow mortar _geigerRead is out of scope
it's defined within the if-statement
so it does not exist outside it
you need to do something like this:
private "_geigerRead" outside the if-statement
preferably before you use the variable
take a look here to read more and get a better understanding:
https://community.bistudio.com/wiki/Variables
ModuleStrategicMapORBAT_F seems to set a control event handler, any way I can see exactly what display & script execution it performs? Can't see anything in the config viewer
look in the function related to it
all the scripts in \a3\modules_f\strategicmap\functions, though fn_modulestrategicmaporbat.sqf is the main one
perfect, cheers!
Hmm, so they are using ctrladdEventHandler here however when I use that at a later point it seems to overwrite :/
@plucky wave Control EHs are processed in reversed order, i.e. last added: first, first added: last. So if you have an override it should be set up in the 1st added EH.
before I save this sound file, what sound file extension does arma like?
Thanks Nica.. will play around with it
@fair drum arma takes ogg and either wav or wss, im not sure 🤔
ogg it is then
@ebon citrus Anything in particular that would stop further Control EH's being fired? E.g. something in the first processed one stops the processing of the others?
Looks like returning true on the first processed EH stops the execution of the rest
so I have created a class cfgSounds to reference my custom voiceover. if I were to use playsound3d, how would I call that class so I don't have to do filename etc etc
@ebon citrus Just inverted the return value to false from the function that is called from the first processed EH.
Worked fine.
nativeTemple say3D ["diety1", 200, 1, false, 0];
alternative syntax:
from say3D [sound, maxDistance, pitch, isSpeech, offset]
why am I getting a 5 elements, expected 2 error when the alternative syntax says I can?
Offset is available only after next Dev update
mk so I have nativeTemple say3D ["diety1", 200, 1];
and in description.ext i have:
class cfgSounds
{
sounds[] = {};
class diety1
{
//Editor Referral
name = "diety1";
//filename, volume, pitch, distance (optional)
sound[] = {"\voiceovers\diety1.ogg, 300, 1"};
//subtitles
titles[] = {0,""};
};
};```
anything I'm messing up? still don't hear anything. could it be the object i'm using? its a non living entity like an ancient head
no errors and it will pass to a hint "its working";
Wrong quote scope in diety1
Your CfgSounds is wrong
In sound[] = {...} you have it all in one string ("") but only the file path should be a string
sound[] = {"\voiceovers\diety1.ogg", 300, 1};
i hate myself
https://tenor.com/view/orangutan-hammer-fixed-work-gif-7773423
a gif of an orangutan hitting a nail with hammer
it was most likely from the gif selector
correct but apparently thats turned off lol
gifs dont work here for us peasants 😢
I know, but it's a rule and people get unreasonably warned for it
if I have a set of groups, d1,d2,d3,d4 and I want to do a forEach for every unit in every group, how would I phrase it. I know if I wanted to just do d1 I would do, {blah} forEach units d1
{{blah} forEach units _x} forEach [d1,d2,d3,d4];
oh... they stack. interesting
yes. some people say you shouldnt do forEach loops in forEach loops, but it works so 🤷♂️
the important thing to note is you cant use _x to reference the group in the nested loop, because itl reference a unit
If you want to do that, define a value that points outer _x
hmmmm so no going with the {{_x enableAI "MOVE"} forEach units _x} forEach [d1,d2,d3,d4] as it will only do one unit?
{{_x enableAI "MOVE"} forEach units _x} forEach [d1,d2,d3,d4] would work
{
//_x == group
{
//_x == unit
} forEach units _x;
} forEach [d1,d2,d3,d4];
this is what i mean
so as polpox said, you would do something like this if you needed to use the group inside the nested loop
{
private _group = _x;
{
_group ....
} forEach units _group;
} forEach [d1,d2,d3,d4];
... being the code area desired?
{
private _group = _x;
{
_group enableAI "MOVE"
} forEach units _group;
} forEach [d1,d2,d3,d4];
yea, if you needed to use the group for something in that loop, though enableAI takes a unit not a group, so you can get away with
https://discordapp.com/channels/105462288051380224/105462984087728128/727425256276492299
mk, i'll keep it in mind if I run into something that needs a group. hopefully the theory will stick when I need it
@ebon citrus If you wish to test it, use this:
fnc_test1 = {
diag_log "[ALiVE-TEST] - Test 1 - Success!";
_result = true;
_result;
};
fnc_test2 = {
diag_log "[ALiVE-TEST] - Test 2 - Success!";
};
_control = finddisplay 12 displayctrl 51;
_control ctrladdeventhandler ["mousebuttonclick","[] call fnc_test2"];
_control ctrladdeventhandler ["mousebuttonclick","[] call fnc_test1"];
and then click on your map.
@plucky wave people do do that
it just doesnt read on the wiki
@winter rose ther's something missing on the wiki or im blind
Yeah I had a look there, couldn't find anything written down
@ebon citrus @plucky wave control EHs that stop if one returns true?
Yup
wait, which examples? I don't see true here (yet)
oh, here - bottom of the page: _handled
https://community.bistudio.com/wiki/User_Interface_Event_Handlers#Script_defined_events
banaknife?
Hold on
soooooo, i m currently getting more into using configs. I want to store an array of variables in the config and when needed, give that array out and change the values, but my approach doesnt seem to work, how should i go about this?
licenses_civ[] = {
license_civ_driver,
license_civ_trucking,
license_civ_pilot
};
this is the config
_testarray = getArray (missionconfigfile >> "zb_config" >> "Blitzer" >> "licenses_civ");
{
systemChat _x;
_x = false;
}foreach _testarray
and this is my code so far
when using the code however, the variables value doesnt change
it does find the values, like, it displays them via systemchat without an issue
What do you want to accomplish by setting _x to false?
I want to store an array of variables in the config
config is read only, you cannot "store" stuff in there
i mean, its a script for altis life
basically, a speedometer that removes your licenses that are defined in that array up there on X times getting caught
the config is only for storing the names of the licenses, no other information
don't know why you're telling me that
so that the foreach should then do simply set each each license to false
well, for context
config is read only
You can't set config values on-the-fly in-game
i know
i just want to have an array of licenses to be removed
but, it doesnt seem to be able to change the ingame defined variables
so that the foreach should then do simply set each each license to false
no. You are setting a variable called "_x" to false. absolutely no connection to the config, besides that _x previously referred to that, but now doesn't anymore
so, once the _x is used, it loses its value?
You “overwrite” _x
Those are suppose to be "strings" in the array?
_x is a reference to an element in the array.
You set _x to a different value, you don't modify the array you are iterating over
oh, right, i see
is there a way to exit out of the loadingscreen or cancel it?
ie when it errors out, or it takes too long
someone suggested to bind a certain sqf command to a key
but i cant remember what it was
endLoadingScreen?
_script spawn {
sleep 30;
terminate _this;
endLoadingScreen;
};```Do some workaround like this?
ugh
I kinda don't know what's the situation tho
whatever one tries, in that case it will be horrible 😄
when it errors out, or it takes too long
- the machine could be very slow, so time shouldn't be a thing
- if it errors out, the engine should get out of it, not a script
@velvet merlin maybe:
startLoadingScreen ["Loading"];
private _maxTime = diag_tickTime + 30;
private _handle = [] spawn {
// stuff that may crash
};
waitUntil { scriptDone _handle || diag_tickTime > _maxTime };
endLoadingScreen;
will test with ctrl+v => endLoadingScreen
I might add that structure to the wiki after all
Me happy, finally found out what to do with the laser stuff, I basically made an attachTo to a vehicle with a gunner that has permissions to let the gunner use his rifle, then put an ai in said seat and now its about filling out parameters :D
d e t e r m i n a t i o n
👍
#arma3_terrain since "maps" are terrain, and not scripts
unless you want mods with additional stuff you can add with 3den or Zeus, in that case #arma3_questions
or what kind of "script packs" do you mean?
oh I mean for mission makers. I was looking for script packs of any kind that can help in making missions easier. Spyder addons, for example, has a module that allows you to manage player loadouts easely. I said script, but it could also be editor/zeus modules. But yeah I'll move the question there
…DEH?
addMissionEventHandler
["PlayerViewChanged",
{
params ["_oldUnit", "_newUnit", "_vehicle","_oldCamera", "_newCamera", "_uav"];
vehicle1 = _vehicle;
vehicle1 addAction
[
format["<t color='%1'>Enable IR Marker!</t>","#228B22"], // forest green
{
params ["_target", "_caller", "_actionId", "_arguments", "_vehicle"];
_group1 = createGroup blufor;
soldierObj1 = _group1 createUnit ["B_Soldier_A_F", [0, 0, 0], [], 0, "NONE"];
_laserHolder = createVehicle ["O_LSV_02_unarmed_F", [0, 0, 0], [], 0, "CAN_COLLIDE"];
_laserHolder attachTo [vehicle1, [0, 0, 5]];
soldierObj1 moveinCargo _laserHolder;
_group1 setBehaviour "COMBAT";
_group1 enableIRLasers true;
hideObject _laserHolder;
hideObject soldierObj1;
onEachFrame
{
droneCam1 = getPilotCameraDirection vehicle1;
soldierObj1 setVectorDir droneCam1;
};
},
nil, 3, false, true, "laser", "true", -1, false, "", ""
]
}];```
what is causing my code to make my game slow motion ? lol
pretty sure im not ending anything, just dont know how
sure
Anyways, you shouldnt run heavy code in onEachFrame
Infact, you shouldnt use onEachFrame at all
yeah its kinda overloading everything, idk what other EH could constantly update though
EachFrame
yeah it was BREAKING my game lmao
also, everything works as intended, but one thing, the laser on setVectorDir is pointing the opposite way, im wondering if theres simple math where i could flip it?
yourVectorDir vectorMultiply -1?
that should work :D
so I tried that sound thing I mentioned not too long ago,
it worked but only I could hear it if I press local exec (which I expected)
i pressed server exec but that doesn't work anyway because it doesn't recognise player as anything but objNull
makes sense... because the server isn't a player
i pressed global exec and everyone could hear it independently
also makes sense, since 'global' will send it to all clients
how do i make it so that everyone can hear it at the same time and with one source rather than several
yep
?
I want to make it so that a sound will play from my character and others can hear it if possible
pass your character as the argument
when youre global executing a script from the console, it is sending the script, not the compiling the script, i assume
so if you include "player" as a variable, it will always be lcoal to that player
so stop using "player"
if you need to global execute it from the console
alternatively, use remoteexec
[player, "mySound"] remoteExec ["say"];

and do I global exec that or server
server
ah ok so player will be of one value only
[theUnitToSpeak, "mySound"]
if you only have access to player, then use remoteExec client-side
locality is a 
no u
that too
once you start working with it more, youre happy about the locality
it allows you to optimize your code better
I just use CBA eventNamespace to put stuff in place
less variables, less network saturation
what's the difference between say and say3D then
say is 2d
say3d is 3d
say3d has an actual source
say is like "comes out of the unit's radio"
so by 2d, do you mean I'd be able to hear it in "stereo" almost
so stereo vs 7.1 😛
where i can hear it from each ear
yep
yep

[player, "mySound"] remoteExec ["say3D"];
so i'd just swap that in for the function
and local exec it
say is 2d
@ebon citrus buzzz WRONG
yep
thanks

say is either 2D or 3D, depending on if in a cutscene (camera) or not
(…NIT?)
but fair point
actually, there's say, say2D and say3D
say will either works as 2D or 3D depending on usage.
say2D will only be heard by the object/player it has been attached to
say3D will be played from the object/player, and can be heard by everyone close to it
remember to read the notes on the biki well
remember to actually read the wiki

@exotic flax buzz wrooong
explore different commands and methods
knowing that a method/command exists is a great start
must read all the wiki!
and tbh, BIKI's "related commands" tab is better than google itself
https://community.bistudio.com/wiki/say
https://community.bistudio.com/wiki/say2D
https://community.bistudio.com/wiki/say3D
say = say2D or say3D
say2D = only changes volume according to distance
say3D = 3D positioning sound
playsound3d = globally executed from sound-file
and only works right if the target is a player or a vehicle
what channels do arma currently support
say2Dwill only be heard by the object/player it has been attached to
say3Dwill be played from the object/player, and can be heard by everyone close to it
that's locality, (and both have the same) and it's circumventable byremoteExec
or playsound3d
uh also is there a way to stop the sound without killing the character/vehicle
yes
@slate cypress channels, as in radio channels?
https://community.bistudio.com/wiki/setCurrentChannel
channels as in 5.1, 7.1
and then delete that object
private _dummy = "#particlesource" createVehicleLocal ASLToAGL getPosWorld _corpse;
_dummy say3D "whatever";
_dummy spawn {
sleep 5; // at least the length of your sound
deleteVehicle _this;
};```
@slate cypress I believe up to 7.1, but I'm not sure
arma 4, plz
i hope we wont loose all the cool stuff from arma 3 with the move to arma 4
I can't play Arma 3 with anything over stereo... 🤔 it will just not work...
I saw a reddit image saying Arma 4 is never coming out lmao
sure
and the sky is falling
nobody cares if a4 is or isnt coming out
all discussion of A4 is always just hypothetical until it's released
(reminder: all there is to know about Arma 4
https://community.bistudio.com/wiki/Arma_4)
arma 3, when it released was more like arma 2.5
and was later progressed into a3
i imagine arma "3" released around 2016
that's just my opinion
you're a pinch harsh on that I think - maybe 2.75
a lot got improved, and now this is Arma 3 v1.75 at least
yeah, youre right
(well, if you add the campaign)
i was just using ballpark numbers
i'd really like to see bohemia add some sort of dynamic model to the aircraft
interactive
Arma 3 v1.00 without the campaign "DLC", sure, sandbox Arma 3 v 0.75 😄
oh, it's 8pm
nope, it's 7
no its 6
i have a massive alarm clock that is 12km away on the other side of a lake
and it jsut happens to echo into my window if i lean set the window right
offtopic//
anyways, whether arma 4 will come out by BIS or not, it will come out eventually
a spiritual successor atleast





