#arma3_scripting
1 messages · Page 388 of 1
@little eagle @still forum , thanks, but i wanted something not ARMA UI but telnet like console ability
I'm not aware of something like that. Can easilly be done with Intercept or Extensions. But I don't know of something like that that already exists
@still forum I'm not sure this is working for me, do you have any suggestions on how best to approach this? All i'm after is a test to see if the player playing as Terrorist 1 is currently looking at the object titled IED1
As a trigger condition
CheckVisibility seems the best solution but doesn't seem to care where the palyer is looking, just that there is an unobstructed line
between the two models
Hello my scripting friends !
Doesn't anyone know if there is a way to display the score of a match on a TV screen in-game with a texture or something ?
Hello, Quick question, when you put a .ogv video on a texture, is there the sound of the video ?
Flash-Ranger yea it's possible but with an eternal program
https://youtu.be/vdGU6vmPMrk @Flash-Ranger#8874
@3rK#4254
I'll try this out thanks
http://killzonekid.com/arma-scripting-tutorials-ogv-to-texture/ you can do it without external program
is there still no way to detect new entity created via sqf? or does missionEH EntityRespawned trigger for this?
There is still no way without mods.
lovely
Error C2143 syntax error: missing ';' before '}'
It's just like SQF.
@here can someone either prove me wrong or confirm that this is and error in the sqf preprocessor? #define arma3iscool configFile diag_log('Your ' + getText( arma3iscool >> 'CfgVehicles' >> 'C_offroad_01_f' >> 'displayName' ) + ' is ready'); // works diag_log('Your "' + getText( arma3iscool >> 'CfgVehicles' >> 'C_offroad_01_f' >> 'displayName' ) + '" is ready'); // does not work
The second line results in 2017/11/27, 21:45:05 "Your Offroad is ready" 2017/11/27, 21:45:05 Error in expression <s ready'); diag_log('Your "' + getText( arma3iscool >> 'CfgVehicles' >> 'C_offro> 2017/11/27, 21:45:05 Error position: <arma3iscool >> 'CfgVehicles' >> 'C_offro> 2017/11/27, 21:45:05 Error Undefined variable in expression: arma3iscool 2017/11/27, 21:45:05 File mpmissions\__cur_mp.Altis\init.sqf, line 7
I do think that the sqf preprocessor turns on his string sensitive flag on the frist occurance of " in the first single quoted string and turns it off when getting to the " in fron of the < is ready>
You can't use strings like this.
Just do:
diag_log('Your ' + str getText( arma3iscool >> 'CfgVehicles' >> 'C_offroad_01_f' >> 'displayName' ) + ' is ready');
I am not 100% certain that you are correct with this because diag_log('Your asdasd "');
results in 2017/11/27, 21:52:42 "Your asdasd """
which is quite ugly but kinda correct and seems legal to use
Uhm, okay.
I am as confused as you are ...
it works, no question but this is not about solving that problem that way, its about finding out if i use illegal syntax which i do not think, or if <@&105622502444711936> have a bug in their game
Debatable. Just because the behavior is not as one could expect, doesn't mean it is not intended.
Nah this sounds like a dev has just not handled this case, especially since the error is located in the preprocessor and not the scripting engine of some kind
yep confirmed, its legal to use it this way:
diag_log('Your "' + getText( configFile >> 'CfgVehicles' >> 'C_offroad_01_f' >> 'displayName' ) + '" is ready'); // works
result is : 2017/11/27, 21:57:39 "Your ""Offroad"" is ready"
valid syntax, just the preprocessor messes up
Sooo i gonna open a ticket for this, but tbh I think this will never be fixed anyway Q.Q
So i need to parse this out on my own
shrug
```diag_log('Your " s"' + getText( arma3iscool >> 'CfgVehicles' >> 'C_offroad_01_f' >> 'displayName' ) + 's " is ready'); // does not work````
results in
2017/11/27, 22:05:14 Error position: <// does not work>```
someone messed up real bad
boop <@&105622502444711936> here you go https://feedback.bistudio.com/T127214
pls no tag ( ͠° ͟ʖ ͡°)
😂
if I call this function 'removeobjects_50' and use SQF { _x remoteExec ["fn_removeobjects_50", 0, true];} forEach [logic_1, logic_2, logic_3]; in the initServer.sqf, would it work for the game logics called logic_1, logic_2, logic_3?
function: SQF { _x hideObjectGlobal true } foreach (nearestTerrainObjects [this,[],50])
Hey all, I'm making a mission where if the player shoots the wrong enemy unit it's game over (they have to work out which unit is their designated target) how do I do a condition that says if a unit dies that's anyone BUT a specific named unit then it's game over?
if it's the correct unit, you trigger the victory ending, for all others it's game over
if it's a multiplayer mission, use https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#MPKilled
I see, I make a generic "Someone has been killed" trigger then hook it up to a second "was that person the target or not?" one?
what
oh
no wait
no don't use triggers
use event handlers
click the links 😄
Okay I'll take a closer look, sorry
Why is everyone so fixed on using triggers these days?
because for people new to mission making, triggers are the most visible tool.
Yeah, but even after they learn how script is more useful and more effective in the longrun they still use triggers 😦
Well sure, triggers are there to be used 😄
I can't see why you shouldn't use them for simple stuff
or as entry points for scripts
because my 0.01 ms execution time is what I need. It needs to be a racecar with racing stripes. Not a sedan with flame stickers on the bumper
Honestly i'd take an in-engine solution if it's available
if you need a 0.01 ms exec time, then that's your particular use case
Triggers should be good enough for most people
/s
Does anyone know if localization is supported with createDiaryRecord?
or rather how to integrate into Text part of <execute expression="Code to execute">Text</execute> as in <execute expression="Code to execute">localize "STR_my_string"</execute>
format ["<execute expression=""Code to execute"">%1</execute>", localize "STR_my_string"]
Nice one, Thank you @meager granite 😎
@tough abyss triggers are native, but they are nowhere near full utility. Which is why I say no matter if triggers are native or not, sqf is still going to be hands down better wether or not you have faster execution time.
_triger setTriggerTimeout [10, 10, 10, true]; would evaluate every ten seconds and is sqf.
do you mean editor triggers?
scripted triggers
is that in a foreach MarkerList ?
how do you mitigate performance impact versus changing marker color when the color shouold change. I mean you can either spawn that sctipt for each marker or run code above in a foreach marker array wraped in a loop. How responsive the reaction will be vs how much evaluation at a certain period interval. The more markers in that loop the more load at evaluation so you need to put a sleep in there but loose the resonsiveness.
This is why I think the scripted triggers are nice. You can add one for each marker and add them to the scheduler. The argument that triggers are objects that need to be synced is not a huge concern for me. By that logic players are objects so no player support is faster sync. But really, just because players suck and have bigger issues than triggers does not mean its a good or fun mission.
do you know if an object that has been HiddenGlobaly still syncronizes with clients @tough abyss ?
I just did a test of making triggers on server then hideobjectglobal true and then hideobject false on server. I still managed to triger the trigger as a client on dedicated. So its still working as intended. If this does dissable syncronization on clients then this is awsome..
Not sure if there would be any significance. Maybe would not sync object to client. I don't know how to test that.
@dim terrace that is only for a video..
I'd like the score to be updated on the screen every to you score a point in-game.
I'll try that @compact maple
Ah, it was supposed to be answer for 3rK, got that external tools questions wrong
@barren magnet Have you thought about that your code might not work because arma3iscool doesn't exist... And that you might need to use configFile if you want to access the config?
No that's not the case. It does not matter what you out there, it's just that the preprocessor won't parse it. Look at the ticket
@Flash-Ranger#8874 what do you mean ? This is for external screen, so with a basic external script you can fill an image and export it as a Paa then dymanicaly upload it oneach score change, but its kind of heavy
Anyone had to add damage with ace functions ? I have tried adddamagetounit function. It doesn't work properly. Wounds doesn't d'switch to yellow or red. How do you proceed ?
@cloud thunder Just use localilty true when creating trigger, it's the same as hideobjectglobal ect ...
@compact maple works fine, show your code
@cedar kindle I took the exemple which are in the function
Lol
In a function called by a trigger
So I get my player with bis select 0
The ppeffect I created work with the _player but not the ace func :[
{
_array set [_forEachIndex, objNull];
} forEach _array;
...
@little eagle 1, 3 bad code. _forEachIndex represents NOT the index of the current array element! https://community.bistudio.com/wiki/forEach Notes Killzone Kid. 2 is work.
Which is exactly why commy does it like he does it... @thorn pine Not modifying the array at all so the _forEachIndex stays correct
But... If you look closely... KK's example code shows that _forEachIndex does actually reflect the index of the current array element.
["1",0,["1","2","3","4","5","6","7","8","9"]] // index 0 is "1"
["3",1,["2","3","4","5","6","7","8","9"]] // index 1 is "3"
["5",2,["2","4","5","6","7","8","9"]] // index 2 is "5"
["7",3,["2","4","6","7","8","9"]] // index 3 is "7"
["9",4,["2","4","6","8","9"]] // index 4 is "9"
So you and KK are wrong @thorn pine It actually does represent exactly the index of the current element.
Someone should delete that wrong comment and instead write that the _forEachIndex won't move back if you delete the current element.
But I'd say that's common sense if you are a programmer
Doesnt foreach make a copy of the array in some way?
no
So if I delete the next element in every iteration it will come up empty? or will it come up with the element after the next one?
forEach is equal to
_index = 0;
while {_index < count _array} do {
_forEachIndex = _index;
(_array select _index) call code;
_index = _index + 1;
}
If you delete the element so that every element moves back one place like
[1,2,3,4]
at 2 delete the next element. Array will be [1,2,4] so your next element will be 4
If you set the elements to nil then your next element will be nil
_array = [1,2,3,4,5,6];
{
_array deleteAt (_forEachIndex+1);
}forEach _array;
would execute 1,3,5
Okay, makes sense actualyl
I'll remove that bullshit comment and write something correct instead.
I thought that foreach copies an array
@thorn pine Read the topmost comment
😦
Not really your fault. There are many bad bullshit comments on biki. Someone just needs to clean them up
what is the easiest way to extract pitch and bank from vectorUp?
I recall a function from XCam but can't find it...
no, from a vector
Better would be to explain foreach index using the for command
@candid jay see the configuration of this command. This will give an answer.
Fixed the comment
@queen cargo while is a lot easier to understand though. And it's what is actually happening in engine.
@still forum This is what always happens at the machine level, only through ~ todo.
Yes... That's what I thought about when I said "actually happening in engine"
Question. With endless cycles and delays. After sleep worked, a3 the command throws in the end of queue or on another?
@thorn pine "for some reason, the results of this are not fully accurate"...
I have no Idea what you are saying at all
Do you mean the command a3 which doesn't exist or the command throws which also doesn't exist but might be a typo of throw.
And what queue? and what another? what is the other thing?
Also endless delays don't make sense...
queue = scheduler
time = diag_tickTime + 1;
waitUntil {diag_tickTime >= time};
spawn {fnc};
or
time = diag_tickTime + 1;
waitUntil {diag_tickTime >= time};
~call~ {fnc}; // as spawn, just ahead of the queue
how uisleep works?
You mean if a newly spawned script get's put at the start or end of the queue?
It is possible and so to speak. I'm interested in how sleep works
waituntil blocks the script until condition is met
neither spawn nor call will be executed until wait until is completed
I don't know at all what you mean with what's possible. The code you wrote doesn't work because time is a command.. So the code like that won't work.
Otherwise if you replace time with a real variable and remove the ~ Then your code works..
Still don't understand what you mean
@queen cargo I want to know how this happens at the engine level.
@queen cargo thx
How what happens @thorn pine ? How the waitUntil works or how spawn/call work or how diag_tickTime works or what?
no-no-no how uisleep works?
Ahhh...
Yeah.. uiSleep is kinda like waitUntil on diag_tickTime then.
When you sleep your scriptVM is pushed to the end of the script queue. And next time it arrives at the front and is executed again the game checks if the time is over. If yes it continues executing. If not then it pushes it back to the end of the queue again
If your sleep runs out while the script is in the middle of the queue it still won't execute till it reaches the front again.
Which is why 99% of the time Sleep and uiSleep actually do sleep longer than what you tell them to
Thank you @still forum
How's what I wrote bad code. 🤔
I mean, it is generally, but those 3 examples from yesterday.
Also I'm 99% sure setTriggerTimeout refers to the timeout after the condition evaluated true, not the frequency of checks which is always 0.5s.
yeah, that's what i thought too
It's not.
He just believed some bullshit comment on biki
Yeah you can't manipulate check frequency.
timeout just means "condition should be true for this long for the trigger to activate", afaik
You sort of can, if you create trigger with createVehicle, it does condition check on each frame
Why use create vehicle for the trigger though?
To do condition check on each frame of course
But nowdays you have stacked EachFrame and there is no need to use this hack anymore really
Unless you're scripting for OA where it is still useful.
OG onEachFrame before the command
Wish it was discovered earlier though, so in theory we could've had onEachFrame back in A2 or even earlier.
Why would this be practical though?
Its onEachFrame
Which was only added in 1.63 OA (~2012, right before A3)
Before that you only had Draw UIEH which is only valid for clients as server doesn't have UI
Hmm. I guess if that is your only method of doing so that works.
Its no longer needed but could've been useful many years ago if was discovered earlier.
Right, for those who still play A2 i guess. For whatever reason.
Still useful in OA nowdays as you don't have stackable EachFrame there, having createVehicle'd triggers works as stackable on each frame
(I'm in OA right now)
I see. What's different in the creation of the trigger though?
Don't ask, it all has purpose
Between the command and createVehicle
It gets simulated more often compared to createTrigger thus condition check gets called each frame instead of each 0.5s
@compact maple yes that's it. I have screens in game. When you score a point in-game the screen in the mission is updated. It is kinda heavy in paa that's why I was asking if their was an other way to do it
@quartz coyote okay, i cant help on this one sorry ^^'
@tough abyss Sa Matra isnt the only OA editor at the moment
<----
Come join the party Quik, 👁 👄 👁
🙄
NO ACE3 BRIEFING SLIDESHOW:
//in init of controller (in this case a laptop)
this addAction ["Briefing 1","briefing1.sqf"];this addAction ["<t color='#ff0000' size='7'>CLOSE ALL(Cannot be Undone)</t>","closeall.sqf"];
//in briefing1.sqf
laptop1 addAction ["Slide 1","briefingslide1.sqf"]; //adds actions needed for slide sqf files. Copy, paste and plug in as many times as needed.
laptop1 addAction ["Slide 2","briefingslide2.sqf"];
//in each slide.sqf
screen1 setObjectTexture [0, "images\userimage.jpg"]; //image file path relative to mission directory
laptop1 setObjectTexture [0, "images\userimage.jpg"]; //create one entry for each screen that will have displayed image
//in closeall.sqf
laptop1 removeAllActions 1;
//I'm still working out a way to close the briefing actions without completely removing them. If you can help please contact me :)```
@subtle ore like this?
@tough abyss No, not necessarily. but what exactly is the problem?
Setting a blank texture or a blank string will reset the texture on that face
Removing them withought removing them? That doesn't make any sense. If anything make a condition
Make a boolean to check if an action has been used or not. Condition it, if they are all true, add the close all action
Okay I will try that
if I get value is any
How would I check that.
So if it's any I can put a default value?
Isnil or isnull gone be any go to for this?
createsoundsource doesn't work with mission config file ?
Creates a sound source of the given type (type is the name of the subclass of CfgVehicles which is pointing to the sound defined in CfgSFX).
that's i wanted to quotes lol
CfgVehicles in mission config?!
example show that
inb4 this can be exploited to get eventhandlers to objects.
define cfgvehicles inside the description.ext
class CfgVehicles {
class All {
class EventHandlers {
init = "systemChat str [_this]";
};
};
};
Something like this?
Then I'd go with createSoundSource for your thingy. You most likely want it to loop and that's the best thing to implement that.
ez to stop the sound too
Yep, it's clunky to set up, but nice to script with.
The configs.
Two of them even.
🙏
It was extremely unlikely.
yeah, i think cfgvehicles only work with createsoundsource
the command was designed to support this feature
Repurposed.
What characters are allowed for creating function classses?
class myFunction
class my_Function
class my-Function
etc...
Is there some place where I can find the full list of characters?
@tough abyss Imagine being able to put mods into your missionfile
Starts downloading 20GB missionfile
Lol
@tulip cloud a-z, A-Z and even 0-9.
- Probably isn't allowed to be used at all. That's a minus for SQF.
got it so all special characters are offlimits
C's alphanumeric characters and underscores are probably a safe bet
People would rather download 20 GB over and over again than to download them before picking a server.
why everybody thinks that way?
you guys know garrysmod? just let ppl download the mods upfront instead (but ingame and from the actual server)
and that is just a basic source engine feature
that is what more or less is lacking in arma
for proper modded servers
but that is limited by engine
((more or less))
I mean Gmod is doing it fine..
Whatever is on the workshop is downloaded from the workshop once
and everything else custom is downloaded from the server
I mean it might take some time sometimes but it sure as hell is more comfortable in most cases
workshop was not always existing btw.
Well it definitely is doing that now 😛
reason for things taking so long is because most servers do not utilize separate file host
which is why that download also affects game server performance (bad ping)
T works for "spotting" anything 😃
enemy units as well
when you're spotting them with the binoculars for example
in constrast to what?
I didnt mention anything about unit roles; pressing T is manual mine detection
the code I added is just to make it like it used to be, fully automated
would enableEngineArtillery true; give any vic the arty computer?
I don’t think so...
no, but ```sqf
enableEngineArtillery false;
would probably take it away
actually no, i think it's irrelevant to the computer
i mean, mostly
from the biki description it sounds kinda redundant in A3, though. Never had to use it to allow indirect fire.
Guys, im trying to make this old script work..but no success. its a script to make a plane/helicopter full stop in a few secs using the action menu when you are in the driver seat.
im executing it from the cfgvehicles->useractions
class UserActions
{
class RepulsorStop
{
displayName = "[Repulsor Full Stop]";
displayNameDefault = "[Repulsor Full Stop]";
textToolTip = "[Repulsor Full Stop]";
position = "pilotview";
priority = 99999999999;
radius = 10;
onlyForPlayer = 0;
shortcut = "";
hideonuse = 1;
condition = "(player == driver this) AND (alive this) AND (speed this >10)";
statement = "this execVM ""\uwing\initrepulsorstop.sqf""";
};
};
This is the sqf
_vcl = _this;
sleep 0.01;
while {speed _vcl < 5} do {
sleep 0.01;
_factor = -0.04;
if (speed _vcl >= 100) then {_factor = -0.08};
if (speed _vcl < 5 ) exitWith {};
_vcl setVelocity [(_factor*(sin getDir _vcl))+(velocity _vcl select 0),(_factor*(cos getDir _vcl))+(velocity _vcl select 1),(velocity _vcl select 2)];
};
I activate it, no errors popup but the plane/heli doesnt stop or reduce its speed
any help?
Thank you man, will try it asap
@tough abyss Still players on our OA servers, it is still fun compared to A3 too (and much more FPS)
Though it is indeed a form of self-flagellation, this turret bug drives me insane, turns out it happens in any setup, you can repro it in simplest mission possible, just two player units and created vehicle and you can break the turret by rejoining.
Yeah, Wasteland Utes one
I'm having the most obscene time trying to force 3D position on a vehicle exactly
vehicle/object
getPosWorld setPosWorld
did find those, appears I'll need to recalculate my coordinate system however
appreciate it 😃
yeah, need to resample it all, but thank you for the confirmation -- the digrams are hard to read at 3am ^^
@meager granite
how does one stop AI planes from taking off these days?
disableAI "move" on driver and vehicle doesnt work - only setFuel 0, but i like to avoid that
The only way i've found is to start with the pilot outside the plane, with a HOLD waypoint.
Make him GET IN when you want the plane to move
damn 😐
yeah it's not ideal :/
@red anvil wat about the z direction?
also
so lets say
I have added the 155mm howitzer to a tank,for science reason ofc. Is there anyway to add the arty computer to said tank?
i much more enjoyed wasteland utes than the A3 versions, so understandable it has players
A3 Wasteland is very problematic due to easy inventory duping and related inventory problems
@velvet merlin https://community.bistudio.com/wiki/setAirplaneThrottle in loop
can u give tanks the arty computer?
hi guys, is there a way i can screenshot every clothes in the arsenal ?
f12?
I mean, if i got 300 uniforms
i dont want to press F12 300 times
if there is a script that get every possible uniform, it could be nice
can do the rest with https://community.bistudio.com/wiki/screenshot
maybe this can help you
hmm, but you can't screenshot the uniforms, so won't help you xD
Hi, is there the way to remove fallen trees from the game world (supposedly might save some traffic)?
hideObjectGlobal it on server
"set airplane throttle in a loop" wow, so hacky 😄
@dim terrace thanks master 🙇
class Insect: Bird //inherits 19 parameters from bin\config.bin/CfgNonAIVehicles/Bird, sources - []
Can I overwrite a BIS function with my own from a scenario folder?
Perhaps with CfgFunctions? I haven't found an apparent way yet.
It shouldn't be allowed.. But I think you can. But you have to overwrite the BIS functions config. Which is in game config not description.ext config
Can't you disable the functions cache for the mission or something? That'd mean the mission takes longer to load though.
How to check if player is in a marker (a rectangle) ? I try this but it's not correct : ** player inArea [getMarkerPos "marker_1",getMarkerdisSize "marker_1" select 0,getMarkerSize "marker_1" select 1,0,true] **
player inArea "marker_1"
OMG -_- Thank !
It's nice isn't it !?
Yeah and more simple !
Any supported shape... Polygon markers would be awsm
e.g. L-Form?
Dick shape.
DickButt
@barren magnet
\*poof*
*poof*
*lol* *noob*
😄
poofing intensifies
but a circle isn't a polygon
🤦
Obligatory: a circle is a polygon with infinitely many edges.
a polygon is a plane figure that is bounded by a finite chain of straight line segments closing in a loop to form a closed polygonal
🤔
it says right here it is finite though
Oh, it' written down somewhere!? It must be true then. (jk)
Hey i have a question about a script im trying to create
Answer is: No
Yes!
hey i there someone who can help me with https://community.bistudio.com/wiki/BIS_fnc_initLeaflet ? i need besically the way to fire the trigger after player read the leaflet. Is it possible somehow?
(why do ppl ask a Question to ask a question or just make pointless statements instead of asking it directly)
Im trying to write a script for the new rugged screens that were added in. I have 2 scripts as UserActions in the config, and im trying to get images on the screens through the script. I have tried changing the hiddenselectionstextures and that did not work.
Or basically just have it so that the screens spawn with the images on them when you place them down
Any suggestions?
say, does anyone know if its possible somehow to use a player's PID in a script in dedicated? Like "76561197968970197" setdamage 0 or something
can I use their PIDs to run scripts on them?
Not that i know of
_player = {if(getPlayerUID _x == "123123123") exitWith {_x}} forEach allPlayers;
if(!isNil"_player") then {
_player setDamage 0;
};
@blissful depot
neato thanks @meager granite !
hm, i expected that was an obvious one and not meant ¯_(ツ)_/¯
Could also be reduced to:
{if(getPlayerUID _x == "123123123") exitWith {_x setDamage 0;}} count allPlayers;```
I wish there was proper server-side clients list though, with as much info as possible
Yep
So you can work with clients even if they don't have player unit.
Can't you do that with the OwnerID?
e.g. setVariable/RemoteExec with the OID as Target (iirc that was possible)
Yes, but you have to form and maintain your own clients list through PlayerConnected\Disconnected event handlers
Yep
I can get it from the SQL database in my case
Nah, we are talking about something completely different
oh ok
also: What if the DB doesn't exist 😉
owner is momentary thing, changes each time you go from lobby into the game
I wish I was clever when it comes to scripting 😃
Actually, does it? Do you have to fully disconnect to get new owner assigned? 🤔
Probably not
Guess so
I guess it works like that:
you Disco to Lobby, had OID 1, another one connects while you are still in lobby -> He gets OwnerID 1 -> You connect in and get .. idk... OID 4
I doubt that it saves that stuff
Not as in simply going back to lobby and into the game should be enough to get new owner id
No clue. Either it creates a new one (+1 after the latest one) or uses the lowest free one. (i tend to the "lowest") ¯_(ツ)_/¯
Never tested/watched it, since: Never needed^^
Just tested it, to get new owner you need to fully disconnect from the game, going back to lobby gets you same owner id
Even when another person logs in before you rejoined?
Don't think it should matter
or uses the lowest free one. <- thats why
You're still on server and your owner id still persists (but owns no vehicles, etc.)
No, I don't think it ever uses free owner ids, just increments for each server-joined client
hmmm, so that stuff must be stored somewhere
increments Ah, that was the word i was searching before 😄
Yeah that's why I said it would be great to have server clients list, so you can have info on players that are in lobby (PlayerConnected calls when you join the game from lobby)
"It's somewhere hidden in the Matrix"
_rpgVel = velocity _rpgRound;
_rpgDir = (_rpgRound getRelDir _randomTrench);
_speed = 295;
_randomUpX = 0;
_randomUpY = 0;
if (_useLoc == rpgspawn1) then {
_randomUpX = ((random [-0.5,0,0.5]));
_randomUpY = ((random [-0.5,0,0.5]));
};
if (_useLoc == rpgspawn2) then {
_randomUpX = ((random [0,0.3,0]));
_randomUpY = ((random [0,0.3,0]));
} else {
_randomUpX = ((random 2) -1);
_randomUpY = ((random 2) -1);
};
_rpgRound setDir _rpgDir;
_rpgRound setVelocity [
(_rpgVel select 0) + (sin _rpgDir * _speed),
(_rpgVel select 1) + (cos _rpgDir * _speed),
(_rpgVel select 2)
];
_rpgRound setVectorUp [_randomUpX,_randomUpY,1];
im having some issues with the vectorup random numbers
most of the time they are consistent and work well, but sometimes they just fire straight at the ground underneath where it spawned
i cant figure out why
oh, this script fires rpg rounds randomly
rpgspawn1 will always use that (random 2) - 1 block
This is the reason, you're setting really weird up vector, for example it can be [1,1,1] which is -45 degrees elevation
So it will fly straight into the ground
Spawn some arrow helper and set its vector up to these values to see how it looks
welp im an idiot, yeah that fixed it, cone is much narrower after replacing the else statement
thanks, ive been staring at my text editor too long to think properly
If _randomUpX and randomUpY happen to be 0.5 and 0.5 or very close, this will still send RPG into the ground but it should be uncommon
yeah im testing right now, firing them every half second and seeing the distribution
Test with worst possible cases (_randomUpX = 0.5; randomUpY = 0.5) to see how it looks and if it suits your goal
the 0.3 seems to be the upper limit, higher and the rpgs detonate in the air
might have some fun with those airbursts though
_incomingSound = "rhsafrf\addons\rhs_sounds\rpg\rpg_1.ogg";
playSound3D[_incomingSound,getPos(_useLoc)];
this sound file doesnt play though
oh i see why
the getpos isnt necessary
That looks just all around wrong. What is this trying to do?
setVectorDirAndUp takes two arrays, but _randomUpX = ((random 2) -1); implies they are numbers. Syntax error, the line is ignored.
As well as everything after that,
its just setVectorUp
the direction is already retrieved via getRelDir
i can send you the whole script if youd like, just pm me
it works
Doesn't playSound3D need an absolute path to the file?
Or have they changed that now?
Can you explain what it does, AxleVice?
He's spawning RPG round that flies into general direction that supposed to miss
Is there a way to force a cutRsc to always be topmost (Above dialogs)
That's just some simple vector math then:
private _fnc_fireMissile = {
params ["_origin", "_target"];
private _tdir = _origin vectorFromTo _target;
private _tlat = _tdir vectorCrossProduct [0,0,1];
private _speed = 295;
private _missBy = 20 * selectRandom [1, -1];
private _aimedAt = _target vectorAdd (_tlat vectorMultiply _missBy);
private _vdir = _origin vectorFromTo _aimedAt;
private _vlat = _vdir vectorCrossProduct [0,0,1];
private _vup = _vlat vectorCrossProduct _vdir;
private _vel = _vdir vectorMultiply _speed;
private _rocket = "???" createVehicle _origin;
_rocket setVectorDirAndUp [_vdir, _vup];
_rocket setVelocity _vel;
};
[getPosWorld e, getPosWorld p] call _fnc_fireMissile;
This should work. I don't have the game atm and can't remember any rocket classnames.
When you want to exec a script and wait for it to finish how do you do that?
_handle = execVM "test\test.sqf";
waitUntil {scriptDone _handle};
That's how I would exec the script that needs to be done before the code continues but what do you write in the script to trigger the scriptDone?
Script's top most scope has to end or script thread should be terminated with terminate command (from anywhere)
So the scriptDone just checks for the very first scope to end?
yes
Thank you
In your example, just use
call compile preprocessFileLineNumbers
instead of execVM.
Okay, thanks for the hint
And the right one. You will need to make server know which owner id headless client has though
When headless loads, make it send its own owner to server
But that part confused me - player unit (there is none for HC)
unit: Object - unit formerly occupied by player
PlayerDisconnected will also work
- Send headless client's clieanOwner to server, when disconnected event happens, check if its HC's owner
clientOwner executed on server(handler happens there) gives 2.
Looks like onPlayerDisconnected command is the way, it has _owner of leaving client
Aha, there is PlayerDisconnected mission event - that should do
Im trying to add an image to one of the rugged screens through a useraction with a script. Any suggestions?
if it´s a one off and you don´t have to change the texture back, use https://community.bistudio.com/wiki/BIS_fnc_holdActionAdd and on the action completion run the code with select 0 and https://community.bistudio.com/wiki/setObjectTexture
select 0 setObjectTexture "mytexture"
that´s one way to do it
you can change it bac kstill it would be a longer code to run inside those brackets tho
@south pasture Samatra meant that you do clientOwner on the headless client when it joins and send the ID to the server
clientOwner will return 2 on the server because the server is always 2
@blissful wind would that be a scripted function that could run off of a useraction?
im sorry may have read it wrong i though you meant something like addAction
Basically, i have an object that i made in a config.cpp that i have 2 useractions on. I was wanting to put another action on called "Turn On" that would populate an image onto the screen and then have th other options open for players to use. Does that make sense? Sometimes i am bad at explaining things, sorry
I´ll DM you
thanks
Is it possible to reduce the update/sync interval of distant units locally in multiplayer?
no
@still forum Thanks for answer!
no
Empty string in special parameter in createVehicle throws enum error now
Who's idea it was? How many missions spam errors now?
Rpt error or popup error?
Script error pop up like this: https://i.imgur.com/Nkjxu4F.png
:/
Yep, have this as well
loadCoef is the weirdest one, because it's actually correct.
Its not even enum as it supposed to support custom values
unit setUnitTrait [skill_name, value, isCustom]
Yeah, and this isn't even a custom one. No idea why this pops up.
A ton of people already told BI about invalid enum errors.. None of them were fixed and now it's pushed to release -.-
https://feedback.bistudio.com/T127225 (not enum errors but still interesting)
Isn't that awesome? reported almost 2 months ago on dev branch. issue marked as reviewed and nothing happened.
What was the point again of using createVehicle with ""?
Less typing
So it's supposed to fail and give objNull.
It been using default placement option of NONE for eternity now
createVehicle ["whatever", getPos player, [], 0, ""]
Yeah, makes sense that they do the enum check for that one. But maybe they should've just white listed "" too.
Looks like only audibleCoef, camouflageCoef and loadCoef throw enum errors
Along with custom traits of course
Yet command works fine
Guys can you help?
" call BIS_fnc_timeline_getSimulatedCurves);
}
forEach (allMissionObjects "Timeline_F");"
how to add it to scripts.txt to prevent kicks?
Kaboom, dont triple post nezt time please
oh he didn't even post in BE channel
Thought to move answer there
or server admins
What the fuck are these new enum errors?
@tough abyss Scroll up to the feedback tracker links
@still forum - is it a bug on my side or...?
@meager granite Yeah that's a little concerning. but it was in asking questions, and general chat. And finally here
Cause I don't see anything wrong with this. In fact, it works as well as it did before the update, minus the enum error ```SQF
#include "script_component.hpp"
private "_curator";
// Create curator module, needed to assign curator
_curator = (createGroup sideLogic) createUnit ["ModuleCurator_F", [0, 0, 0] , [], 0, ""];
player assignCurator _curator;
// Make all entites editable by all curators
{
_x addCuratorEditableObjects [entities "", true];
} forEach allCurators;
hint "Zeus has been created, all entities are editable.";
Anyone noticed mod list from steam query is broken, as in this doesnt seem to be correct anymore https://community.bistudio.com/wiki/Arma_3_ServerBrowserProtocol2
@still forum - I'm guessing ignore?
https://github.com/acemod/ACE3/blob/d357395b4bcfcc25f7658fe02de9d414e780fac5/addons/movement/functions/fnc_handleVirtualMass.sqf#L43
It's not a bug
well.. kinda
the "" argument for createUnit is invalid
check wiki
But it actually doesn't break anything. It should be a warning not an error
What you linked is a different error that's actually completly invalid and should be ignored
Ah, ok. I should probably change "" to "NONE" anyway.
🤔
😎
@tough abyss Yes, that is what i was responding to
Maybe they have plans to fix them
Maybe diag_log should get it's own log file..
It's fine as long as I'm not the only one affected by the bugs.
@little eagle We can change that
Can you? I already fixed all my bugs from the update.
No Commy, your cba addiction is just you
🚶 💨
Well nothing in ACE from me uses the enum thingies and neither does BWA3.
Heh
How do you actually use enums
There're those fucked up models I posted in #general_chat_arma , but models are not what I do, so meh.
Or is it just different string contents
Just use macros if you want an enumerator.
I can see my SSD getting full because of RPT errors
application that cycles through rpt all the time and logs everything thats actually not there randomly to a different file
Anyone know a bomb script, I'm trying to make a hyper realistic warfare scenario and have buildings explode. I can't seem to figure out a code for it, can anyone help?
Yeah
Opfor goes into a town controlled by NATO and I'm trying to achieve controlled explosions in order to make a small film
@plucky beacon
🤔 Opfor goes into enemy territory for a film of explosions?
seems rather ellaborate
What does this mean for the script though.
Are you asking about how you can blow something up with a script?
Yeah I'm new to arma
Could always create a bomb on a marker
check out the RHS nuke, you can customize the explosion
if youre adamant about scripting it in youll need to be a bit more specific
yes its on steam
Okay I'll check that out
i cant recall which RHS pack its in but its either US or Russia
private _target = cursorObject;
private _bomb = "SatchelCharge_Remote_Ammo_Scripted" createVehicle ASLToAGL getPosWorld _target;
_bomb setDamage 1;
???
thanks @little eagle
@little eagle So will this blow up a vehicle or a building or what?
it'll blow up a satchel charge an whatever your cursor is looking at
So how do I trigger the explosion?
it does it immediately
Is there any way I could set a time limit for it or a countdown?
you could make a trigger, or just add a sleep to it. but you can't do that through the console because functions are always woke
The question was how to blow something up. Well this blows up _target.
yes you can change the target to be a specific object
okay, thanks
private _target = YoHouse
player
how do you paste code into discord like that?
Alright thanks you guys.
```sqf
<<< code here
```
waituntil {player == player};
private _target = player;
private _bomb = "SatchelCharge_Remote_Ammo_Scripted" createVehicle ASLToAGL getPosWorld _target;
_bomb setDamage 1;
Short mission.
<<<I'm woke
Oh no arma is being retarded
on the contrary, you just haven't fixed it yet
No, I mean "Launching the game has failed, do you want to run Arma 3 without Battle Eye? "
🤷
Fireworks:
0 spawn {
for "_i" from 0 to 30 do {
sleep random 2;
private _pos = player getPos [10 + random 50, random 360];
_pos = _pos vectorAdd [0,0,30];
private _bomb = "SatchelCharge_Remote_Ammo_Scripted" createVehicle ASLToAGL _pos;
_bomb setDamage 1;
};
};
Boring without the ACE frags.
Can I send someone a screenshot of the code that's not working?
where are you placing the code?
looks like steve gave up ☹
if i pass a parameter to a function like this: ["myParam","myParam2"] spawn my_function;
and i try to use that parameter but it requires quotes
do i need to put _myParam in quotes or can i exclude it?
[_arg1, _arg2] call {
params ["_arg1", "_arg2"];
};
Hello guys, i need some help, i got this array : [[2,60,2]]
i want to use it to make som calculations, how can i transform the elements of this array in string ?
str _array
@little eagle Then i will be able to select in it ?
Select what?
"_arg1" createvehicle getPos _arg2;
select an element
whatever _arg1 is needs to be in quotes
No, it doesn't.
so i can exclude the quotes
Only for params command it needs to be.
i see, thanks
Afterwards it's a normal local variable.
@compact maple
To select an element, you use select:
[[1,2,3]] select 0 select 2 // 3
Since you have a nested array, you need to use select twice.
The first (and only) element of the outer array is itself an array.
Which has 3 elements.
Yes i know that, thanks, i was trying to hint an element of that array
just to debug
i did something wrong
but how would you do to hint an element of this array ?
hint needs a STRING, so if your element is a number or something other, you need to use hint str _blah.
okay thanks so i cant hint one e;ement right ?
can someone remove the "" from https://community.bistudio.com/wiki/createVehicle under alternative syntax, special parameter? It's apparently no longer legal with the enum stuff
I think they should just white list "" instead.
Lots of valid enums are detected as errors wrongly atm.
🤦
i have a do while loop and it seems to only run once every 5 seconds or so
anyone know how to make it run more often?
nvm im an idiot
Good time of day everyone, i am having some trouble with localizations on dedicated server
private _script = [] spawn
{
private _islocalized = missionNamespace getVariable ["var_localized",""];
if (_islocalized == "") then
{
var_text_name = localize "STR_sector_name";
missionNamespace setVariable ["var_localized",var_text_name,true];
};
};
waitUntil {scriptDone _script};
if (isServer) then
{
private _text = missionNamespace getVariable ["var_localized",""];
s_module_sector setVariable ["name", _text, true];
};
//--- TEST
var_test = missionNamespace getVariable ["var_localized",""];
str var_test remoteExec ["systemChat",allPlayers];
//--- Return correct localization, but on map sector name is random
so the result is random every time
what is wrong ?
On local host its working
Trying to make sectors names on map localized for players, by default it will be localized server side, so if server language is english then names will be on english
Random?
with this code above it worked, but localization is random every start, so you have all available languages but not that your client is
is it make sense ?
Is there a better way to store a players items to use later then doing this? //Kit Layout: ["Kit Name", "Kit ID", [[0, "Uniform", ["Items"]], [1, "Backpack", ["Items"]], [2, "Vest", ["Items"]], [3, "Helmet"], [4, "Glasses"], [5, "ExtraItem,ExtraItem2"], [6, "Primary", ["Info"]], [7, "Secondary", ["Info"]], [8, "Launcher", ["Info"]], ["9", "Other Items", ["Info"]]]]
Ignore the numbers behind some of that, thats just so I can organize some data a bit better.
@jovial ivy var_loadout = getUnitLoadout ?
Pshh I knew that 😛 - Thanks
should the init.sqf only be run on the server?
init.sqf runs on client and server same time
@meager heart you localize normally using the local client and not server-side
And still no idea what you mean with random
@queen cargo sorry my english is horrible.... lets say you have client with english language, server is started on zulu, then you have sector name on zulu but not english
Yup
As I said
You localize client-side not server-side
Server-side it will be local to the servers localization
and i'm trying to make it localized client side
player will see name on his language
not server side
or there is some bug atm, dont know
Uhm... Use that code on each client instead of pubvar it from the server?
That what i did
[] remoteExec ["TAG_fnc_localize",0,true]; //--- initServer.sqf
The function is above
seems it working like it should when i call it from the client init not the server...
@queen cargo thanks
I don't know if theres something wrong, but it seems that when im removing the MPHit eventHandler im getting an enum error. This is occuring now but not before. Is this because 1.78 added that error handling?
@tough abyss nope. i used -> _blackWasp = createVehicle ["B_Plane_Fighter_01_F", getPos player, [], random 360, "CAN_COLLIDE"]; no config errors.
anyone getting 'getUnitTrait' errors in the way of 'Unknown enum value:' since the 1.78 update?
:/
damn. is there a known work-around for getUnitTrait?
so it works as it should, just throws error code?
ok. thx.
_myArray = ["true"];
_myOtherArray = ["foo","bar"];
_my2dArray = _myArray + _myOtherArray;
//Result? ["true",["foo","bar"]]
is that correct?
if not how would i achieve that
try -> _myArray + [_myOtherArray]; to get it nested.
okay, im not quite able to test it yet
["true"] + ["foo","bar"] == ["true","foo","bar"]
and
["true"] + [["foo","bar"]] == ["true",["foo","bar"]]
just tested it in debug console.
so like this:
_myArray = ["true"];
_myOtherArray = ["foo","bar"];
_my2dArray = [_myArray] + [[_myOtherArray]];
//Result: ["true",["foo","bar"]]
no. just as...
_myArray = ["true"];
_myOtherArray = ["foo","bar"];
_my2dArray = _myArray + [_myOtherArray]; // <- single wrapped [] as you already have the variable _myOtherArray set as an array.
//Result: ["true",["foo","bar"]]
why is the bistudio wiki so damn slow today
its been up and down like a yoyo for the past few weeks. i tried it earlier as with the forums... both down.
@halcyon crypt I agree with commy that they should just fix "" Thousands of people copied that example and are now doomed because of some crappy decision BI made.. Fixing the example won't help them
@plucky willow
//--- 0.0022 ms
_myArray = ["true"];
_myOtherArray = ["foo","bar"];
_my2dArray append [_myArray,_myOtherArray];
hintSilent str _my2dArray;
//-----------------------------------------
//--- 0.0067 ms
_myArray = ["true"];
_myOtherArray = ["foo","bar"];
_my2dArray = _myArray + [_myOtherArray];
hintSilent str _my2dArray;
i dunno what im doing wrong
_myArray = [[true,false],["somestring",1],["somestring",1]];
if ((_myArray select 0) select 0) then { //should be true
_countArray = count _myArray; //should be 3
for "_i" from 1 to (_countArray ) do {
_x //call some BIS function;
};
};
Error select: Type Bool, expected Array,String,Config entry
Error in expression
why does it expect an array
i want it to be a boolean expression
if(((_myArray select 0) select 0))then{}
Try
No errors here
0 = [] spawn
{
_myArray = [[true,false],["somestring",1],["somestring",1]];
if ((_myArray select 0) select 0) then
{
_countArray = count _myArray;
for "_i" from 1 to _countArray do
{
hint str _countArray;
};
};
};
hint is "3"
extra parens didnt work
it says the error is on this line : if (((_myArray select 0) select 0)) then {
maybe i should just put the actual script in
but im embarassed to
No:
_countArray = count _myArray;
for "_i" from 1 to _countArray do
{
hint str _countArray;
};```
Yes:
{
}forEach _myArray;```
👀
+Why do you hint the same Variable constantly?
cant do foreach since i need to skip the first entry
which is why its set up that way
Still makes no sense
but i think i figured out the problem
i created _myarray by concatenating arrays together
but thats apparently incorrect
That whole thing doesn't make much sense, tbh
The Mainproblem is:
for "_i" from 1 to (_countArray ) do {
_x //call some BIS function;
};```
Whats _x? You don't cycle through the Array with `for`. You simply just execute that code N times
{
if(_forEachIndex > 0) then {
// Whatever
};
} forEach _myArray;
Thats what forEach is for
+you can also do a (in the forEach Loop):
if(_forEachIndex != 0)then{YourCode}```
Yep, Sa
heres the whole thing
_magazines = [true];
_magazineArray = [];
_magazineArray = _magazines + [_556] + [_556nt] + [_9x19jhp] + [_smokeR] + [_he2] + [_556saw1];
if (((_magazineArray select 0) select 0)) then {
_countMags = count _magazineArray;
for "_i" from 1 to _countMags do {
_unit addmagazines [((_magazineArray select _i) select 0), ((_magazineArray select _i) select 1)];
};
};
is _556 and the other Vars known known?
yes lemme grab them
_556 = ["rhs_mag_30Rnd_556x45_M855A1_Stanag_Tracer_Red",11];
_556nt = ["rhs_mag_30Rnd_556x45_M855A1_Stanag_No_Tracer",4];
_he2 = ["HandGrenade",2];
_9x19jhp = ["rhsusf_mag_15Rnd_9x19_JHP",2];
_smokeR = ["SmokeShellRed",2];
yeah i will make that change later
You should do it now, the thing above is just wrong
The Code inside the for loop can stay the same (except using _forEachIndex instead of _i)
getting the same error
Also:
_magazineArray = _magazines + [_556] + [_556nt] + [_9x19jhp] + [_smokeR] + [_he2] + [_556saw1];```
Bad thing to do
```sqf
_magazineArray = _magazines pushback [_556,_556nt,_9x19jhp] etc.```
ill give that a try
All in all:
Work with systemchat str _Var to figure out your Problems (e.g. has _magazineArray the correct look? Is it what you want to look like?)
i want to do something along the lines of
_array select forEachIndex
but thats not working
whats the proper way to do that
_forEachIndex
If you have _forEachIndex then _x == _array select _forEachIndex so just use _x
Unless you select from another Array
alright i swapped all those over but im getting the exact same error i got when i first posted here
Wich is?
Error select: Type Bool, expected Array,String,Config entry
Error in expression
+have you checked if the array is correct (systemchat str _array)
does systemchat str _array go in the debugger or in the script itself
after the array gets created?
Maybe an idea?
inside the loop you can also add a systemchat str _x to see what is currently used
where does it output?
dude, it's a basic command. One you should know. Who made that script you quote in here?
Also Fav this site:
https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3
i wrote the script an hour ago
@still forum Is the wiki working for you?
the wiki has been shit the whole day, cant get any pages to load which is why im asking here so much
Wiki is slow as hell
anyway @plucky willow Fav the Page from above and check for commands in there. Systemchat for example is (besides diag_log) one of the most usefull commands for debugging/error-searching
"today"
systemchat str _this 😄
Dedmen already gave you an answer to it. Checkout (when it's back online) the examples of forEach or at least read what we wrote above
Anyway, as long as you don't even check if the array is correct or not, we can (and will) won't help any further
Since it's just guessing out in the blue
¯_(ツ)_/¯
_magazineArray = _magazines pushBack [_556,_9x19jhp,_smokeR,_he2,_556saw1];
after this
_magazineArray = 2
why would it equal 2?
so should i use append instead?
pushback returns anything?
oO
Hmm... okay oO Must have missed that
why 0?
Just do:
Code1;
_array pushback [bla];
Code2;
without the null ref
@jade abyss No wiki is offline. But me knows everything anyway :U Man I take long to answer...
@tough abyss BIS functions are rarely updated on Biki.. There is a export script but it can only be imported by Admins. And I don't have time :U
it needs to return a bool?
nonononono
Count wants bool or nil
That above should work... hm...
previously pushBack returned Nil I'd guess
If it now returns something that's not bool or nil it will error with count
Since when does count need something? oO
Anyone know how to request reinforcements on editor?
always.. sadly
hmmmmmm
We need a better forEach so we don't have to use count.. How good that we have that already :3
So I have SWAT rushing into a building to take out a single unarmed man and I need reinforcements to make it a lot cooler
But count is still very slow.
count myTestArray 10000
{_x} forEach myTestArray; 16.94ms
{_x} count myTestArray; 10.75ms
myTestArray iForEach2 {_x}; 9.27ms
See! count bad
Still faster than forEach, if you don't need the Index
Actually no @jade abyss
The intercept version is only 1.5ms faster?
{_x; true} count myTestArray; 18.64ms
{_x} forEach myTestArray; 16.94ms
{_x} count myTestArray; 10.75ms```
So what is true? ^^
Remember you need to return bool or Nil.
yo mama needs a nil
Otherwise error. And if you don't already return a nil you need to call a command to give that to you which makes it even slower than forEach
+i can't remember using bool or nil in a count loop..... hmmmmm
Where's your implementation of iForEach2 @still forum ?
sec
I'm injecting a custom script instruction. Because _x = value is too slow. Because BI fucked up again
You could over 2x speedup assignments to local variables with just one line of code in the engine. But... BI.
write your own game 🤓
Or 2x speedup all variable assignments even global ones. By just doing a check at compiletime instead of runtime
You mean because it uses CBA?
one sec
is a knowledge of python valuable in anyway to scripting for arma 3 or just C++
The basics can work without CBA. But alot of eventhandlers won't work
@tight marten none of it
😦
sqf is a mix of several languages
Though I don't use any of these eventhandlers besides pre/post init. Which I could move to non-cba...
I think thats the easiest way to describe sqf^^
fair enough
Java, C# and some other stuff mixed together in a blender
lol
You wouldn't really see anything of the server using Intercept though
I doubt anyone will notice a big diff
Likely not at all.
depends
0.1ms vs 0.05ms -> Client won't notice
I am not talking about an overhaul of everything, where you squeeze every little ms out of a codepart
100000 times 0.05 ms a frame is 5 seconds per frame 🤔
^^
+If you need to do a code that runs 0.1ms each frame... erm... you did something wrong^^
I might be able to disable the part of CBA that enforces it on clientside with an optional addon. So you still run CBA and Intercept on Server but the client won't be forced to have it
@tough abyss
https://i.imgur.com/oYIKfaT.jpg
Nice windows style.
long long time ago, when an Arma Patch broke half of the stuff again^^
OldSchool-Windumb @little eagle
@tough abyss People been suggesting to have one such turret at each base
windows 3.1 bitch 😉
Win98se
Fits SQF.
Or let the ppl drive the Truck from the base to it, be there, wait 10s, Turret is refilled 😉
thats life ¯_(ツ)_/¯
Beep boop time to die
Is it possible to edit extCameraPosition for a class CAManBase during the game? I want to try adding shoulder switching to a customized third person camera (and no, attached drone does not work in a way I would like this whole thing to function)
No you can't edit config entries while the game is running
any idea how to have a customizable 3rd person camera that wuld function with all the crosshairs and stuff? I was told you can create cameras and such
you can create cameras, but custom controls are a PITA
there's two types of camera that I'm aware of : camCurator - used in the Endgame Spectator - and the legacy camera that has fewer features but can do smooth movements
for your case - adding HUD elements to 3rd person view - it's probably easier to draw them onto normal 3rd person screen
I just want to change the point of view in third person, but in a way that would allow for shoulder switching
with extCameraPosition you are forced into only one setting (shoulder)
Hello, I'm trying to create ACE interaction actions.
I created one named "animations" and I'm trying to add another one as its children.
animations = ['Animations','Animations','',{''},{true}] call ace_interact_menu_fnc_createAction;
stand1 = ['Stand 1','Stand 1','',{_player switchMove 'relax_11'; _player playMove 'relax_11';},{true}] call ace_interact_menu_fnc_createAction;
[player, 1, ["ACE_SelfActions"], animations] call ace_interact_menu_fnc_addActionToObject;
[player, 1, ["animations"], stand1] call ace_interact_menu_fnc_addActionToObject;
Problem is that the children doesn't show up.
You created a Animations node under the ACE_SelfActions node. You need to change ["animations"] to ["ACE_SelfActions", "Animations"]. @tough abyss
That's why this argument an array in the first place.
Should remoteExecCall command throw any exceptions? As I was able to find any syntax errors only using remoteExec
If you do everything correctly then it won't.
I mean,if the script gets executed remoteExecCall nothing pops up
Instead, if I execute the same script using remoteExec,then a bunch of errors appears
has anyone had a problem with Work Drive not finding settings.ini ? It won't let me mount or extract game files because of it
@jovial nebula Both will complain about syntax errors. But on scheduled scripts complain about using undefined variables, storing displays and controls in local variables without disabling serialization and some other things I'm forgetting.
Why do you need to disable serialization if you store a display or control in local variable?
Because display or controls can't be serialized
And all scheduled scripts and variables need to be serialized if you save the game
@still forum Obviously, but I was rather referring to why do you have to disable serialization only if you store it in local variable
Should be the same with global variables
but you can't disable serialization for them
So the answer is probably: Because that's the only place where you can disable serialization
There is no real reason why. Just that with every assignment you make, the game checks if the value is a control or display. Global variables everywhere and local variables in scheduled scripts.
The error message (you have to confirm it) says to use disableSerialization even for global variables and even if the current script has it disabled. The message is just wrong.
The trick is to store the controls and displays in arrays.
Does saving the game also touch UINamespace?
"store the controls and displays in array" lol
Yes, I have an example...
Are they saved and loaded up correctly then aswell?
// initCounter.sqf
params ["_display"];
private _control = _display ctrlCreate ["RscText", -1];
_control ctrlSetText "splendid";
_control ctrlSetTextColor [0.1,1.0,0.1,1.0];
_control ctrlSetPosition [
safezoneX + safezoneW - 0.2,
safezoneY + 0.0 * safezoneH,
safezoneW * 0.1,
safezoneH * 0.3
];
_control ctrlCommit 0;
MyMission_Counter = [_control];
//To change the text:
(MyMission_Counter select 0) ctrlSetText "hello world";
This is a script to make a (kill, money, score) counter control for the mission.
And for simplicity I store it inside an array.
uiNamespace is too cumbersome.
as displays can't be serialized I'd guess the array just contains nil's after loading
controlNull for savegames, but most missions (and mods with scripts) break anyway for savegames.
And your display init script could also just overwrite the array with the new control.
So it's perfectly fine.
Yeah.. None of my code cares about savegames.. Would probably all go up in flames
This one works as long as you recreate the control on savegame load. You have to do that anyway regardless of the serialization thing and my array trick.
The whole error message is just pointless, annoying and super confusing for beginners and anyone else actually.
Thankfully you don't have to deal with it when avoiding the >scheudler
Aside from globals of course.
I just tell the engine that my types can serialize even if they can't just to make it shut up
It's one of the first things I'd nuke when I had access to this games source.
Intercept can. Not thaaat easy tho
With infistar it gives you a k/d scoreboard the whole server can see and then just add a status bar to show money an all that
That’s what did
Thanks for the advice I guess.
Hey guys, so I need help with the RHS_USAF C130J
I got a mission that I am making, where you get flown out with the C130J and it returns itself back to base (using bis_fnc_unitplay).
But the problem is that I don't know how to raise the gears. And the C130 also has lights in the rear (red & green) that indicate when it's good to jump, but idk how to control those.
So just curious if anyone here knows how to at least get the gears up & down (without pilot)
planeOne action ["LandGear", planeOne];
planeOne action ["LandGearUp", planeOne];
No idea about the lights.
Oh nice, that was perfect, thanks (landing gears)
Aww, damn, I'll give the RHS guys a poke then. (lights)
How does the player turn those on?
Using a "Open Control Panel"
It's scripted
What?
I found this ```
if(_v animationSourcePhase _a < 1)then{
_v animateSource [_a,1];
ctrlSetText [_r,"Green"];
(_r call _fCtrl) ctrlSetTextColor Green;
}else{
_v animateSource [_a,0];
ctrlSetText [_r,"Red"];
(_r call _fCtrl) ctrlSetTextColor Red;
};
But It's not exactly telling me what _a is
do you have the rest of that script?
the whole function?
RHS_fnc_c139j_setOption
Is this light turned on by a scroll menu action normally?
Heh, I can't post the whole thing in, wasn't allowed by the discord bot xD
No, only via the control menu (popup menu)
Not familiar with that.
I really like their naming sheme.. _a and _v and _r. Very descriptive. Very compact. And more compact means it's more readable
the function "before" it is RHS_fnc_c130j_openMenu
More compact names mean you can read more of them in a shorter amount of time.
Wait ctrlSetTextColor Green; Are they literally setting a global Variable named Green ?
#define Green [0.1,1,0.15,1]
#define Red [0.76,0.05,0,1]
#define Orange [0.99,0.6,0.04,1]
It is
Lower case macros. 🤢
Phew... Could have ended badly
I think I found it tho
planeOne animateSource ["jumplight", 0]; // red
planeOne animateSource ["jumplight", 1]; // Green
under RHS_fnc_c130j_openMenu | it said if(_v animationSourcePhase 'jumplight' == 1)then{
Yeah, tried it, that's the one :D
thanks for the help tho guys \o
Nice 👍
Miss me with those fake macros
Apparently even set3DENMissionAttributes is affected by this enum "feature".
Enum?
do not get distracted @plucky beacon
just a bug
furiously googling enum
enum
{
a,
b,
c
}```
example
how it would look like
application is: a set range of options
instead of using eg. strings
benefit: speed
but that is not in SQF
They aren't enums in SQF, but that's what they call them in this bug.
Ahem feature.
hey guys, is there any update for the cba_a3 ? 1.78 broke it :[
Just ignore the error message. Every other mod has it. Still works.
I should actually look at the change log, I never checked it
Added: HoldKey Function (executes a user-defined code when a key has been held down for a specified period of time)
Don't we already have holdAction?
Anyone have good Knowledge of .fsm Scripting that i could pick their brain.....i would like to execute a .sqf and my code Fu is weak.
is that #arma3_ai or here? I don't know.
Eh you might as well ask here if it's related to scripts, that poor #arma3_ai doesn't get much traffic.
the .fsm is used for spawning vehicles so i figured #arma3_scripting ?
You can just call sqf functions in fsms etc or run a file like normal
the issue i am having is wrapping my head around the syntax. especially since i know the .sqf works and the fsm works but the exec of the .sqf does not.
You messed up then, its no different unless you are editing the fsm manually in a text editor
guess i should find a fsm plugin for notepad++ then.
Just use the fsm editor and you can write complex code in editor & copy/paste it in. Or save the complex code as a function and call it from fsm
If you are editing manually you, you basically one of the main advantages to fsms
thanks @tough abyss i was able to get the code to load into the FSM editor and it appears to be in proper syntax. but i am back to the drawing board as to why it is not working 😫
Do yourself a favor and don't use that FSM crap. Especially when you're new to SQF.
Sadly i gotta use whats available until my group gets a better coder than me 😃 plus the SQF is for aesthetics anyway. so i am moving on to the next item on my fix list..
From https://community.bistudio.com/wiki/Functions_Library_(Arma_3)#Adding_a_Function
Adding a Function
...
Main benefits:
...
Advanced debugging options
What are those beneficial debugging options for function libraries?
Probably automatically adding scriptName
pl>
188:15 Error Foreign error: Unknown enum value: "Damaged" ``` got this error in my rpt when playing on my server, but my server does not have this code inside it, wtf?
I never use this event handler
but got this error on my screen
What addons are you running?
none
Would double check, should be in your mission or maybe in arma3 code etc...
Its complaining because it should be removeAllEventhandlers 'Dammaged';
yep, gonna test it as soon as possible
ok, it's infistar
when I select godmode, this error appears on my screen
@south pasture they are 🌈 MAGIC 🦄
You made the mistake to write Damage correctly, when the eventhandler only works as "Dammaged".
strange because we never had problems xD
@winter dune if god mode is giving you a error that means the safe zones will do the same if you have them with infistar the security level is 5 change to 1 that error should go away
Also infistar has a discord
They will help with all your needs
I don't see how infistar could fix anything while they are doing everything correctly and Arma is the one messing up
oh this chat reminds me i need to look into code to exclude AI from my Safe Zones. so useful!
With infistar you don’t really need battleye but if you have battleye there will be restrictions
@gaunt root Oh I wouldn't say that :P
Well you don’t just need to save your DB all the time
is allGroups populated in the same order on all clients in a MP setting?
wat are the parameters for the dammaged EH, ik its on the wiki but im unclear as to which version its using
what "version" ?
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Dammaged There is only one "version"
i keep getting an error that says that its expecting only 2 parameters,but the wiki shows like 7
add a diag_log str _this; and see what the you are getting back
aye
You don't get a message "expecting 2.. but got..." from the eventhandler itself
that's caused by your code inside the EH
hmmm k lemme see about that then
Just paste the error.