#arma3_scripting
1 messages Β· Page 319 of 1
(to confirm, the example you gave has no errors)
but [] call { _x } count [1] + [2]; has a warning: "Local variable "_x" is not from this scope (not private)"
(evaluation is done from left to right when both operators have the same precedence)
in any case, I am always looking for people to find errors in the parser. So, if you are able to find one, please let me know!
[] call ({ _x } count [1] + [2]); gives an error since call only accepts code in rhs (and count returns a number)
Hey guys, can someone see what I'm doing wrong here? I've been sitting here pulling my eyes out. https://hastebin.com/asagadoceb.scala
Basically, ControlGroups Loadouts are showing correctly, although not at correct position (It's shoing upper left corner) and ControlGroups ListVehicles is not showing at all. I kinda have an idea as to why the first controlsgroup is weird, but it seems weird listvehicles group is not showing at all.. π
maybe use some sensible idcs instead of the huge numbers π
also idcs don't need to be unique since they're local to the display idd
and ListVehicles is inside the Loadouts class
it should probably be outside of it
1212312312313123123123123 is definitely too huge for an idc. SQF numbers are all single floating point numbers and that number cannot be represented accurately.
That is not the problem though, as it was the same when they were -1 or 1, 2, 3, 4 etc @little eagle
i don't think the structure is right
Hmm
class Controls {
class Loadouts: GW_RscControlsGroupNoScrollbars {
class Controls {
};
class ListVehicles: GW_RscControlsGroupNoScrollbars {
class Controls {
class Background: GW_RscText {```
ListVehicles needs to be in a Controls { }
Ye I know that, it must be a mistake from the version I uploaded
One sec
Updated version with the same problem
if you delete the controls you have this:
class Controls {
class Loadouts: GW_RscControlsGroupNoScrollbars {
class Controls {
};
class ListVehicles: GW_RscControlsGroupNoScrollbars {
class Controls {
};
};
};
};
};```
Now I see what you mean xD
Okey, so now I have this
Problem still persists however
yeh i don't see any other issue, should be 2 controls sorta on top of eachother
it's not because u just can't see the one behind?
Basically the loadouts group shows left top side of screen, should be in middle. The listvehicles group doesn't show at all
safeZoneX, safeZoneY is the top left
I don't want the controlsGroup to position anything, that is why i set it to full screen
or safeZoneX, SafeZoneY, safezoneW, safezoneH
yeh fair enough, can't see what would be wrong though
looks like it would all be on the left side fo the screen.. but sorta hard to tell exactly
yeah i don't know sorry, doesn't look like what i would have thought from that code
shouldn't be anything visible at safezonex, safezoney
i assume you don't have any safezonex/y macros
No I don't π¦
is the a script command which loads a mission?
there's https://community.bistudio.com/wiki/serverCommand , but not sure if that's what you mean
@rotund cypress did you try my suggestion? Pretty sure ListVehicles needs to be a child of GW_SandBox_RscDisplayDynamicLoadouts::Controls
oh sorry, didn't notice your answer hehe
I was pretty sure it was, I'll have a look
The things you mentioned I am aware of, I just put a bunch of jibberish IDCs for testing purposes.
As for in needs to be inside controls, it is
Otherwise it would give me a plethora of errors
I can't understand what the problem is, at this point I am literally pulling out my eyeballs π
you might have to position Loadouts instead because the children of Loadouts are positioned relative due to the ControlsGroup thing
IIRC
ah yeah that's right..
either that or you have to remove +safezoneX from all the controls
0,0 = top left for your controls
not safezonex, safezoney
ah so basically remove just the safezone and keep everything else?
and have safezone as I have on parent ctrl?
remove the +safezoneX and +safezoneYs
leave it for the 'root' controls (loadouts/listvehicles)
ye alright ill try that
i think it's a coincidence that it moves to the top left because your controls start at 0,0 in 'screen space'
which is in the middle of the screen in that 800x600 box
@delicate lotus there are these commands playMission playScriptedMission hostMission and i think there's a load of commands related to singleplayer campaigns, but i've no experience with any of these.
playMission is used in the main menu to open the Arsenal mission
So you could add a button to the main menu and use playMission inside the onButtonClick event to start some kind of mission put into an addon.
that's only good for single player missions though right? you still can't make a button that says "connect to ip x.x.x.x.x.x" ?
SP only from what I can tell and from how it's used.
if you have six octets in an IP address I think you're having some very serious issues to begin with. π
xD
48
Works great, thanks! You made me not have to pull my eyeballs out. π @vapid frigate @halcyon crypt Cheers guys!
π
Is there a list or a way to get all predefined variants of all dynamicLoadOut vehicles? I mean the presets like CAS or AT, Heavy AT that can be selected in the Editor. Like "variant_buzzardCAS" or "variant_buzzardAA"
I tried changing the side of the new Sentinel UAV to EAST but it didn't work. Is there a way by script to do this?
Does anyone have an example of 'setPylonLoadout'?
i don't know who wrote in the parameters for it but
To put it bluntly, the page isn't well-written
The page is written using the documentation I had.. Which was everything that is in the Game.
For better Documentation we need a dev to add it. Without me there probably wouldn't even be any wiki page about that command
Are there any examples floating around yet?
Haven't seen any
I want to have a wipeout with 13 GAU-8s is what i'm getting at
There is a new Loadout wiki page that explains some stuff.. Don't have link right now
Wait a sec. So they did get dynamic loadouts into stable now?
Does it work with anything in CfgMagazines or just things prefaced with pylons @tough abyss
@subtle ore yes
Shouldn't there be a seperate class for dynamic loadout variants of planes? I'm not seeing any for the wipeout?
Wow well that was confusing, since in the dev branch it was labeled (Dynamic Loadout) in the editor listings
Yeah, I guess since they made the dynamic loadout variant the only one available in the editor, they thought having "(Dynamic Loadout)" was unnecessary. If you hover over one of the planes/helicopters in the editor, you will see the classname has dynamicloadout in it
Yep yep, I see it.
Can I get some second pair of eyes on this? Didn't get much sleep lol. (getArray(configFile >> "CfgWorlds" >> worldName >> "centerPos")) nearRoads (getNumber(configFile >> "CfgWorlds" >> worldName >> "mapSize"));
"Error: zero elements provided, 3 expected"
sigh nevermind. For those who didn't see it either. centerPos should be centerPosition since the position has 3 int entries in the array.
centerPosition in the config isn't necessarily the actual center of the map
you're best off using mapSize / 2 @subtle ore
sorry, worldSize
@rancid ruin I'm not too worried about accuracy in this case
alright
i'm not sure you can even rely on it being in a map's cfg though so maybe worth bearing that in mind
@subtle ore
_worldSize = worldSize/2;
_allRoads = [_worldSize,_worldSize] nearRoads _worldSize;
I understand the usefulness of worldsize now and it has been posted twice now. I was looking to quickly test something, no more.
@rancid ruin I don't rely soley on a map's cfg. It is however, nto a hit or miss.
Is the only way to override BIS functions through mods?
why would you want to override BIS functions?
What happens if you try to override it in a mission?
I just wanted to know if its possible without mods because I saw someone do it with a mod to try and change the isDebugConsoleAllowed function
I tried doing it in a mission but didnt work very well
not very well, but it did work a bit?
I cant even remember what error I got, ill have to try it again to see
Many bi functions use other files than just that single sqf. Maybe you were missing something
What's the isDebugConsoleAllowed function by the way? I can't seem to find anything like that.
@split coral Its a BIS function used by the debug console which runs a few checks whether a player can use the debug console or not
Any idea why this is not working? How do you override them? @tough abyss
class BIS_Override {
tag = "BIS";
class Debug
{
file = "core\";
class isDebugConsoleAllowed {};
};
};
Well thats pretty much what I just did above, but it doesnt work, no errors
@tough abyss Are you able to give me an example CfgFunctions for it? Cause ive tried doing it how you said and the example above, no errors, it just doesnt override the function and uses the original
Aight when you can, just @ tag me in ill be on for a while
Ill give it a go doing it like that. Hopefully it will work in a vanilla mission (non-modded). Ill let you know how I go shortly
@Quiksiler Ah yeah fuck wont work on a vanilla mission then, oh well, I guess ill just have to make a custom debug console lol
Whats different from a RscListNBox over a RscListBox? I cant even tell the difference
I seem to be having trouble with the GUI Editor, when I position everything in a menu in the editor, export it, and make it into a proper menu, the positions are all off and different from the GUI editor. Any ideas why this is happening?
This is through using GUI_GRID btw
Ah yep, I see cheers
Now im just unsure of why im having issues with this GUI_GRID shit. I dont know if I should just use safeZone instead
I want to show some values on a players screen. how can I do that in a good looking way? (Like Altis life does it with the bar at the bottom)
So would I be better off using safeZones for menu creation or GUI_GRID?
@warm gorge That's personal choice to be honst. I always prefer safezone as I am using this for years now. But there are some difficulties if you want to use them aswell. If you change the sizeEx (text size) for example, this is still saved in GUI_GRID format.
Maybe I should add that I am an A2 guy and GUI_GRID is not even working there :D
@vivid locust Yeah safezones seem to be working better with larger menus. But was just curious what most people use nowadays
Bit confusing how GUI grids work, im not sure if theres any disadvantage over using safe zones for example
GUI_GRID does not use pixel accurate coordinates like the safezone does. This is affected by interface size so the user has the ability to scale this on the screen.
I think the most easy way to understand that is an example. So let's say you make a player menu with safezones. When users use a different resolution and interface size than you, the menu should still look the same. When using gui grid, it gets stretched to the other format. Like when you create it on a 16:9 screen it will have more height when using a 16:10 screen while with safezone it will have the same height.
Do you reckon that might become an issue though? For people with smaller monitors for example for menus using safe zone. I dont want it to get wacky on different screen sizes
When I say that it stays the same size that doesn't mean that it will overlap the borders of a smaller screen when filling up a whole 16:9 screen. It's scaled down aswell but while GUI_GRID stretches the menu, safezone will keep it in the same proportion. As I said, never used something else than safezone and never had problems with it.
imho: safeZone = π
Alright cheers for the advice boys, ill probs just use safe zone to avoid the issues im having with gui_grid
Safes you from Headaches.
Neither safezone nor GUI_GrID are pixel accurate and why would you even care if they are?
π€¦
And even if GUI_GRID doesn't exist in A2, you could easily copy paste the like 8 lines to define them.
you could use it with pixel accuracy when combined with getResolution, but yeah not sure why you'd want to
Im not too concerned about pixel accuracy, just as long as it works for all different sized menus (I know GUI_GRID is limited) and doesn't have any major flaws
You are talking about the InterfaceSize, right?
Hello, i've got a question, what code line have to to put in the sentinelle to have the wings folded??
Does someone know how many elements a turretPath can have?
https://community.bistudio.com/wiki/removeMagazinesTurret
Depends on how deep you nest the sub turrets.
So.. there is no real limit?
No, but since even 1 nested turrets are partially broken, stuff probably no longer works after a few layers
e.g. commander smoke or [0,1] turret reloading and then firing causing the gunner weapon selection to break
Ehu, did some one know a complete tutorial to learn sqf??
complete is a strong word
Can I change the livery of a vehicle by script? I want the Gryphon to be gray.
looking for some help with eular/quaternions/ direction -> rotation conversions. Please PM me β€
runs away
the problem im trying to, im 100% many people will find it helpful :P
scripting a way add objects into EDEN but be able to turn the vectorDir/vectorUp into EDEN rotation. Im sure others have wanted to stick "boxes" into EDEN and turn them up-side down...
or add old "sqf added" map content into an eden mission
and then edit it
i need to find someone who has done this shit at uni or something lol
its degrees of rotation about the separate XYZ axes right?
the only actual info i have (from an "inside" source) is this:
"Local rotation in degrees. X is pitch, Y is roll and Z is yaw.
Euler as X>Z>Y CCW RH"
https://en.wikipedia.org/wiki/Euler_angles
Z = vectorUp _obj
Y = vectorDir _obj
X = vectorNormalized((vectorDir _obj) vectorCrossProduct (vectorUp _obj))
thats what i can tell you at least
you can also execute this in your 3DEN debug console
removeMissionEventHandler ["Draw3D",missionNamespace getVariable ["drawHandler",-1]];
drawHandler = addMissionEventHandler ["Draw3D", {
{
comment "LINES";
drawLine3D [_x modelToWorld [0,0,0], _x modelToWorld (vectorDir _x), [0,1,0,1]];
drawLine3D [_x modelToWorld [0,0,0], _x modelToWorld (vectorUp _x), [0,0,1,1]];
drawLine3D [_x modelToWorld [0,0,0], _x modelToWorld vectorNormalized((vectorDir _x) vectorCrossProduct (vectorUp _x)), [1,0,0,1]];
} forEach (all3DENEntities select 0);
}];
and itll draw the rotated axes
apparently also N = vectorNormalized(Z vectorCrossproduct [0,0,1])
No quaternions? π
quaternions, of course, are satanic constructs
I faintly remember some mention of using quaternions for Eden, but that might just be in the engine
really anything that involves 3D graphics uses them in the background
physics that study rotations too
You can find alpha, beta and gamma using the wiki and those XYZ vectors but i havent checked if theyre the same as the 3den rotation values
Found what I was thinking of
https://youtu.be/TlOOrIJHSXo?t=3m24s
One of the more significant technological challenges was the object rotation. This was mainly because the engine uses matrices and quaternions to represent rotation, while the user needs to be able to set every object in an angle.
if you want to see quaternions causing a lot of pain, just google "unity + quaternion"
ive tried using both quaternions and direction cosine matrix's. i just dont seem to be able to get consistent results
@vivid locust SizeEx problems can be solved with multiplying it by safezoneH. @warm gorge I would suggest safezones since that is the easiest to get it to work on all different resolutions.
However, pixelGrid has been introduced a while back and that honestly seems like a better option than safezones. I still use safezones though.
Would be nice however if Bohemia adds PixelGrid to GUI Editor.
@rotund cypress Havn't had any issues with sizeex yet, why are you saying hat
I was referring to If you change the sizeEx (text size) for example, this is still saved in GUI_GRID format.
GUI_Grid would mean it's not accurate over different resolutions, however this can be solved with multiplying by safezoneH
And if pixel accuracy is wanted, as @little eagle said, safezone or GUI_grid is not it. PixelGrid is however.
Does anyone know where i can find the functions for: BIS_fnc_EGSpectator?
GUI_GRID is just as accurate over different resolutions as safezone is. π
@rotund cypress That's not a solution. Let me give you an example. If you use the GUI editor in arma 3 and you enter 1.5 for the sizeEx in the editor, then the dialog class will look like sizeEx = 1.5 * GUI_GRID;
You can't just replace * GUI_GRID with * safezoneH, as 1 is already the whole screen so 1.5*safezoneH is already one and a half of your screen and way bigger than you wanted it. I calculated the value to convert GUI_GRID to safezone and that's how I am doing it.
Well that needs getResolution I think @little eagle
GUI GRID needs as much getResolution as safezone does
getVectorDirAndUpFromAngles = {
params ["_x", "_y", "_z"];
_vectorDir_x = cos (_y) * sin (_z);
_vectorDir_y = (sin (_x) * sin (_y) * sin (_z)) + (cos (_x) * cos (_z));
_vectorDir_z = (cos (_x) * sin (_y) * sin (_z)) - (sin (_x) * cos (_z));
_vectorUp_x = -sin (_y);
_vectorUp_y = sin (_x) * cos (_y);
_vectorUp_z = cos (_x) * cos (_y);
[[_vectorDir_x, _vectorDir_y, _vectorDir_z], [_vectorUp_x, _vectorUp_y, _vectorUp_z]]
};
_dirAndUp = [0, 21, 42] call getVectorDirAndUpFromAngles;
@brazen sparrow The code posted above should work for X, Y, and Z rotation from Eden converted to the format for setVectorDirAndUp. I think you want to go from setVectorDirAndUp to Eden rotation, but it's a little too late in the night for me to solve for those terms
@rotund cypress @little eagle The only reason I wanted to know if safezone was a decent option over GUI_GRID is because I was having issues with GUI_GRID and the GUI editor positioning being all messed up when I turn the exported dialog into a proper dialog
@warm gorge you might want to test ArmA-UI-Editor if it is a new ui
Could be useful
This a new thing? @queen cargo
nope
pretty old, outdated kinda (as i stopped working on it in favor of ArmA.Studio)
Oh is that the Windows client? @queen cargo
Ah yes, actually used that a while back, but never got into it.
I have a question about scripting: Is there a way to detect if the player is still in a loading screen?
because I want to have a intro in my mission but the intro should only start if youre not longer in the loading screen
Also the mission is a MP Mission
waitUntil {isNull (findDisplay 46)} @delicate lotus
okay
A long time ago I found a BIS function whhich could detect that too
but I forgot its name
I hope that will work the same ^^
Why use a function when you can just do that? π€
I will use that
but I still cant get searching for that function out of my mind ^^
I'm not sure I follow
well I know there is a BIS function which does the same but I cant remember its name. And that is really bugging me for some reason
π
@rotund cypress I used the code you gave me and its working but apprently there is a second loading screen after the first one?
or atleast is not working right
I still see the loading screen
like I see the loading screen, it finishes, reopens and plays the intro music
but display 46 is objNull
Intro music must be something in your mission
There is only one mission loading screen in arma
Which shows the mission splash image as well
well its not the intro
its the loading screen
in my game its still there will its not existing
display 46 is the game ui, so wouldn't u want to waitUntil { !isNull ?
i think this might be what you're after https://community.bistudio.com/wiki/onPreloadFinished
wow thank you
I think that was the function im searching for all days
holy duck
it works
@vapid frigate thank you very much ^^ ^^ ^^
np
i learned it from Sa-Matra in here.. found it from the search history from last time i asked
okay
I always searched for "load" in the Community wiki. Bad thing it only shows things starting with "load" :/
K
Hey folks, may you can help me out. I use Eden editor and ItΒ΄s MP testmode to test with some friends jets and stuff. Is there a way to bring a server sided earplugs script into this Ad-hoc like Server?
your client is the server
i have a question regarding the "Jets_Officerspilling" animation. how do i give the NPC a cup to drink at? unless its automatically given a cup now that its released? tried it the last time on dev-branch but the NPC just does the animation without a cup on his hand
Tweaked: Precision of the intersectWithGround command was improved
intersectWithGround <- ???
does pretty much what it says?
Mr. Smartass, have you seen the command in the wiki?
i thought it was, i've used it
lineIntersectSurface maybe
No clue, i just never heard of the intersectWithGround before.
i guess they need a patch for the patch notes
Yeah ive never seen that command before either
Is addMissionEventHandler global or local?
local
so if I add the event only on the server side, things like incrementing a value would be local too right?
yep
There's no intersectWithGround on the wiki.
okay
Thats the point, Neviothr.
Any clue what that is, <@&105622502444711936>?
intersectWithGround doesn't exist.
Not on the Wiki not in the Game.. To me that sounds like terrainIntersects
maybe intersectWithGround is their internal function name
Nope.. intersectWithGround is a internal engine function. For example used for screenToWorld and a lot of collision stuff
good to know.
is there a way to get the name of a vehicle? Like from a blackfoot the name blackfoot?
getText(configFile >> "cfgVehicles" >> typeOf _myVehicle >> displayName")";
thanks ^^
is anyone interested in a tool to remove required addons in a eden mission.sqm (unbinned)?
well... couldnt you just remove it on your own using notepad++?
u tried doing that when you have like 50 requirements π
not really
and thats the point where such a tool is handy
are you going to upload it to armaholic or something?
i dunno, if people thought it was useful ye, if not then i wasnt going to bother
well it is useful
Hey guys, I have overwritten the key for interrupt menu and made my own. I now want to add Video Options and Audio Options to it, however using createDialog "RscDisplayOptionsVideo" and createDialog "RscDisplayOptionsAudio" it is not loading the script for it properly. Anyone who have a way I can circumvent this?
@brazen sparrow Yeah I wouldnt mind having a tool like that
ill get it up on github, not going to lie, wrote it fast so, there may be bugs. It creates a backup so :D
its a nodejs thing but i will add an exe version along with it
prob later tonight
ive tested with rediculasly large mission so fingers crossed lol
Sounds good
how do i call a script every 10 +/- 1 minutes with little performance impact?
Through a loop with suspension using sleep
while {true} do {
//
//Do stuff
//
sleep 60; //Sleep for 1 minute
};
*uisleep
Or through uiSleep π Im still in a habbit of using sleep, slowing starting to use uiSleep more often
Is there BIS function list ever going to be updated? I swear it was meant to be updated recently. Its still missing dozens of new functions. https://community.bistudio.com/wiki/Category:Arma_3:_Functions
@warm gorge sleep is actually the way to go unless it is a "time critical" task for eg. user interfaces. then you should use uiSleep as it provides more precision then sleep does.
for pretty much all tasks ohowever, sleep is enough
@warm gorge Make a list of missing functions. And post it in #community_wiki
I already said that before.. People say "There is lots of stuff missing" but no one says what is missing. How should the guys doing the Wiki know what they need to add?
@still forum It would be painful to list every single function that is missing when someone could easily just run BIS_fnc_exportFunctionsToWiki and load the contents on the Wiki. Much easier than individually identifying whats missing. Theres too many for that.
@warm gorge Thanks, thats how i'm doing it, i was just concerned i was wasting perf after reading lots of alternative methods.
Nah there's nothing wrong with doing it that way
@warm gorge give me atleast one example of a missing function please. And also this talk belongs into #community_wiki
Commands != functions @jade abyss
you are boring
i like the docs on this cmd https://community.bistudio.com/wiki/setVelocityTransformation
position1: Number waat?
@still forum All of the EG spectate functions, BIS_fnc_getIntersectionsUnderCursor, BIS_fnc_enginesOn, BIS_fnc_enginesOff, BIS_fnc_radioMusicNext, BIS_fnc_radioMusicOff, BIS_fnc_ambientShips, BIS_fnc_findAllNestedElements, BIS_fnc_advHintFormat. < Just a few examples
I havent gone through every single missing function, but there are definitely a few.
Thx. So it's definetly data missing and not that page being cached to a old version
Yeah. I do remember bringing this up a few weeks ago, I think Dwarden said something like there was going to be a wiki update soon, but I cant confirm
Can I use sleep in OnPlayerRespawn?
Hey fellas
Iim getting so mad with this. Cant find the answer online at all. And i've searched for hours. I have an addaction Teleport script, that works fine until, either caching or respawn takes place in MP. Then it stops working, WHY?... I presume to be the fact that I do not have any event handlers. Or publicVaribles? Is this the cause of such a thing?
Clint/Server not synced?
// name your MHQ or forward deployment vehicle something you want showing up in the player messages
/* just add the following line into your teleporter (flag pole) init
this addAction ["Move to USS Freedom", "teleportMHQ.sqf", USS]; this addAction ["Move to APX HQ", "teleportMHQ.sqf", HQ];
** just remember to name the vehicles you want to telport to MHQ1 MHQ2 ect...
*/
//Place below in flagpole
// this AddAction ["<t color=""#FFED21"">" +"Move to USS Freedom", "teleportUSSFreedom.sqf", respawn_west_2];
_unit = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_teleporTo = _this select 3;
cutText["APX ELITE PILOT's Requires JETS DLC...","BLACK OUT",2]; sleep 2;
if (alive _teleporTo) then
{
_caller moveInCargo _teleporTo;
player vehicleChat format ["You have been deployed at %1", _teleportTo];
} else {
player groupChat format ["Unable to deploy to %1 at this time.", _teleporTo];
};
cutText["","BLACK IN",3];
^^^ WORKS FINE...untl the game somehow Changes its varible name or something?
it stops working?
10 minutes into the game. the addaction at the flagpole fails...and cant find the "OBJECT" anymore?
if (canSuspend) then {sleep 10}; π
Objects don't lose their variable name when a player respawns.
to rephrase my cut n paste error: WHY would an addaction (a teleport script) <Using a vehicle [MoveInCargo]> all of a sudden stop working in a MP dedictaed environment? 5 to 10 minutes into the game. When its never destroyed?
Script =
_unit = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_teleporTo = _this select 3;
cutText["APX ELITE PILOT's Requires JETS DLC...","BLACK OUT",2]; sleep 2;
if (alive _teleporTo) then
{
_caller moveInCargo _teleporTo;
player vehicleChat format ["You have been deployed at %1", _teleportTo];
} else {
player groupChat format ["Unable to deploy to %1 at this time.", _teleporTo];
};
cutText["","BLACK IN",3];
this allowDamage false; this AddAction ["<t color=""#FFED21"">" +"APX ELITE PILOTS: Move to USS Freedom", "teleportUSSFreedom.sqf", USS];
USS is variable name of the vehicle
Do certain conditions in MP cause things to get renamed somehow?
@little eagle so if I have a addaction on a player, and that player respawns, has it still the addAction?
No, iirc. They don't carry over to the respawned entity unlike eventhandlers iirc.
But this is about an action added to a vehicle.
Do certain conditions in MP cause things to get renamed somehow?
No
_unit reveal mob;
_unit assignAsCargo mob;
_unit moveInCargo mob;
_unit allowDamage false;
sleep 10;
_unit allowDamage true;
_unit addAction ["Refuel - Rearm - Repair (2500$)","refuelrearm.sqf",nil,6,false,true,"","cash>=2500 and (vehicle player) != player",-1];
will this add the action again? (its written in OnPlayerRespawn)
further how'd u paste ur code into that textbox ?
in discord?
mine just shows up as text
```sqf
code here
```
hi what dose worldId mean ?
World ID?
Altis, Stratis, VR
?
so like an example of my problem commy2: When u assign an insignia to a unit....and the unit respawns (via your own custom .paa) the patch is gone
even though its defined in description.ext
cfg
_setUnitInsignia
call BIS_function__setUnitInsignia
? is that for me lol
^not typed right but u get the idea
if that is for worldId i have no idea
kk
Yeah, insignia don't carry over to a respawned unit, because the whole insignia system is build on retexturing. And respawned units don't keep their textures.
Unless they added a work around for that. I never use insignia.
Don't think so.
So I just noticed testing locally, if a unit has enablesimulation false and dies, the corpsemanager does not delete the unit from array alldead. after doing enablesimulation true on the corpse it does sink the bodies underground but still not deleted from array alldead.
I wonder how this would behave on dedicated server...
how do i get the carrier to resupply my jet/planes when they land on it
is there a way to add additional custom edits to menu when you double click an object in Eden editor? Object: type, Object: init, etc.
awesome ty. always tough for me to put thoughts to word for searching. much appreciated
if({group _x side == east} count allUnits < (count allPlayers*10)) then {
_bool = true;
} else {
_bool = false;
};
will this work?
i just ran it and got "generic error"
_bool = ({side group _x == east} count allUnits < (count allPlayers*10))
Has anyone tried drawing icons/hooking into the GPS or custom info minimap since 1.70? I've attempted to do so but been unsuccessful. From what I can tell the display is 311, and the ctrl is 101, so I tried this
_ctrl = (findDisplay 311) displayCtrl 101;
_ctrl ctrlAddEventHandler ["Draw", {systemChat format ["frame: %1, this: %2", diag_frameNo, _this];
I'm not even sure if that ctrl is correct and being loaded though
is KK's url_fetch DLL still the only way to HTTP? or is there something in A3/CBA to use?
what I cant draw on atm is artillery computer
htmlLoad is also a way to HTTP
cheers Ded!
There are many ways to HTTP. But this is my way.
I think so yeah πͺ
No... Don't see a reason why you would send a request to a remote webserver.. just to get a message to a different program on the same computer ^^
If you need to communicate with something external then Extensions are almost always the best way
Have you tried the GPS thing on this patch? I tried what you posted and that didn't work
Any idea why I cant get the scroll bar working of a RscControlsGroup with a RscStructuredText inside? Ive set it up properly from what I can see
So ive got it working a bit, I had to increase the height/size of the RscStructuredText. Not sure why I have to do that though I thought it automatically sizes
So since 1.70 I can no longer open the debug console from my menu (a dialog) on BIS' showcase (and other community made) missions. I'd open the dialog using a bind I've created with CBA_fnc_addKeybind, and will press the button that opens the debug console action = "closeDialog 0; createDialog ""RscDisplayDebugPublic""";, though the only thing that happens is that the game is paused a cursor appears.
There's nothing out of the ordinary in the RPT. Any clue why is this happening?
Are you sure the key is still bound? A couple of my keybindings are gone too after the update.
@tough abyss This is because of the security changes that were made to the debug console. You now must be a logged in admin to access it unless you have it set for everyone to use in your mission description.ext. The only workaround to this is to make your own custom debug console dialog, which is what I did and just edit the scripts behind it.
If you need any help just let me know.
I'm looking for the script commands to get and set the new dynamic loadouts and appearance settings like camo and fold wings. BIS' respawn module does not remember these settings when respawning vehicles.
It's bugged in local hosted server Eden Editor. You can't open the debug console there either.
Ok, thanks @warm gorge.
Is there a function to set if units should leave the vehicle when attacked or immobilized?
I know there was one
and again, I cant remember the name
https://community.bistudio.com/wiki/setCombatMode
Is this what you are looking for?
@untold gazelle no not combat mode
it was a function with two params
one was for transport to auto unload when attacked
and the other one for immoblized
The search function in the BI Community wiki is really cancer
np
now I have another question, how can I get all cargo places for units? or atleast all vehicle seats.
_positions = (_vehicle emptyPositions "cargo");
thank you
And the other ones:
_vehicle emptyPositions "Gunner";
_vehicle emptyPositions "Driver";
_vehicle emptyPositions "Commander";
will a vehicle unload its transport even when the transport is the same group?
I believe so yes
Im working right now with pylon settings and I am trying to give the CSAT Orca two miniguns instead of a rocket launcher. Will that work? And is the AI able to use it?
I want to use _result = [_veh, _textures, _animations] call BIS_fnc_initVehicle; to copy one vehicle's look to a different vehicle (like camo type). I can't find a function to get the original vehicle's init though. Any idea's?
well couldnt you just copy the "color" variable?
as far as I know, camo is in the color variable too
When you disable randomization you can set color using _vehicle setVariable ["color",X]. So I assume you can get the current color using _vehicle getVariable "color";
I'm afraid not.
For a jet with a camo pattern and folded wings the code looks like this:
[
_veh,
["DarkGreyCamo",1],
["wing_fold_l",1,"wing_fold_r",1,"wing_fold_cover_l",1,"wing_fold_cover_r",1]
] call BIS_fnc_initVehicle;
But I can't find a command to get the vehicle's textures and animation states.
mmh
I just spawned an orca with changed pylons with this code:
_veh = createVehicle ["O_Heli_Light_02_dynamicLoadout_F",_position,[], 5,"FLY"];
_vehicle = _veh;
private _pylons = ["PylonWeapon_300Rnd_20mm_shells","PylonWeapon_300Rnd_20mm_shells"];
private _pylonPaths = (configProperties [configFile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]) apply {getArray (_x >> "turret")};
private _nonPylonWeapons = [];
{ _nonPylonWeapons append getArray (_x >> "weapons") } forEach ([_vehicle, configNull] call BIS_fnc_getTurrets);
{ _vehicle removeWeaponGlobal _x } forEach ((weapons _vehicle) - _nonPylonWeapons);
{ _vehicle setPylonLoadOut [_forEachIndex + 1, _x, true, _pylonPaths select _forEachIndex] } forEach _pylons;
_veh engineOn true;
_grp = createGroup [east,true];
_grp createUnit ["O_T_Helipilot_F",_position,[],2,"NONE"];
_grp createUnit ["O_T_Helipilot_F",_position,[],2,"NONE"];
_grp setCombatMode "RED";
_veh setUnloadInCombat [true, false];
{_x moveInAny _veh;}forEach units _grp;
broadway sideChat "We have a Orca on our radar. Prepare yourself for its attack!";```
The result is a bit handicapped. Cuz the chopper is almost infinitly flying upwards. With almost I mean, after sometime it stopped flying upwards like crazy.
Why is that so?
hey guys, I would love to get rma to tell me list of all available maps in my modpack. We are deleting and adding map mods quite regularly and I would like dynamicly generated list. I need it to create .pbo file for each map so I would need the missionname.mapname.pbo ...
Could you point me to right direction ?
so you want a app which randomly grabs missions from a folder and puts it into the server mission folder?
Nope, I have that script, I just need list of mapnames which are available in my modpack right now.
Yup, i just want to run SQF script that returns all map names
And some small handy script to list them all for my dividid by line bereak @indigo snow ?
Also that odesnt looks like are the same mapnames that are use in missionnme.mapname.pbo....
I take that back they are the same names...
So at least some function that could traverse that cfg ?
_worlds = "true" configClasses (configFile >> "cfgWorlds");
call fn_Something;
hint "Inside";
}];
player addEventHandler ["GetOutMan",{
removeAllActions player;
hint "Outside";
}];```
is there anything wrong with calling that client side in SQF/
thats odd. that shit wont hint anything when going in a vehicle
script is executed via execVM. will try hint before call
Got the thing btw, if anybody wants it...
"getText(_x >> 'skyObject') == 'A3\Map_Stratis\data\obloha.p3d' " configClasses (configFile >> "CfgWorlds");
Still full of junk, but at least they are all maps...
@tough abyss use var = compileFinal preProcessFileLineNumbers "path\to\your\file"; instead of execVM
then remoteExec["var"];
@tough abyss will try
ππΏ
Has anyone here had any success working with the arma 3 weather system? I cant help but experience issues with transition times for weather related commands not being accurate
You have to enable "manual overwrite" in rain/wind/overcast etc.
How do you mean by that?
using the weather command when these are disabled, which they are by default, causes the weather ti bug out. E.g. extreme winds changing every second.
There is a option in Eden to disable them.
Well "enable" the "manual overwrite" of all of those. Internally it's the other way around. You disable "auto wind", "auto rain" etc.
Alright ill give that a go. The issues ive been having is the weather commands wouldnt actually take how long you specify to transition. For example 60 setOvercast 1 wouldn't actually transition over 60 seconds. Same with the other weather commands as well. After some research I found many people who have put up feedback tracker issues claiming it as a bug, so wasn't sure if anyone knew anything about it
Yes, the weather commands are riddled with bugs and I can't remember all the details.
Are there any workarounds for the setOvercast issues? Other than through using forceWeatherChange. I saw a few people use skipTime 24 and then skipTime -24 alongside setOvercast, but I couldnt imagine that being a very good option
object lock true; if executed on client doesnt seem to work. I can still jump out of my vehicle
It has to be executed on the "object"'s machine, not the players machine.
yw
Looking for a function that grabs the information from a vehicle to be used in BIS_fnc_initVehicle. Basically almost the same output you get from clicking export in the vehicle appearance screen.
Have you tried looking at how the arsenal/garage does it?
No, is it possible to see the script that creates the export?
They use bis_fnc_exportVehicle and some other voodoo
///////////////////////////////////////////////////////////////////////////////////////////
case "buttonExport": {
_display = _this select 0;
_exportMode = _this select 1;
_center = (missionnamespace getvariable ["BIS_fnc_arsenal_center",player]);
_centerType = "";
_br = tostring [13,10];
_export = "";
if (_exportMode == "init" && !is3den) then {
//--- Get all classes using the model
_export = "comment ""Related vehicle classes:"";" + _br;
_data = missionnamespace getvariable "bis_fnc_garage_data";
_modelData = [];
_currentTextures = getobjecttextures _center;//_center getvariable ["bis_fnc_initVehicle_textures",[]];
{_currentTextures set [_foreachindex,tolower _x];} foreach _currentTextures;
{
_items = _x;
_ctrlList = _display displayctrl (IDC_RSCDISPLAYARSENAL_LIST + _foreachindex);
if (lbcursel _ctrlList >= 0) then {
_i = _ctrlList lbvalue lbcursel _ctrlList;
_modelData = _items select (_i + 1);
{
_export = _export + format ["comment ""%1"";" + _br,configname _x];
if (_centerType == "") then {
_textureList = getarray (_x >> "textureList");
for "_i" from 0 to (count _textureList - 1) step 2 do {
_textureSource = _textureList select _i;
_textures = getarray (_x >> "textureSources" >> _textureSource >> "textures");
_selected = true;
{if ((tolower _x) find (_currentTextures select _foreachindex) < 0) exitwith {_selected = false;};} foreach _textures; //--- First backslash may vary
if (_selected) then {_centerType = configname _x;};
};
};
} foreach _modelData;
};
} foreach _data;
_export = _export + _br;
if (count _modelData == 1) then {
_export = "";
};
};
if (_centerType == "") then {_centerType = typeof _center;};
_export = _export + ([_center,_centerType] call bis_fnc_exportVehicle);
_export spawn {copytoclipboard _this;};
['showMessage',[_display,localize "STR_a3_RscDisplayArsenal_message_clipboard"]] call bis_fnc_arsenal;
};
can't find this function on their bis functions page. is this from the config viewer?
"C:\Arma 3\Mark\Addons\functions_f_mark\a3\functions_f_mark\Vehicles\fn_garage.sqf"
Thanks, will give that a go
_export = [_vehicle] call BIS_fnc_saveVehicle; _animations = (_export select 1); _textures = (_export select 2); _result = [_vehicle, _textures, _animations] call BIS_fnc_initVehicle;
Using this now. works for the animations but not the textures. Doing some more digging π
@warm gorge https://community.bistudio.com/wiki/BIS_fnc_getIntersectionsUnderCursor
BIS fnc enginesOn, BIS_fnc_enginesOff, BIS_fnc_radioMusicNext apparently wasn't exported by BIS_fnc_exportFunctionsToWiki
I'll do an additonal run and try to get the missing rest
enginesOn and enginesOff are script files.. But no functions. You couldn't call them ingame if you wanted to. They are also not listed in the Ingame functions viewer... They are not missing from the WIki. They don't exist.
Uhh new stuff https://community.bistudio.com/wiki/BIS_fnc_PlaneEjection
https://community.bistudio.com/wiki?title=Category:Function_Group:_AircraftCarrier
Is it possible to move only some ctrls of a dialog when movingEnabled is set to true?
No, the whole display moves.
Hey guys, quick question, command utils in debug console is a scripting command right? As in I can use it outside debug console?
It's not listed on BI wiki soo
Doesn't look like it's a script command. They have some special handling for it
Some snippets from a3\ui_f\scripts\GUI\RscDebugConsole.sqf
#define UTILITIES_KEYWORD "utils"
...
_input = ctrlText _input;
//--- Utilities keyword: utils or utils <number>
private _args = "";
private _len = count UTILITIES_KEYWORD;
if (
_input select [0, _len] == UTILITIES_KEYWORD
&&
{
_args = _input select [_len] splitString " " joinString "";
_args isEqualTo "" || {"0123456789" find (_args select [0, 1]) > -1}
}
)
exitWith
{
parseNumber _args execVM "\A3\Functions_F\Debug\Utilities\lib\index.sqf";
};
omg who wrote this π€¦
lol
Question, when using controlsGroupNoScrollBars, do I need to use ctrlSetFocus or am I doing something else that is causing that I cannot press everything?
dead simple question I think but I just know the c# approach. Inside a if statement I have a local variable with _nameOfVar thats only valid within the if scope. I tried to declare it first outside of the if statement with _nameOfVar =""; but that wasn't working. In c# I also have the var keyword or const is there something on sqf?
No specific but thats my approach.
_coolObj = "";
if (_bla isEqualTo "Bla") then {
_coolObj="Nice"
} else
{
_coolObj="Noooo!"
};
// do something here with _coolObj returns in a undefinied variable
so after I set the variable in the if snippet its not gonna get applied to the variable. I think I just need to work with private varName I think
That will work
and yes
make top one private
also make sure you are using ;
_coolObj="Noooo!" -> _coolObj="Noooo!"; @hollow lantern
I know but just for that example it wasn't needed π
its because of the ifs, that it wasnt needed
No need to have the semi colon there π
@rotund cypress thats not 100% true π If I would have another code below the line I still would need the semicolon regardless of the if π
well ye π€£
I mean
if (true) then {"true"} else {"false"};
Would not have semi colon
If (true) then {
"true";
} else {
"false";
};
Thats my style
not that they re needed
but I add them anyways
well we live in a world where we don't stingy with bytes so just keep 'em π
^
ah but now I got a real "error" with this.
// _null = [Freedom, KI_plane02,"Catapult3"] execVM "scripts\ki_launch.sqf"
params["_carrier","_plane", "_catapult"];
private ["_carrierObj"];
if (_catapult isEqualTo "Catapult1" or _catapult isEqualTo "Catapult2") then
{
_carrierObj = "Land_Carrier_01_hull_04_F";
}
else
{
_carrierObj = "Land_Carrier_01_hull_07_F";
};
_carrierPartCfgCatapult = configfile >> "CfgVehicles" >> _carrierObj >> "Catapults" >> _catapult; ``` The _carrierObj should be setted like _catapult in the _carrierPartCfgCatapult but thats not working?! What am I doing wrong? _catapult works maybe because its directly getting transfered as "Catapult3"? hmmm
My brain can't process this.
A bit cleaned up ```sqf
// _null = [Freedom, KI_plane02,"Catapult3"] execVM "scripts\ki_launch.sqf"
params ["_carrier", "_plane", "_catapult"];
private _carrierObj = if (_catapult isEqualTo "Catapult1" || {_catapult isEqualTo "Catapult2"}) then {
"Land_Carrier_01_hull_04_F";
} else {
"Land_Carrier_01_hull_07_F";
};
private _carrierPartCfgCatapult = configfile >> "CfgVehicles" >> _carrierObj >> "Catapults" >> _catapult;
dont use private in array
much slower than just privatizing variable directly
What is your actual problem?
Not getting the config from class Catapults with configname land_carrier...?
if I do it directly it works but when I want to dynamiclly set the configname over a variable (_carrierObj) it wont work for me
oh god its tooooo late for me lol
your code above btw tells me generic error in expression π
The code above and the original code don't do anything.
So no wonder nothing happens.
its not the full code but part from it
I suggest posting the full code
well my style is fucked up but...
/*
author: @Aebian
description: Launch script for AI catapult start from USS Freedom
returns: nothing
created: 2017-05-02
// _null = [Freedom, KI_plane02,"Catapult3"] execVM "scripts\ki_launch.sqf"
*/
params["_carrier","_plane", "_catapult"];
private _carrierObj = if (_catapult isEqualTo "Catapult1" or _catapult isEqualTo "Catapult2") then
{
_carrierObj = "Land_Carrier_01_hull_04_F";
} else
{
_carrierObj = "Land_Carrier_01_hull_07_F";
};
(driver _plane) disableAI "MOVE";
sleep 10;
_carrierObjects = _carrier nearObjects [_carrierObj, 40];
_CarrierPart = _carrierObjects param [0, objNull];
_carrierPartCfgCatapult = configfile >> "CfgVehicles" >> _carrierObj >> "Catapults" >> _catapult;
_CarrierPartanimations = getArray (_carrierPartCfgCatapult >> "animations");
[_CarrierPart, _CarrierPartanimations, 10] spawn BIS_fnc_Carrier01AnimateDeflectors;
sleep 14;
_plane engineOn true;
[_plane] call BIS_fnc_AircraftCatapultLaunch;
sleep 5;
(driver _plane) enableAI "MOVE";
sleep 4;
[_CarrierPart, _CarrierPartanimations, 0] spawn BIS_fnc_Carrier01AnimateDeflectors;```
oh lol
wait scratch that lol
ok and what is not working?
_carrierObj = "Land_Carrier_01_hull_04_F";```?
No wonder you are getting a generic error in expression
Yeah, you made a mess.
the part with _carrierPartCfgCatapult = configfile >> "CfgVehicles" >> _carrierObj >> "Catapults" >> _catapult; I'm only able to set the part via _carrierPartCfgCatapult = configfile >> "CfgVehicles" >> "Land_Carrier_01_hull_04_F" >> "Catapults" >> _catapult; directly
but I want to set it dynamiclly
and it should work because it worked with my passed _catapult string
This is how I would do that if-block:
private _carrierObj = "Land_Carrier_01_hull_07_F";
if (_catapult in ["Catapult1", "Catapult2"]) then {
_carrierObj = "Land_Carrier_01_hull_04_F";
};
idk, that seems most logical to me
ye ^ π
Although naming a variable that holds a classname xObj is weird. Classnames are not objects.
well the blast deflector does not getting animate. if I replace the _carrierObj with the actual classname with strings "Land_Carrier_01_hull_07_F" it works, weird
U wot
Well if _catapult is either Catapult1 or Catapult2, then _carrierObj will be Land_Carrier_01_hull_04_F and not Land_Carrier_01_hull_07_F.
yeah thats right
but it doesn't work either for the catapults
because I did _null = [Freedom, KI_plane05,"Catapult1"] execVM "scripts\ki_launch.sqf";
and thats clearly catapult 1 but the blast deflector is not getting animate. But doing it manually by replacing the variable in the command with "Land_Carrier_01_hull_04_F" works. @rotund cypress Instead of doing sqf carrierPartCfgCatapult = configfile >> "CfgVehicles" >> _carrierObj >> "Catapults" >> _catapult;
this works:
carrierPartCfgCatapult = configfile >> "CfgVehicles" >> "Land_Carrier_01_hull_04_F" >> "Catapults" >> _catapult;```
You're doing something wrong. Add some diag_log to check what values the variables take in the critical parts of the script.
Or #UseADebugger
it's not just that 40m isn't big enough?
I wouldn't trust a debugger written by people that can't even spell the name of the game
I wrote the debugger and I know how to spell it ^^
π
It is spelled D-E-B-U-G
I'm purposefully confrontational, because contentedness makes fat and lazy.
diburg?
I'm using diag_log and hints to display debug info. i was wondering if there is an easy way to display lots of debug info on the screen permanently and have it updated at a reasonable rate? like, a bigger hint box which isn't the hint box.
you can make your own display to do it
anyone know if you can preprocess #defines etc in the debug console? or you have to use 'preprocessFile'?
Anybody have the blood.p3d file directory on hand?
or rather, know the classname used for particle sources with blood.
@still forum Nice, good to see those missing functions in π
Hi there, I might need some help please. I'm new to scripting in Arma 3, I programmed in other languages before but I just don't get what's wrong.
I'm trying to spawn a Vehicle (will vary) using an action in an action menu when looking at a Laptop. I'm struggling at the point to set the position and the rotation of the Vehicle as it's supposed to spawn inside a Hangar. This is inside the Init of the Laptop:
_spawnPos = [14321, 16300, 0];
this addAction ["Spawn Darter", {createVehicle ["B_UAV_01_F", "_spawnPos", [], 0, "NONE"]}]
@tough abyss _spawnPos isn't local to the addAction code parameter, you'll need to either use a global variable or define _spawnPos inside the addAction
So either spawnPos = [14321, 16300, 0]; this addAction ["Spawn Darter", {createVehicle ["B_UAV_01_F", spawnPos, [], 0, "NONE"]}] or this addAction ["Spawn Darter", {_spawnPos = [14321, 16300, 0]; createVehicle ["B_UAV_01_F", _spawnPos, [], 0, "NONE"]}]
ummm, Β΄setVariable ["name", value]Β΄ ?
I will add more actions later when this works, spawnposition will not change tho.
The one above where spawnPos is global should be fine then
Yeah
faceplant okay.
'|#|createVehicle ["B_UAV_01_F", "spawnpos",...'
Error 0 Elements defined, 3 expected
There shouldn't be quotation marks around spawnpos there at least
it doesn't error now but it doesn't spawn either.
It might spawn somewhere away from the hangar to avoid collision?
nvm, I may have had an error in the coordinates
You could try changing "NONE" to "CAN_COLLIDE", but then if you plan to spawn other stuff at the same position they'll spawn on top of each other
14321 instead of 14231
worked, awesome
thanks a lot, guess I should take a chrash-tutorial about variable in arma 3
wait, how do I set the rotation?
this addAction ["Spawn Darter", { _spawnedObj = createVehicle ["B_UAV_01_F", spawnPos, [], 0, "NONE"]; _spawnedObj setDir 180 }]
Question, when using controlsGroupNoScrollBars, do I need to use ctrlSetFocus or am I doing something else that is causing that I cannot press everything?
@dim notch Thanks a lot!
_spawnPos = [14321, 16300, 0];
this addAction ["Spawn Darter", { private _thePos = _this select 3 select 0; createVehicle ["B_UAV_01_F", _thePos , [], 0, "NONE"]}, [_spawnPos]];``` you can pass variables into addActions like that too
if, for example, the position was going to be different for multiple actions
oh indeed, but that looks way too complicated
it works, and looks awesome: http://i.imgur.com/qHloKrT.jpg
except they just keep spawning in front and behind each other if I continue pressing the buttons
Might need a if-sentence there, or can I change the "NONE" to something that prevents spawning more while there is already another vehicle?
I added a fourth vehicle and everything exploded.
Hello all, i am Trying to convert this value into an array : ""[""""test""""]""
I entered it into a module I created like so: ["test"] and I saw in my diag_log that is looked something like this ""[""""test""""]""
So maybe I am doing something wrong?
Having a bit of trouble converting these 2 lines to CBA macros ```CPP
onLoad = "[""onLoad"",_this,""BisDisplayDebugPublic"",'GUI'] call SR_fnc_debugConsole";
onUnload = "[""onUnload"",_this,""BisDisplayDebugPublic"",'GUI'] call SR_fnc_debugConsole";
Hmm, how would I go about creating a macro that converts SINGLEQUOTE(someVar) into 'someVar'?
Found a workaround #define SINGLE_QUOTE_GUI_TEXT 'GUI'.
Don't ask.
Shit, doesn't compile.
Help.
Is there any way to make a map native building invincible? allowDamage doesn't seem to work, and I read somewhere that this is intentional.
Any workaround to this? I guess I could remove the building and replace it, making that one invincible with allowDamage false. Unless you mean this objects in view distance issue applies for all occurances of allowDamage?
Alright yeah ill just do that. Cheers
i need help with is trying to figure out why my teleport to MHQ script stops working when the vehicle respaws. It seems as though it is losing its same name or "index"?
HQ addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Alpha", "teleportMHQ.sqf", Ghost_1];
Ghost_1 is the varible name of the chopper
What would cause it to not work anymore after respawning?
the above goes inside an .sqf
which is called on init
the teleport MHQ script is:
_unit = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_teleporTo = _this select 3;
cutText["","BLACK OUT",2]; sleep 2;
if (alive _teleporTo) then
{
_caller moveInCargo _teleporTo;
player vehicleChat format ["You have been deployed at %1", _teleportTo];
} else {
player groupChat format ["Unable to deploy to %1 at this time.", _teleporTo];
};
cutText["","BLACK IN",3];
@tough abyss thanks I'll give that a go!
Hi, I need some help. I want to spawn a Vehicle at a certain position if there is not other vehicle at that position, if yes: remove vehicle, spawn anyways, if no, just spawn. THis is what I got:
spawnpos = [14243.3, 16227.3, 0];
spawnUAV = {
params ["_vehicle"];
nearv = nearestObjects [spawnpos, ["UAV"], 5];
if (count nearv > 0) then {
deleteVehicle nearv select 0;
};
_v = createVehicle [_vehicle, spawnpos, [], 0, "NONE"];
_v setDir 303;
};
unfortunately, at "deleteVehicle nearv..." it says it gets an array while expecting an object, which makes sense.
Any Idea to retrieve the vehicle-object using the element from that array?
@icy mauve ```sqf
deleteVehicle nearv select 0;
to
deleteVehicle (nearv select 0);
Anyone know how to get the first hit pos of a bullet from the Fired event?
@warm gorge nice, works now!
_mhq = [Ghost_A,Ghost_B,Ghost_C,Ghost_D];
params["_HQ","_mhq"];
_hq addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Alpha", "teleportMHQ.sqf", _mhq];
_unit = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_teleporTo = _this select 3;
cutText["","BLACK OUT",2]; sleep 2;
if (alive _teleporTo) then
{
_caller moveInCargo _teleporTo;
player vehicleChat format ["You have been deployed at %1", _teleportTo];
} else {
player groupChat format ["Unable to deploy to %1 at this time.", _teleporTo];
};
cutText["","BLACK IN",3];
/* INFO: This is for a MP Dedicated environment:
---------------------------------------------------------------------------------------------------
Varible names of the 4 Ghost hawks acting as MHQ's : "Ghost_A","Ghost_B","Ghost_C","Ghost_D"
Variable name of the Addaction source (flagpole) is : "HQ"
The addAction is called via a .sqf called APXteleport.sqf < the .sqf contents are:
HQ AddAction ["<t color=""#FFA600"">" +"Move to FIXED WING", "teleport.sqf", [FixedWing]];
HQ AddAction ["<t color=""#FFA600"">" +"Move to ROTARY WING", "teleport.sqf", [RotaryWing]];
HQ addAction ["<t color=""#FFA600"">" +"Move to TEST RANGE", "teleport.sqf", [TestRange]];
HQ addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Alpha", "teleportMHQ.sqf", Ghost_A];
HQ addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Bravo", "teleportMHQ.sqf", Ghost_B];
HQ addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Charlie", "teleportMHQ.sqf", Ghost_C];
HQ addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Delta", "teleportMHQ.sqf", Ghost_D];
Then i fire the sqf via init.sqf
Just a side-question. Is there a way to create a Simple UI? I want to click "Spawn Vehicle" in the Action Menu and then open a list to select one out of 10/15?
Do you guys see any error in this ?
What script error are you getting @stable vault
not a script error as of yet as i havent incorporated it yet. I'm asking if i did it wrong in the _variables etc. As it is my first time trying to script at this level.
Which is why i put all the info in there for ya ? π
Just need to know it its not written WRONG
You're missing a couple of semi-colons and why have you got your variable names as strings in the _mhq array?
i dont know...a fella in the other channel helped me out a bit and gave me that advice?
Params are used when retrieving variables from an array of arguments such as those passed through to a function. But if you're declaring it within the script you dont need that
Honestly im trying to learn...
Yeah no problem
Remove that line from your script, you dont need it in this specific case.
im simply trying to get a teleport .sqf script to work in a Dedicated MP . But after the Chopper "Ghost_A" etc. respawns ...the code cant find "Ghost_A" anymore (i presume?) and the MHQ addaction no longer works
i was trying to Recode it myself
Am i missing something ???
Where are you calling this script? That you showed us
ah yep in init.sqf. The added action(s) wont persist through respawns unless you make it do so through for example a respawn event handler
How is this ghost hawk respawning. Through like a respawn module or somethign
So how do i fix that problem then, if you dont mind?
yes
someone told me to do this:
[_HQ,(_this select 0)] call compile preProcess "MHQrespawn.sqf";
is that correct?
the above CODE is all inside MHQrespawn.sqf
Id execute the MHQrespawn.sqf script through the vehicle's init field in the editor, rather than in the mission's init.sqf. That way the script will be executed everytime the vehicle is created, not just on mission start
OK...so the MHQrespawn.sqf will fire every time it respawns right?....but what about the chopper retaining its variable name?
its like the script cant FIND "Ghost_A" anymore after it respawns?
its renamed or something?
Im not sure how the vehicle respawn module works, but I would assume it just re-creates the original vehicle so would most likely retain the variabl enamer
Hmm?
Cant you try it?
about to
BTW... what does the %1 mean in the code at the bottom?
_caller moveInCargo _teleporTo; player vehicleChat format ["You have been deployed at %1", _teleportTo]; } else { player groupChat format ["Unable to deploy to %1 at this time.", _teleporTo];
thanks @little eagle
Its basically a placeholder
hey all i need some help, i set a trigger with this part hint "Fahrzeug wird Repariert";
sleep 5;
{_x Setdamage 0} Foreach thislist;
hint "Abgeschlossen";
sleep 10;
hint "Fahrzeug wird Aufmunitioniert";
sleep 5;
{_x SetVehicleAmmo 1} Foreach thislist;
hint "Abgeschlossen";
sleep 10;
hint "Fahrzeug wird Aufgetankt";
sleep 10;
{_x SetFuel 1} Foreach thislist;
hint "Abgeschlossen"
but i doesnt work
where is the error?
Error general error in expression
Cant sleep directly like that
and what can i do?
have you tried making an sqf file?
no i will try it right in this moemtn
Youll need to either use spawn or execVM to use sleep (simplified explanation)
@warm gorge How would i go about doing what you said earlier? : ShadowRanger - Today at 8:08 AM
ah yep in init.sqf. The added action(s) wont persist through respawns unless you make it do so through for example a respawn event handler
MHQ CODE IS:
_caller = _this select 1;
_id = _this select 2;
_teleporTo = _this select 3;
cutText["","BLACK OUT",2]; sleep 2;
if (alive _teleporTo) then
{
_caller moveInCargo _teleporTo;
player vehicleChat format ["You have been deployed at %1", _teleportTo];
} else {
player groupChat format ["Unable to deploy to %1 at this time.", _teleporTo];
};
cutText["","BLACK IN",3];```
INFO: This is for a MP Dedicated environment:
Varible names of the 4 Ghost hawks acting as MHQ's : "Ghost_A","Ghost_B","Ghost_C","Ghost_D"
Variable name of the Addaction source (flagpole) is : "HQ"
The addAction is called via a .sqf called APXteleport.sqf < the .sqf contents are:
SQF CODE IS:_hq = HQ; _hq AddAction ["<t color=""#FFA600"">" +"Move to FIXED WING", "teleport.sqf", [FixedWing]]; _hq AddAction ["<t color=""#FFA600"">" +"Move to ROTARY WING", "teleport.sqf", [RotaryWing]]; _hq addAction ["<t color=""#FFA600"">" +"Move to TEST RANGE", "teleport.sqf", [TestRange]]; _hq addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Alpha", "teleportMHQ.sqf", Ghost_A]; _hq addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Bravo", "teleportMHQ.sqf", Ghost_B]; _hq addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Charlie", "teleportMHQ.sqf", Ghost_C]; _hq addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Delta", "teleportMHQ.sqf", Ghost_D];
Then i fire the sqf via init.sqf
How come the script stops working after it respawns?
The issue though...isn't the addactions being lost.
its the code i need to put into the On Respawn Field in the attributes of the Heli "Ghost_A" to give it back its original Variable name.Cause if you see the code above "Ghost_A" is the vehicle is searches for before putting you inside via moviInCargo...So i need to figure out how to code the chopper to retain its "NAME" (as in the Variable name?)
either via :
- (code in the "OnRespawn" attribute in the vehicles Custom attributes field
or - eventHandler
so the teleport will WORK AGAIN
[once the MHQ is destroyed the teleport script no longer works]
because its somehow renaming the "Ghost_A" chopper to something different when it gets respawned?
Wonderful info @tough abyss Thank you.
So...yes there is a "OnRespawn" attribute in the vehicle itself, and theres an "Expression" field to be filled out in the Respawn Module itlef which is synchronized to the chopper.
As well i could just make a new .sqf naming them directly or something?
@tough abyss What do you reccomend?
"B_UAV_05_F" createVehicle position player;
{
dd = player connectTerminalToUAV _x;
hint str dd;
} forEach allUnitsUAV;```
that seems to not work
returns false
Because you can't connect to a UAV that doesn't have a brain
createVehicle creates the empty vehicle without AI in it
I've been playing about with dialog objects and can't seem to get the working that well... but all the objects seem to come out with weird textures or not texture does anyone know why? - http://i.imgur.com/dW9jEmz.png
@still forum sorry if this is a dumb question but how would i spawn it in the editor and fly it around?
nvm
createVehicleCrew uav;
dd = player connectTerminalToUAV uav;
hint str dd;```
still seems to not allow connection (AAF terminal)
nvm i wasnt nato
@vernal rune You able to provide some code of your dialog? A picture wont help much
@stable vault You just need to call your script directly from one of these onrespawn attributes which are triggered when the vehicle respawns. What have you tried so far?
running into a problem. I did some testing... it seems that the getArray function is returning a randomized array and not the complete array... it does however return the exact same randomization each time... it is also making items in the array appear more often than was in the original array
msg me if you know why this might be happening, been awake too long trying to solve this and need to sleep
gday all π
any one here can suggest a good cleaning script that removes turrets and empty vehicles?
currently using this script https://codeshare.io/2je7kg
IFA3 Mod
Hello guys, i've got a question, i'm trying to devellop my onw altis life server (i had start 5 min ago)
so i start to create and configure my description.ext but thats not the only file i need (exept the mission file) so my question is wich other files need i??
And have you a topic to help me?
I'm going to say you'll have little to no help here. Certainly the wrong place though. But you should have a full mission (not just a description.ext), which consists of far more than one file
yes that is my question?? Wich others file need i?
init.sqf
desc.ext
mission.sqm
etc...
All of them π€ ?
so it the stage you are at the moment you're better off discovering things yourself
you won't learn anything by asking here IMO
that's your best friend
all you need is a mission.sqm and init.sqf to get started
you'll learn the rest as you need them π
actually, it sound more like you want to host a Altis Life server than create your own mod/mission/whatever π€
check their discord, no clue where it is though ^^
What's the fastest way to check if there's someone in a specific cargo seat?
fullCrew with the includeEmpty flag?
figured, just checking if i was msising some other obvoius way
May be a dumb question, but does this include ALL air vehicles? (helicopters, planes, jets, vtols)
vehicle player isKindOf "Air"
Thought so, wanted to double check. haha
Cheers
Ya, I think I was confusing all of that and couldn't remember.
Is there a way to set a script-spawned uav to BLUFOR so player's don't have to "hack" it anymore?
Give it a blufor UAV brain
How do I use a local variable outside the scope of a switch case?
switch (true) do {
case true: { _myvar = "blah" };
};
systemChat _myvar; // fail
@worthy spade Declare the variable outside of the switch statement
private _myvar = "";
switch (true) do {
case true: { _myvar = "blah" };
};
systemChat _myvar;
Copy, thanks.
You're welcome to initialise and define the variable with the switch return
If you're that way inclined
Hello everybody. Got a huge problem with BE Filters π ... scripts.txt
BattlEye Server: Warning: Disabled kicking for scripts.txt scans. Please update your filters according to scripts.log and add "//new2" at the top.
But i got //new2 at top
And he is logging for matches
The filter worked till x64 update i guess
Nobody here? π¦
sry but thx for intel
Having issues syncing things with an intro into a mission. A loading screen at the end before you can physically see is screwing it up. Anyone know the command for waiting until you can physically see and move after all loading screens are gone?
fucking genius. thank you
Or private "_myVar"; @worthy spade
or as BoGuu said private _myVar = switch true do {case true: {"blah"}};
@tough abyss https://community.bistudio.com/wiki/onPreloadFinished (or the equivelant event handler)
That works too @vapid frigate Thanks!
idk where to post so i will bost it here. I'm trying to edit the armor value of a custom mod skin. This mod is .@LeoMod. It comes wit h very basic shirts. I did this to the uniforms to try and change the armor value but ended up failing "https://gyazo.com/47cb03b07c0dc45e769c34ed4b78d9ea". I'm trying to make it so it takes 2-3 shots from a rook at close range in order to die. Thank you
Is there an aircraft carrier image file(*.paa) in Arma3 folder? Where can I find it?
There are no paa's in the Arma folder. Your second question now doesn't make any sense. Oh you are gone already... Okey..
no carrier image file even in *.pbo files?
I don't know what you mean by carrier image.. There is probably some icon somewhere.. Maybe..
The carrier's texture?
yes. carrier's texture
I'm almost 100% sure that an object that big is made of many textures, some may even be generic ones reused in other places.
In the Wiki I found this line:
icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa";
but I can't find those files on my PC. Neither in Documents or the Arma 3-Directory and I even checked some pbo's
"C:\Arma 3\Addons\ui_f_data\a3\ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa"
"C:\Arma 3" is my main game folder.
I noticed that yes, thanks a lot!
Yay for Win10 search function.
There is no tool for .paa to image right?
found it
One more question: As the respawn Loadouts I want to load some default arma-pre-made ones like the NATO-Engineer/Medic/Sharpshooter etc. how can I add those to the Respawn Screen in CfgRespawnInventory.
or can I use the BIS_fnc_addRespawnInventory to use that?
Best stuff is always hidden... Ctrl + Shift + C in Arsenal
How do you escape special characters in Description.ext?
yes, exactly those characters in particular
there is no need to escape them?
Γ€, ΓΆ and ΓΌ displayed as spaces...
your document codec is wrong then
I'll change the encoding of the Filde
save your document as UTF-8
yes
I'll do
nvm, sorry
works now
I don't get why Notepad++ keeps reverting the default COdec to ANSI
BECAUSE IT'S NOT SUBLIME TEXT 3
nope, get out. NP++ is life
Is there a way to check if a player has an open briefing screen?
cuz if you use sleep while having a briefing screen you sleep forever.
and I want to avoid that
Use uiSleep
yeah I just rewrite all my intro scripts to use uiSleep...
and then people can enjoy the intro which started in the briefing screen...
I'm trying to make player nametags using DrawIcon3D. Is there any way that these nametags are not shown through walls?
Don't draw them if there is a wall in between the camera and the targets head.
but how can I tell?
what display is the briefing screen?
RscDisplayClientGetReady
RscDisplayServerGetReady (for the host)
RscDisplayGetReady (in SP)
no I mean the id...
host being the logged in admin on dedicated or server in local hosted MP
You can check the config viewer for the IDDs
I think I need a tutorial on how to use the config viewer...
it looks pretty complicated
ah found it
IDD_CLIENT_GET_READY
IDD_SERVER_GET_READY
IDD_INTEL_GETREADY
well I didnt mean those IDs but numbers like 53, 52
those are the same
Just need to include:
#include "\a3\ui_f\hpp\defineResincl.inc"
okay ^^
I need help. I want a script, so I can scroll on buildings and repair buildings.
@modern snow in unit init: ```SQF
this addAction ["Repair Building" , "nearestBuilding player setDamage 0"];
But it's more exciting.
how can I add to my life server?
What do you mean add to it
Which file
You're going to have to explain yourself better than that. I dont understand
I don't know which file I should add this : "this addAction ["Repair Building" , "nearestBuilding player setDamage 1"];"
sorry I can't speak english π
Theres probably a setupActions file or something in the mission where you can add your own actions
case east: {
// Repair building
this addAction ["Repair Building" , "nearestBuilding player setDamage 1"];
};
?
right?
vehicle _player isEqualTo _player
should return if the player is not in a vehicle right?
@modern snow sight You want that one of your altis life factions can repair buildings right?
@modern snow
private _buildingarray = nearestObjects [(position player), ["Static"], 2000];
{
_x setDamage 0;
} forEach _buildingarray;
@halcyon crypt thats if the player IS in a vehicle
@delicate lotus Yeah
well do you know anything about scripting?
something. But just started.
well to repair buildings you just need to add a action to every player which should be able to repair buildings which executes the code @tough abyss wrote.
In fn_setupActions.sqf: "life_actions pushBack (player addAction ["Repair Building", "core\actions\repairbuildings.sqf"]);" and add your script to repairbuildings.sqf
That repairs all buildings within 2km which is more so for admin stuff.
I dont know how altis life works so...
You're in the wrong discord bud
Ok, but thanks for your help π
@tough abyss oops.. well just replace != with == π
anyone worked a way to move a turrets rotation/elavation via sqf, with no AI/player intervention?
How can I check if enemy units are in a radius of for example 10m around given coordinates?
10x10 trigger?
if ( ({side _x == wantedSide} count _list) > 0) then {
hint "there are wantedSide units present";
};```maybe? Though I'd just move a trigger there
(_unit countEnemy (_pos nearEntities _radius) > 0)```
any idea on how to do this with friendly units?
(_unit countFriendly (_pos nearEntities _radius) > 0)```
what does the > 0 do?
return a boolean
check if the returned value is greater than 0
how do I use this eg set a variable to true if the value is greater then 0?
i know but how do i use it in this context
you literally just assign it to the code posted above
; ``` ?
the code i posted above is an expression, the value of which is a boolean representing whether there are enemies to _unit within _radius of _pos
you cannot compare an object (which i assume _unit is) and a scalar (which 0 is)
i think you should really read up on the basics of sqf before you try to tackle this puffin
bah... read the basics of imperative programming
Learning by doing works best for me ^^
0
""
_var
_var + 0
comment "blah blah"
missionNamespace setVariable ["somevar", _x]
(_unit countFriendly (_pos nearEntities _radius) > 0)``` these are all **expressions**. they all have a **value**. for example the **value** of the **expression** `1+2` is `3`, and the **type** of the **expression** is **scalar**
```SQF
_var = 1 + 2``` is a local variable **assignment** where the **value** of the **expression** `1 + 2` is assigned to the local variable `_var`
```SQF
_var = _x``` **is not an expression. it has no value.** because, i assume, SQF was designed by retarded monkeys. what this means in practice, is that counterintuitively this is illegal: ```SQF
_a = (_b = _c)```
@still forum I meant 0, my bad π
So I now got ```_myspawnpoint = getPos player;
_num = 9;
while {_num > 1} do {
_list = _myspawnpoint nearEntities ["Man", 10];
_num = count _list;
sleep 1;
};
waituntil {_num <= 1};
hint "hello";``` but this won't work. Any idea why?
I can't read it on my phone but I'll jump on my pc and take a look for you if no one else has in a couple of minutes
@cerulean whale thx
Just curious, what is the point of this?
it's for a pvp gamemode and this script checks if there any players nearby so you don't spawn in front of an enemy
are you allowed to suspend in the scope you're executing that code?
what error are you getting?
Generic Error in expression
also that second waitUntil is completely useless
I can only see the first few lines but why not do. waitUntil {count (_mySpawnpoint nearEntities ["Man", 10]) <= 1}
Generic Error in expression Usually means you're not allowed to suspend the running script at that point
read up on the differences between spawn and call
Was bout to say that as well ""
@cerulean whale wont work
// [unit, vector pos, float radius] : bool
my_fn_spawnIsClear =
{
_this select 0 countEnemy (_this select 1 nearEntities (_this select 2)) == 0
};```
this is why so much of sqf is worthless... people have no clue what they're doing so they just spawn everything
I would just write you a working one but I'm sick af and its 5am so I cba getting out of bed
I wouldn't do it like that but w/e lol
@pliant stream
@cerulean whale it works with []spawn and no thanks I'll figure it out myself π
I would just make it spawn you in a different location if someone was thee
There*
Cool. When I get up ill chuck you what is probably a better alternative to that.
Would be better just to cycle spawn location but that's too much effort to write on a phone
yeah just have a bunch of spawns, shuffle them, and find the first one that has no enemies nearby
Exactly
thats what I'm doing
I changed it in my final script
That kind of defeats the entire purpose of what you were asking then π
W/e anyway. As long as it works I guess
π
Does anyone has the display number and or the idc of the arma 3 gear dialog?
Found it, for anyone: Its Display 602
@pliant stream com'on, just because the assigment is not an expression you are calling SQF designers retarded monkeys?! Isn't that excalating a bit quickly?
it's not just because of that, but let's face it SQF is a pretty god damn shitty language
why so? (not that I disagree, just trying to understand why it is the case for you).
My point above is that SQF is a programming language of a game. Dev time was spent in developing it in deteriment of other features. So, maybe not necessarily retarded mokeys, just with a limited time to design it.
maybe if they had a braincell between them they might have realized that creating their own language was a waste of effort when a multitude of open source scripting languages already exist.
do not know the history of it; maybe at the time this was not the case?
https://en.wikipedia.org/wiki/Operation_Flashpoint:_Resistance 2002 (first use of SQF)
https://en.wikipedia.org/wiki/Bohemia_Interactive founded 1999
https://en.wikipedia.org/wiki/Ruby_(programming_language) 1995
https://en.wikipedia.org/wiki/JavaScript 1995
https://en.wikipedia.org/wiki/Lua_(programming_language) 1993
https://en.wikipedia.org/wiki/Python_(programming_language) 1991
just to name a few popular ones
picking Python, which I am more familiar with.
Python 2 was released in 2000. It was unclear that it would become as popular and well maintained and reliable as today. Only in 2001 the Python Software foundation was formed. So, making a commitment to Python in 2000 was a gamble.
SQF is getting replaced in the next Arma title... π€
that may be, but by no means does it vindicate SQF
sure, @pliant stream, I am not disagreeing with you that there was probably a better choice. Just poiting out that the circunstances were widely different back then, both licences, maintenance, culture in gaming industry, etc.
well, the parser I developed should be able to convert SQF to any language, so don't despair!
sounds horrifying
I'm sure BI would've done a lot of things differently if they knew then what they know now, as would so many other businesses.
Mine included...
lol horryfing is having to manually convert Arma 3 great mods to Arma 4...
^^
most sqf i've seen isn't worth the storage space it takes up though, i don't see why you would want to transpile it into another language, even if you could
and throw years of mod development under the bus. Sounds reasonable /s
ok then show me this magic transpiler that can turn SQF into java or something and i will be impressed
Is it possible to get the object executing a remoteexec with remoteExecutedOwner command?
Is it true the class name of Ejection seat for Opfor is " I_Ejection_Seat_Plane_Fighter_03_F "?
https://community.bistudio.com/wiki/Arma_3_CfgVehicles_EAST
Wait. What? @rancid ruin Seriously?
@brittle locust Don't post it in several Channels. This will end up in multiple Convos, with the same Topic in X Channels (Short: Chaos)
+When you are not sure where it belongs: #arma3_questions
noted, will move
Your linebreaks gave me a bit of a headache too π
yeah @subtle ore scroll up, untelo suggested JS cos it was around in 1995, prior to op flash
π€¦
{_x addMPEventHandler["MPHit",{enablesimulation false}]} forEach arrBonus;``` can anyone tell me how i would get to disable the simulation of a target as soon as it is shot (to avoid being able to run bonus.sqf 2 times)
doesnt want to work , i am able to shoot the same target over and over again
π
Well. Let's see here. Are you playing this in a listen server or dedicated?
and what is arrBonus defined as?
arrBonus =[D,D_1,D_2,D_3,D_4,D_5,D_6,D_7];
well atm i am making it SP until i am done , then i will be making it probably for a listen server (one of my friends host the mission and off we go)
next question will be what are D,D_1,D_2,D_3,D_4,D_5,D_6,D_7 defined as
small oval targets , if i find that the simulation becomes disabled then i will apply same technique to Pop-up targets
idk thats why i came here π
function viewer is your friend π
anyone know of any object based init event handlers that run after 3den attributes are set on the object?
(after the 3den attribute 'expressions' have run)
@pliant stream that the parser can or cannot transform SQF to language Y is not an argument in favour or against whether we should neglect or not years of mod development. They are unrelated (interesting) questions.
Regarding the conversion question, what I am saying is that because the SQF parser is able to construct the lexical tree of SQF, it is a great leap in the direction of migrating SQF to another programming language. A large challenge of converting X into Y is to transform written X into a sequence of statements. The second challenge is to convert those statements back into written Y. To a large extent the parser solves the first problem.
Java is probably a bad example because there is no way to convert an imperative programming language into a pure object-oriented one.
In summary, it strongly depends on what language Arma 4 will adopt. In this regard the studio could be more communicative and tell us what they plan (if they plan to change)
Enfusion Script is a pretty good bet
@vapid frigate Use CBA nextFrame?
will give it a go, thanks
@thick sage i got the impression they used Java at least in some capacity for dayz, though maybe i'm wrong... and also the enfusion/enforce (?) language is statically (and possibly even weakly) typed so you'll have one tough time trying to automatically convert sqf into that
I searching for 10m for enfusion/enfused/endoforce and can't find any damm thing on it... Wtf is that?
It is deeply troubling that the top hit of a programming language is on reddit.
it's not an external tool (yet at least)
but then how would it solve the problem? Everyone would need to learn a brand new language!
how so? seems really similar to c++
yeah seems like it'd be an easier language for programmers to learn (and more useful for anyone to learn)
dayz seems to support enfusion or sqf
so that's probly how they'd work around backwards compatibility
@pliant stream yesterday we were discussing that there were different open source languages on the market, why would they create their own. The same problem applies here: why would they use their own language when there are so many available?
@vapid frigate yes, backwards compatibility is a good argument. Regarding easy to learn, I don't think any of us at this moment can say that: there is no document describing it.
yeh just looking at the screenshot, it's obviously at least OO and likely very close to c++ cli
oh sure i agree that it's silly to create their own language yet again... i was just pointing out that since it's so close to c++ there's not really a need to learn a brand new language
C++ seems like an odd choice to emulate though unless it's being compiled properly
i'm pretty sure it is compiled though
i'm sure they even have an optimizer to rival icc ... /s
yeh makes sense if it is.. should be a lot faster than sqf
@vapid frigate well, c++ is pretty difficult to learn. But I agree, it is simpler if you know any other language. Emulate in C++ made Apple build a compiler, so, the challenge seems difficult.
In any way, was Enforce officially recognized as the modding language of Arma 4?