#arma3_scripting
1 messages ยท Page 284 of 1
Just link the WikiPage next time @queen cargo
I already made that point
but if backpack player returns a string then how does changing a VARIABLE called B_carryAll_base effect the outcome
If backpack player returns B_carryAll_base
@dusk sage Wait a sec, i might had a brainfart before:
What is isNil ""returning? I mean, he is checking for an empty string. (guessing: Error msg, cause no parameter given)
Then isNil backpack player
is isNil "B_carryAll_base". So if you define B_carryAll_base, then it will be false
reading this will give you the information
that IsNil STRING is checking the variable behind the stirng (in the case of backpack player (eg. B_carryAll_base ) it thus will check if the variable B_carryAll_base is set)
if you never set that variable, isNil will return true
if it was set it will return false
See, the way @queen cargo Was explaining it was saying it was happening before the return of the isNil, not after the return of the isNil.
o.o
So if no backpack -> isNil (backpack player) = true
If backpack = isNil (backpack player) = false
unless you loop through the config and define all the backpacks ๐
Can someone of you guys fkn start Arma?
it is too late (or by now early) for such conversations ๐
And just execute the motherhugging command in the motherhugging Console????
Exactly...... My point is, why was the conversation useful? because the whole point of my thing was to check ALL backpacks ๐
which I solved in about 20 seconds
by just watching a var
Use (backpack player) isEqualTo ""
returns false, because I have a backpack as expected
lol
as I said 10 minutes ago lol ๐
the conversation is happening ... so that you hopefully understand what isNil is doing
we do not want to harm you
hell i do not even want to talk to you
i try to be "nice" recently because ppl wanted me to do
i still think you are a fucking stupid for not even being capable of RTFM ...
Then halds goschen X ๐
Muted troll inc
and do not come back here bothering us with a stupid question
๐คฃ
@dusk sage Again ๐
haha
*impotent
๐ฟ
already can hear him crying over me
(is it wrong that I find this whole discussion enjoyable to watch, like a Benny Hill skit? ๐ )
no
it is never
it is entertaining as hell as usual @night frigate
even as participent
Its not funny! Its war!
as usual @jade abyss ๐ ๐
but now back to my UI editor
@queen cargo The way you explained it made it seem as it was happening BEFORE the return of isNil which was what confused me in the first place, I thought it simply checked the string returned from backpack player not if it was an undefined var as well lol. It makes more sense now, even though it wasn't irrelevant. I guess you didn't really get what I was trying to explain and vice versa xD
(Info: His UI-Editor is like DayZ. He started with that UI-Editor about 1 Year ago ๐ - still in Pre-Alpha XD)
@jade abyss the UI editor also was kinda frozen due to a new gf ๐
Gah
@cerulean whale One thing i also forgot was, that isNil was checking quoted stuff. So yeah, it was correct.
@queen cargo JILL is not a real Person.
wont work together @dusk sage
they are too time consuming
lol so true ๐
I could be playing games 24/7
lmao
๐
Thats why he wrote:
X39 - Today at 8:13 AM
wont work together @BoGuu
they are too time consuming(edited)```
God this chat is distracting
I have a 20 page lab report due in 3 hours, and I've written 5 pages
Sucks to be you then ๐
๐ญ
๐
wanted to get progress on my UiEditor rewrite @dusk sage ... same here with the progress
๐
UI Editor... that would be nice. The built in one is ... interesting. The part that annoys me is that I can't get an existing display to actually load in, even if I save in GUI Editor format. Am I missing something?
Probably
Perhaps I should have said "What am I missing?" ๐
Well, what did you do
created the dialog. ctrl-shift-s to save in format I can save in hpp, then ctrl-s to save as GUI Editor format (which gives me something that looks like a long set of arrays).
no
it is crap
https://x39.io/projects#ArmA-UI-Editor
try this one
not perfect
not containing all controls either
but ... well ... at least it can read your controls in theory
As I understand it, I should be able to copy to clipboard the GUI Editor format (minus the comment lines), and then CTRL-O to make it magically appear in the GUI editor.
ye ... that "magical" part ... i got bad news for ya
heheh
I was putting it into an addon
party hard
2.9GB download for 3 16x16 images
๐ฎ
See... File... Open... that's making sense to me. ๐ This has the basic controls I would need - thanks X39. ๐
will do.
the grid that shows - is that assuming a 1920x1080 resolution, and covers the whole screen?
yup
currently not changible
grid resolution however is (defaulted to 10, changible via the lil textbox bottom)
it is pretty self explaining
Awesome. Thanks.
And last Q for me guys
I done with switch already & want to load it separately...
I can't find equal examples of calling scripts from scripts...
if ((count _###_name_array < 1) || {!((_###_name_array select 0) in XY_XYZ_available_patches)}) then { //no name or no appropriate patch
if (_patch == "") exitWith {}; // no default patch
} else {
_this compile preprocessFile "switch_insignia.sqf"; };```
It's a part of main sqf which would load another sqf... Do i wrong?
Just wanna separate...
Try replacing _this with call. If you need the other sqf to be parallel use execVM
+Why compile preprocessFile ? Why not define it as function?
Cause i totally mess with it. ๐ I'm really not sure.
If the switch insignia script runs more than once, compile preprocessFileLineNumbers somewhere in init sqf. Store it in a handle and then call the handle instead
That way you process only once
class CfgFunctions
{
class aTagIAssignToThatFunction
{
class SomeFancyNameToSortItForYourself
{
file = "scripts\SubFolder";
class MySuperDuperFunction {}; //Means: In folder "Missionfile\scripts\SubFolder" is a file named: "fn_MySuperDuperFunction". sqf | The Function name would be: " aTagIAssignToThatFunction_fnc_MySuperDuperFunction"
};
};
};```
So in your example, it would change from:
```_this compile preprocessFile "switch_insignia.sqf";```
to
```call Yourtag_fnc_YourFNCName;```
All roads lead to Rome
This is my config.cpp (created by original Author), i just added 20th line
Yep
How said X39... "Pastebin thinks SQF escapes like \""
Anyway, thanks everybody who help'd me today. I gotta go for now. Will try to test it later.
Can i post results there?
Does anyone know how to restrict certain guns to players in a MP mission like if you choose a riflemen slot you can only get a rifle and so on or is anyone who knows what I'm talking about up to help us ?
think he talks about the virtual arsenal
in case this is true, the arsenal allows for filtering
though, you have to add those items manually
So you know invade and annex
If you choose rifleman then you can only get a rifle and so on
So the slot you choose
a google search also would have answered you that
https://forums.bistudio.com/topic/182817-how-to-limit-weapons-in-the-arsenal-of-a-box/
Restricts weapons
dude. can you specify like we asked? arsenal?
so the arsenal is white listed based on slot? or is there some other menu for gear selection specific to that mission?
he wants the arsenal limited to certain weapons for certain slots
Yes
So if you go into a sniper slot then when u go to the ammo box the sniper is there for you
But if your a MG then the sniper isn't a option
If you play on the 77th invade and annex they have it
my guess is they uniquely named those units and then maybe spawned local ammo boxes and added virtual inventory to those like X39 described
either way you need to google for white list like suggested
there's some good threads on it. look for those in which a guy named Larrow posted
ye ... more or less
alternativly you can add a variable to the player object limiting the stuff that certain object can receive and then just refering that var in the call filter
but i am too sleepy to get things easy to understand currently
ye sounds more straight forward
Issue: Players killed by a mine (ie. apers mine) get registered as being killed by the weapon that the individual that placed the mine is currently wielding, and the distance the mine killed the player from is whatever distance there is between the dead player and whomever placed the mine. This causes some confusion.
Is there some way to detect that a player got killed by a mine, rather than the minelayers weapon?
this is good info too if you into restricting stuff https://forums.bistudio.com/topic/185176-how-to-disable-saveload-in-arsenal/
@severe pendant depends. Have you examined what the killed eventhandler array returns?
you want to create some weird anticheat @severe pendant mhh?
what about examining the EHs further
tipp: HandleDamage
i think the "hitpart" one returns teh ammo type. not sure. that one is a bitch to deal with in MP though
@wheat bone Solution: have one arsenal PER "class" and hide all arsenal objects except the one that the player of the certain class is allowed to us
@queen cargo I am logging things for "longest shot" kills, etc. but mines keep breaking it, because if you kill a player with a mine at 3000m it is registered as a kill by whatever weapon you currently have equipped
ye defo go for handledmage. hitpart sucks
Basically my guys wanted to have a "longest kill"-competition
But mines are breaking it
One dude has a 12031m kill with an AK74
But it really was a mine :S
@severe pendant Remove mines? :D but yeah as said already, check what handleDamage / hitPart return in their array
If you can find just one reference that the death was not caused by a rifle, then you know how to detect it
rgr
Other question: is there a way to disable the addrating that ace3 does all the time so that teamkills dont cause the AI to kill you?
Does anyone know which libary this texture is stored when you first load up the game? (Not the logo but the lines going horizontal across the screen) https://gyazo.com/ea7e4d9bc9008f92ee8074b2fae34ac6
The closest I got was "\A3\Ui_f\data\GUI\Cfg\LoadingScreens\LoadingNoise_ca.paa" however it has a square in the middle, not the exact texture
define library?
@tough abyss look in the expansions folder. Since this is from..... oh... nvm
Apex is still encrypted in EBO's. If the texture is in there, then its impossible to access it
Atleast at the moment
well you could reference it from within A3
I'm pretty sure it's in a pbo, I've seen people use it in other servers and I got pretty close to it in a pbo. @halcyon crypt I just mean folder
@halcyon crypt that requires knowing its exact path
Or that ^
@tough abyss are you sure it isnt something the game layers ontop on its own?
If not then just reverse engineer the mission files from the server you have seen it being used
No it's it's own texture
@tough abyss what I meant is that the texture gets autoadded ontop if the existing loading screen
scan the config viewer for RscDisplayStart
most obvious guess would be \Expansion\Ui_f\data\GUI\Cfg\LoadingScreens\LoadingNoise_ca.paa
or \A3\Ui_f_exp\data\GUI\Cfg\LoadingScreens\LoadingNoise_ca.paa
ยฏ_(ใ)_/ยฏ
That's the same link I mentioned, it isn't the same texture :{
it's not the same "link"?
The closest I got was
"\A3\Ui_f\data\GUI\Cfg\LoadingScreens\LoadingNoise_ca.paa"
however it has a square in the middle, not the exact texture
@little eagle you know that "\A3\Ui_f\data\GUI\Cfg\LoadingScreens\LoadingNoise_ca.paa" you shown me, it has a square missing out the middle which makes me think it isn't the exact one, any ideas where the complete texture would reside?
When you first load the game it's there https://gyazo.com/ea7e4d9bc9008f92ee8074b2fae34ac6
That is the least of the problems. It's the most beautiful indent hadouken, I've ever seen in SQF.
oh god no please
Who allowed that guy to share my screenshots of other peoples ugly crapcode?
What guy?
That blue guy that just asked what guy
It's beautiful, the world must see.
Ok. You can do anything you want anyway mister goodly2
This must be some kind of obfuscation working on a psychological level. If you open that file for the first time, you close it immediately.
Which is what i did... But then i opened it again to screenshot it
It explains what that piece of code is doing. Its important
ๅทๆฐไธๆฌกๆง็ญๅญๅผน่ฏ -> Refreshing disposable cheese ammunition
Is it just me or do only germans make that joke? ๐ #offtopic
Engrish dot Com
Probably frowned upon in the US if you're living with actual Asians there.
hi, its possible in a condition waypoint box set if blue is detected in obj1 go to obj1 waypoint, if blue is detected in obj2 go to obj2?
If not, how can I set in condition box if obj1 or obj2 is true then go to next waypoint
?
branching waypoints?
Yes, its possible? with or sentence for example?
No, branching waypoints are not possible and you would need a bigger script to get that behavior. Definitely too long for the ingame condition / on act. fields.
@tough abyss Download all in one config, makes it a lot easier to do that stuff
Also use arma tools to extract data so you can actually look at the textures easily
Will help you a lot with UI stuff, especially if you're doing things like loading screen and similar
in triggers you can use multiple conditions to trigger go ON, in condition waypoint I cant set obj1 or obj2=true;?
You can't skip waypoints though
not skip, if trigger obj1 is true then waypoint2 is ON, or if trigger obj2 is true then waypoint2 is ON
And if waypoint1 is OFF, the unit will just wait and not proceed to waypoint2
either one is valid to waypoint2 on
I don't get what you mean, sorry.
what is obj1 and obj2?
obj1 or obj2
Yeah, What are those?
oh, sorry, obj1 and obj2 are triggers
trig1 and trig2
O.K. And what's the problem?
what is the syntax?
trig1 or trig2
???
not
How so?
I dont know
Does it error? Does it not work?
fault ;
Have you defined them as default value false at mission start?
Unless trig1 and trig2 are Booleans it shouldn't work...
Oh then I overread something... Nvm
trig1 or trig2=true;
activated waypoint
Only call sumn trig if it's a trigger please
Better than obj1 and obj2 tho
So much confusion has been caused in the past due to shitty variable naming
Yeah, that throws me off every time.
So many debates about it in this channel too
Can't wrap my head around that, no matter how hard I try.
Weekly
Sorry, all me.
Im outside waiting for a bus. I didn't read everything but trig1 is still a tad better than obj1
Hehe
Better than using "MyVar"
Myvar123 = true
๐
xD
I dont know the correct syntax
I see that.
Senor spark. Trig1 and trig2 are just variables, si?
Tequilla ayayay ariba.
And everyone keeps ignoring you, like always
yes, are variables from two triggers zones
lol that counter
๐
Thumbs up madness ๐
I sees
โ
: point_up :
๐
im mad with editor so, sorry for that xD
Im a mutant. My thumb is my point finger
thankg @little eagle
๐
๐ฉ <-- favourite
๐คฆ
๐ ๐ซ
Those 2 are mine @little eagle
lmao
I don't even know how to "react" to someones message xD
Pffft
xD
Self proclaimed elite
Viva la revolution!
xD
It's time for some communism in here
We sold our Soul, what did you do? ๐
What is yours shall be mine!
Communism = true;
Its Dictatorship here, no chance for Communism
OR capitalism
Nah, that 100% not ๐
CommunistRevolutionStartTime = time + 5
;
It was at the end of a scope pffff
haha
No semicolon needed ๐
_discord setGroupOwner _allPlayers
Shit
_discord setGroupOwner allPlayers;
replace all semi-colon with commas!!!
Maybe i modified that array
@little eagle die
To exclude some
disableUserInput commy2;```
Like @jade abyss
thank you
๐
๐ค
๐
Fixed: Inventory weight of loaded magazines was doubled
That was an issue? oO
Yeah
That's actually realistic. The further away an object is from the center of mass of the holder, the more energy it requires to hold
Loading a missile in a Javelin increases weight a lot
It's just especially noticeable with RPGs
That's why carrying a case of beers is easier when your arms are not straight
Since when was that Error in it?
Are you sure??
No, but it goes way back
when i was playing around with a WeightSystem for Vehicles (and Backpacks) it was okay, iirc... hmm..
~1 Year ago
Having a round in your grenade launcher would make it extreamly harder to wield...
Yeah, the weight doubling was a problematic issue
A 2.6 kg pg-7VL would cause the weapon to have un-even balance...
@nigel wtf, do you think they designed it to have no rocket loaded?
Well...
In-real life situations I doubt any actual trained military force would pre-load anti tank weapons. At least they don't with the CG2/3 for fear of blowing up.
I guess it finally goes down to personal opinion. But I never saw the weight as an issue.
well the wieght of a magazine doubling when you load it into the weapaon is a bit ridiculous
I just made up lies to cower up for it. Called it a feature
lol
Can anyone tell me what exactly global namespace is? A set of variables yes but in what context when for example using this line
_ui = uiNamespace getVariable ["Life_HUD_nameTags",displayNull];
uiNamespace stays between missions. missionNamespace resets between missions.
Both are theoretically Global as every variable in there is accessible by every script
Can you elaborate ?
I can try
Depends on how you define global... Commy can do better.. I gotta watch youtube stuff ๐
Haha thanks :p
A namespace is a container for variables. All variable are defined in one namespace. In theory, you can have the same variable identifier (variable name) used in multiple namespaces and the identifier can even represent totally different values.
The variables only exist as long as the namespace exists.
Like we saw, there is near to no difference in distance and distanceSqr functions performance, but anyone know about distance VS distance2D? I can test for sure, but can't now.
The default namespace is the missionNamespace
The missionNamespace persists as long as the mission exists.
It can be saved and loaded by saving or loading a mission save (savegame).
The uiNamespace persists as long as the game is running.
It's used for stuff that exists outside of missions (e.g. ui - user interfaces)
The profileNamespace persists as long as the profile exists. So it can carry over variables from old sessions.
The missionNamespace contains all "global variables".
Local variables would only exist in the script scope they are defined in and it's child scopes.
There is a different definition for global though and that deals with variables that exists on all machines in multiplayer.
It's not to be confused with global- (alias for missionNamespace-) variables.
They are called public global variables, not sure if you mean that or not.
That's it basically. I'm no computer guy , so it's my layman terms for all of this. Basically the commy school of SQF
I understand what your saying but why wouldn't we just access them variables directly, why put it in a uinamespace
Not sure, since I didn't write that script
But I have an idea.
The missionNamespace is meant to be serialized when saving a game.
This is essential, so you can resume it later.
However, displays and controls cannot be serialized.
Since they are gone when closing the game.
This is the reason why you cannot store them in:
- global variables
- object namespace variables
- local variables in scheduled scripts that don't have serialization disabled (disableSerialization command)
The game does not complain when the controls or displays are stored in arrays that are defined in any of the three above for some reason, but they become displayNull or controlNull when loading the game (after closing it down in some cases)
life probably just says "fuck savegames", we only do MP
And just stores them in uiNamespace, to retrieve them later
Honestly, they probably don't know themselves why they do it. They just copied it from someone else and it's a common way to "get it to work"
Yeah that's why I like to understand why, I like the architecture behind it. Thanks for clearing that up mate. Like you said the missionNamespace is default, if you were to store the ui in global variables would it try to serialize this in missionNamespace as default or am I missunderstanding?
They can't just store it in missionNamespace, because the game would throw an error message in your face.
I mean they could. All they have to do , is to put it in an array. But they don't know that ; )
testvar = findDisplay 46
try this, it complains
(once per session)
It's another dumb check that was meant to be helpful, but is just annoying and frustrating to new modders.
Just like "hurr durr, undefined variable in expression" when using scheduled environment scripts
but..but...the variable is undefined in the expression ._.
This has to be one of the worst design choices of SQF
I mean I get it
But why is it different in unscheduled environment?
Just be consistent : (
You don't get frustrated while scripting
You optimize a macro or function
And you test it and it works. You even have a unit test that you call from debug console
patch done, release
You say your not a computer guy @little eagle that's a nice meme
You get bug reports from people using your API and suddenly it errors!
You spawn your unit test this time and it does error: undefined variable in expression
: (
I assume it does output the error in the RPT file, in an unscheduled environment? It just doesn't do it visually after the first time, right?
It's totally valid to use undefined variables in unscheduled environment
The check only exists in scheduled environment. And getting nil as GameValue by other means (commands without return value) does handle exactly the same way.
It's only referencing undefined variables and only in scheduled environment
call {
_undefined
};
no error
0 spawn {
_undefined
};
error
0 spawn {
isNil {_undefined};
};
no error
Hmm, didn't know it just completely ignored it. But then again I try to keep my variables defined, hehe
Which sucks, because
[_potentiallyUndefined] param [0, <DEFAULT VALUE>]
is such a nice syntax. Errors in scheduled.
I'm at the point where it's harder to deal with scheduled vs. unscheduled than it is with local vs remote in multiplayer
And that's just fucked up
distance2D worth over distance? ๐
what?
oh
fail ๐
well, distance2D compares x,y and distance compares x,y,z but I doubt it's that big of a difference
performance wise
one + z^2 less
I checked it a week or so ago. I found pretty much no difference in speed
player distance [1000,1000,1000] vs player distance2d [1000,1000,1000] - 2d and '3d' output the same speed. i think 2d was occasionally 0.001 ms faster, lool
๐ค
just kiding for sure
player distance [1000,1000,1000] vs player distance2d [1000,1000,1000]
those should report completely different things
z has to be small compared to x and y for them to be equivalents
"output at the same speed"
sqrt(100000) is more expensive than sqrt(10)?
Man, so now we are discussing 0.000001 improvements ๐
No, because 10 is really like 0000010
Ah...
i will try to tun the less heavy code like a=1; and see if i get the same execution time than distance, distance2D and distanceSqr.
If yes, so its a limit in the smallest time it can have, at least on that test.
I think someone fed you the optimization cool-aid ๐
no point in testing, just use whatever you need to use
performance is overrated anyway
exactly ^^
@little eagle the Z value was made high on purpose to demonstrate that even then the difference in performance is pretty much non existent ๐
If you worry about performance...just removing one script call whatever it is gets you atleast a 10 or 20x improvement than what removing one dimension from the distance calculation gets you
if you worry about performance, just use nearestObjects with a 10km radius.
its uses distance2D states the wiki... but... it orders also.
may be for THIS distance2D there is gain
since its internal to the function
not a function
nearestObjects doesn't use distance 2D. it uses distanceSqr and compares that against the squared input distance
At first atleast. Once it has the list of all nearestObjects it sorts it again using distance2D
it was a joke, monsieur. une example of killing le performance, oui oui. ๐
How do you post code like that D:
Well, anyways, I have two scripts there, obviously in reality they live in seprate files.
I am wanting to use them to create a timer
One sets the start time of the timer
The second updates the elapsed time
They would write to two pre-defined global variables, and they would be used server side only to control the game-modes logic / loop
Example :
while {(MODE_RUNNING) && CLOCK_ELAPSED < ROUND_TIME} do { // logic and check other end cons }
The ff_clockStart would get called right before the loop, as well as a call to the clockTimer to setup the elapsed time, should make it zero, even if it alread is.. I doubt I will put enough code between those points for it to add up to a full second.
My question is, I plan on have two teams of five people, no AI, and am wondering what would be THE MOST accurate way, to assure that the information related to that elapsed time, is shown to them, as accurate as possible.
// FIRST FILE, ff_clockSet.sqf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// =============================================================================
// [ff_clockSet.sqf]
// Takes no arguments, can be called to set the CLOCK_START in order to calculate
// time left in the round, or other time managed events.
// =============================================================================
CLOCK_START = serverTime;
_clockStart = [CLOCK_START, "MM:SS"] call BIS_fnc_secondsToString;
systemChat format ["Last Time State | %1 ", _clockStart];
// END OF FILE HERE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// SECOND FILE, ff_clockTimer.sqf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// =============================================================================
// [ff_clockTimer.sqf]
// Takes no arguments, called during the loop in which it manages. It updates the TIME_COUNTDOWN
// to be the elpased time since CLOCK_START was last set.
// =============================================================================
CLOCK_ELAPSED = serverTime - CLOCK_START;
_clockElapsed = [CLOCK_ELAPSED, "MM:SS"] call BIS_fnc_secondsToString;
systemChat format ["Time Elapsed | %1 ", _clockElapsed];
// END OF FILE HERE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
you do triple backtick, then sqf, then new line, then code, then newline then triple backtick
not sure why you annotated me
and no idea what you are talking about
ok
ye ... did not followed that much anymore
D:
?
yeh
The question is not if you can, but if you should.
Did you enter this in debug console?
} else {
#include <switch_insignia.sqf>
};
try that
it probably doesn't like the bits before and after the include
maybe also needs " instead of < and >
No
@ionic orchid same return
" and <> are equal...
@little eagle Yup, same return.
You cannot use preprocessor instructions in the debug console.
You have to preprocess a file if you want to use macros or include etc.
It has to be a .sqf file
No. It has to be in a .sqf file.
Preprocessed via execVM or preprocessFile(LineNumbers)
Only preprocessing can resolve the macros. If you enter the code into the debug console, it already is a STRING in the eyes of the game that will be compiled.
To resolve preprocessor instructions a FILE has to be preprocessed.
@little eagle Any example?
- create test.sqf in your current mission folder
- paste your code in there
- execute via debug console:
execVM "test.sqf"
execVM command will load the file contents, preprocess it (resolve preprocessor instructions like #define or #include), compile it and start a pseudo thread.
Note the: * preprocess it*
It's alive finally guys.
Thanks to @little eagle for his advices.
May i post some results there a bit later & show you how that's work?
In Exile, how can I run a command that, lets say needs to be executed every 60s?
Not really Exile related @warped moon
while {true} do {
//mycommand
sleep 60;
};```
Make sure it's run scheduled though
run scheduled, what do u mean by that, can't I just put it in initserver?
You can yes, initServer runs scheduled.
okay nice, thanks buddy
what do u mean by that
Have a google around the topic, something that has plenty of resources avaliable
will do, thanks ๐
LineNumbers*
wrong as ever ๐
๐ฅ
hey folks
Is there a script for getting some sort of TFAR jammer?
Im trying to debug the real armors mod and I keep getting a script error in this bit in smart.sqf:
if ((true in ([_x] call list_weapons)) AND !(_x in _active) AND alive _x)
game complains that list_weapons is undefined, its a function that has list of weapons and such
smart.sqf: http://pastebin.com/UvEf84fP
functions.sqf: http://pastebin.com/Bi8GZRh2
@thorn saffron that moment when you're on mobile and the links aren't hyperlinked nor can you copy them without copying the entire quote
@sudden delta tfar has inbuilt functions to disable radio I believe... you could use that
@cerulean whale As a radio jammer?
There us scripts to block radio signal if you are out of range. ... you could transform them into a jammer script
If a player with a jammer is nearby then block as if you were out if range
I will have to look into that, sounds a bit complicated though
I want to create an Extension on a Win PC without using Visual Studio. My source code worked in VS but I canยดt get to work in any other IDE (CMake + CLion). Has someone experience wiht that?
@thorn saffron see if list weapon is defined in the debug console
The fnc
If there was an error in the function the function would be undefined
It isn't. That's why the game complains about it.
Yeah. Could be error in the function. Check RPT
got it working, I missed a comma between one of the weapons
@prisma void All the c++ devs are in #arma3_tools
Would someone mind explaining this line of code, I just can't get my head around it no matter how much I read what the functions do
{!(lineIntersects [eyePos vehicle cameraOn, eyePos _object, vehicle cameraOn, _object])}
It's saying the line starts from the the position of the persons vehicle to the position of the object and ignore any other vehicles in the way and also ignore the object we want???
nope, it checks whether a line between the camera eyepos and the eyepos of the target in intersected
we are just ignoring the two objects, because we want to make sure that something else is in the way
What do you mean by that?
Basically if you have direct line of sight to the target.
But why do we ignore the 2 objects we want
if nothing intersects between players camera (cameraOn may be different than player) and the target it returns true
because the model is in the way of the LOS
because We wan't to see if something is between the objects. We don't want the 2 objects. We only want stuff between
if you are laying in the ground and look backwards, your LOS from the eyepos may be intersected by your backpack, and thats what you want to avoid
Or theoretically eyepos is on your pupils. If you have glasses on these might intersect. But we don't care about that
Okay so specifically eyePos vehicle cameraOn returns the eyes of the player driving the vehicle, if this line of sight intersects with the objects line of sight whilst ignoring the vehicle which hes sat in and also ignoring object return true
" if this line of sight intersects with the objects line of sight"
no
Draw a line between the eyes of the player driving the vehicle and the object
just a straight line between the heads of both objects
if the line goes through anything besides vehicle cameraOn and _object then it returns false
like if a wall or a vehicle or a building or anything is on that line it Intersects so it returns false
Does it return false because of the ! operand, are you including that in your answer?
yep
easier: lineIntersects x y
returns if a line between points x and y intersects anything
Yeah I get what your saying mate, thanks for that I just need to understand why in this code now. Cheers ๐
It's nto gonna retrun false though is it?
Or could you say in other words it's going to be true aslong as it doesn't intersect with any objects
lineIntersects returns false if nothing intersects. combined with the ! it would return true if nothing intersects
Yea I'm there now I was tripping on that bit haha thanks
@still forum what would {!(lineIntersects [eyePos vehicle cameraOn, eyePos _object, vehicle cameraOn, _object])} return if the player wasn't in a car?
15:11:22 File life_server\init.sqf, line 70
15:11:22 Error in expression OCOL:Database2:SQL:%1:TEXT2",FETCH_CONST(life_sql_id),EXTDB_SETTING(getText,"Dat
15:11:22 Error position: <(life_sql_id),EXTDB_SETTING(getText,"Dat>
15:11:22 Error Missing ]
Can anyone help me with this?
I'd guess you are missing a ]
I don't see enoguh code so i can't help. Show me that section of the code
Sure
"extDB3" callExtension "9:ADD_DATABASE:Database2";
_life_sql_id = str(round(random(999999)));
life_sql_id = compileFinal _life_sql_id;
"extDB3" callExtension format["9:ADD_DATABASE_PROTOCOL:%2:SQL:%1:TEXT2",FETCH_CONST(life_sql_id),EXTDB_SETTING(getText,"Database2")];
"extDB3" callExtension "9:LOCK";
Uhm... Doesn't look wrong.. But i don't know whats inside FETCH_CONST and EXTDB_SETTING
But macros usually are written correctly ๐
That Database2 thingy. Did you set that in the settings somewhere? looks like it's retreiving something from a settings file
those macros shouldve been resolved at this point, no?
Hey if I would like to pass in an array with say [0,0,0]
Right.. They aren't according to rpt
Would this be suitable then? ```params [
[ "_array", [ 0, 0, 0 ], [] ]
];```
so
That is the params
And then i would do as you said
[ [1,2,1] ] remoteExecCall [ "function" ];
yep
๐
If I wanna make a string into code Im trying to use compile
But it gives me a value like { [ 0, 0, 0 ] }
When I have a string like "[0,0,0]"
Any thoughts?
Ah there we go
call the code block will return [0, 0, 0]
Aah yeah I see lol
in future you can use this too: https://community.bistudio.com/wiki/parseSimpleArray
Thanks Ill have a look
Does anyone know off the top of their head if there is a radio animation that isn't tied to other cutscene actions? I've found some good radio use animations, but they are all tied to part of a cutscene sequence, so I can't use them in game.
@prisma void You haven't really elaborated. Did you give an entry point for the extension? (VS will usually do this for you). Also, like Dedmen said, #arma3_tools is the better place
Hey, how might I make these two switch move animations work one right after the other during gameplay?
S1 switchMove "GetInHemttBack";
S1 switchMove "GetOutMRAP_01Pst";```
Trying to allow players to climb over taller objects without requiring an addon.
Anyone know anything about animations?
If you look in the animations viewer at the two animations, you should be able to see the length of time the animation takes
then just wait that amount of time before calling the next animation
also playMove may be better to make the transition smoother
playMove doesn't work for these animations, I did try it. Okay, so, I use like waituntil?
or sleep?
@hallow timber
I'm not really sure which would work best, I was thinking you could use sleep, but I'm just guessing with all of this
Oh, okay.
There is also a animDone eventhandler ๐
@still forum, it worked! Thanks!
S1 switchMove "GetInHemttBack";
S1 addeventhandler ["AnimDone",{
S1 switchMove "GetOutMRAP_01Pst";}];```
nice, thats a much cleaner solution
Problem is now I have to figure out how to make this crap actually do something other than play an animation. Would you guys recommend like getpos setpos or is there a better way to move a unit?
Right now, the animation plays, it looks fine, until the second animation, then it drops right back where it started, no actual climbing.
you may need to remove the eventhandler again after it fired ๐
No, it was putting back where they started even when I just use one animation by itself.
I mean, you're probably right, but that isn't the cause of this particular problem.
Not the sole cause, anyway.
yep wasn't talking about that problem
yeah animations start from your position. your position doesn't really change while the anim is playing
Just checked what enhanced movement does. He sets the player position every Frame according to the current position in the animation
_poswt = _climber worldtomodel (asltoagl _pos);
_climber setposASL (agltoasl (_climber modeltoworld [_posWT select 0, _posWT select 1, _posWT select 2]));
I don't know what _pos is. I think it is the original pos of the player
It may be enough if you do that once in animDone
@still forum, that's brilliant!
@polar folio 's code
Just set it on the eventhandler. Perfect.
What is the regular default animation state called? Do you know?
switchMove "" ?
Dammit. I knew that. Thanks so much.
Hmm... this isn't working:
S1 switchmove "GetInHemttBack";
S1 addeventhandler ["AnimDone",{
S1 setpos (getpos S1 vectoradd [0,0,10]);
S1 switchmove "";
}];
S1 removeeventhandler ["AnimDone", 0];```
Any advice?
S1 is going back to default animation no problem, but S1 is always returning to default position.
you remove the EH immediately after adding it
I thought that's what I needed to do.
it never fires now ๐ i guess you want to remove it after that setMove, so inside the EH itself
Oh! Okay.
@indigo snow, do you know how to always add one meter forward and three meters up from the object's current facing? Could I get a link or a template?
S1 switchmove "GetInHemttBack";
S1 addeventhandler ["AnimDone",{
S1 setpos (getpos S1 vectoradd [0,0,10]);
S1 removeeventhandler ["AnimDone", 0];
S1 switchmove "";
}];```
Current iteration.
something like player setPosATL player modelToWorld [0,1,3];
Why do we use setposATL, instead of just setpos after getdir?
player might be on a building like some docks
if you use getDir youd have to get his facing, rotate the offset vector, add it to his current position and set him to that
using modelToWorld is more efficient
Okay! Alright... lemme take a crack at this....
modelToWorld returns posAGL which is the same as posATL over land
and im assuming youre not getting into hemmets whilst over water
HAha, yeah. I'm trying to create a mobility script. It's way over my head, but I'm ready to clock the hours.
error in modeltoworld. Expected array.
add some brackets
Don't know what I've done wrong.
S1 switchmove "GetInHemttBack";
S1 addeventhandler ["AnimDone",{
S1 setposatl S1 modeltoworld [0,1,3];
S1 removeeventhandler ["AnimDone", 0];
S1 switchmove "";
}];```
player setPosATL (player modelToWorld [0,1,3]);
Ah, shit.
btw dont remove the 0 EH
remove _thisEventHandler and youll be guaranteed its the right one
I don't understand the syntax.
Also, we have a problem. The modeltoworld coordinates seem to be cumulative. Every time I run it, my object goes higher. First time it climbs 3 meters up, next time he climbs then teleports to six meters, then nine meters on the next attempt.
yea because i think the EH isnt actually getting removed
youre removing the 0 index one eacht time
Why do we do that? What does the zero mean?
so all event handlers get assigned a number and theyre fired in order
so you remove the 0 index (first) one every time
so if it actually has index 1 (second) it doesnt get removed
_thisEventHandler is a magic variable with the right number you need
Ah! Gotcha. That makes sense.
It's working well now! I just have to keep tweaking it to get it looking right.
I also have to figure out how to do keydown and check that there is something to climb, then make it work in multiplayer. Ugh!
for a keyDown youll need a displayEventHandler, which you can add to the main display (findDisplay 46)
Anyone know if it's possible to ressurect a player who has gone to spectator? I'm trying to add a zeus module that would allow us to ressurect players who died for certain reasons.
Main display?
@indigo snow, the wiki for displayaddeventhandler is WAY over my head.
@chilly hull, are you talking about for players who were killed by glitches or something like that?
That would be its primary use. Players fall through rocks sometimes. Tracked vehicles fly into the sky and various other things.
@chilly hull, If you're already using Zeus, consider using the Ares mod. Using Ares, you could just revive the player, then teleport them back to where they died. Might still require a tiny bit of scripting, though.
Ares Achilles is better imo
I'm using Ares, but never saw any tool I could use in it
I don't see any eventhandler here.
Time is not synched in Arma
One client can be at 24:00, the other at 23:30.
The slower the client is and the longer they are connected, the bigger the time desynch becomes
skipTime has local effects
And even without the commands, time is not synched.
If you want stuff to happen at a certain time, you monitor the time on the server and if 24:00 is reached, you call a global scripted event.
I doubt Arma has API for that by default.
remoteExec from the server
Predefine the function to remotely execute on the clients beforehand
// init
func = { ... };
there, predefined
it can then rest in memory until called by the server via remoteExec ["func"];
change "func" to whatever you want. With tag of course, since it's a global variable
No need for waitUntil at all
Well one loop on the server I guess
What would you guys guess, how many AI would simulate the load of 50 Players? ^^
cpu and mem ofc, network cant really be simulated that way I think
they do it by magic
yep, well its just a bit harsh to get a good opinion of how the performance would be without having actual players testing it
but it kinda needs to be done
An AI (group at least) does some stuff that a player unit doesn't have to do. So purely by processing time, one AI is more load than a player.
In theory.
Who knows what simplifications they do to AI.
if you expect 50 people to play the mission then it should be easy enough to get 25 to help test it right?
You can't compare that at all I'd say.
that's why you charge people ยฃ25 to play your mission. then tons of people will come
even if I would get 25 people to test it once, I would not be able to get that going every week
try it in debug console
I know, but if you type it in debugconsole then it will show the syntax
then you can just try what types are expected for the filter
The debug console tooltip isn't right all the time either.
numbers or strings would be my first pick
try -1
or 0
nah, just numbers
however
maybe its just time to make a mp stress tester mission
I mean more like: add that thingy to your missionfile on the mission/mod you are developing and then run it
so it doenst need no players
so thats good at least for testing the calculation load (CPS and FPS, memory usage and so on)
Just store the effects inside an array
remoteExec a cleanup function
and that cleanup function iterates through the array with all the effects and deletes them
The whole script with that arrangement should just run locally and should be started by one remoteExec from the server
If you have a "musical arrangement", then you won't be able to keep that in synch with network delay
Hell, even scheduled scripts will desynch that music and the effects
Would someone mind explaining why we do _units-[player]; out of an array for example
_units = _units - [player];```
Removes the player from the array
So it returns any other object but player
What would the array look like if we didn't do that?
Well it would include your player in the array. You player is always the nearest object
Ohh I see
Thanks
nearestObjects[(visiblePosition player)
๐คฆ
XD
What's the style to make RscActiveText show an image?
It works fine with RscText but not RscActiveText
I tried ST_Picture but that only works like stated above, with RscTect not ActiveText
I figured it out. I needed type=CT_ACTIVETEXT
Is there a way to execute a script on button hover?
Thx, @little eagle
Weird, I am trying to set a ' onMouseButtonClick' EVH like this ```SQF
createDialog "HRP_radialMenu";
HRP_fnc_colorRadial = {
player setVariable ["test", 1, true];
};
[] spawn
{
waitUntil {!isNull (findDisplay 5055)};
((findDisplay 5055) displayCtrl 1602) ctrlSetEventHandler ["onMouseButtonClick", "[] call HRP_fnc_colorRadial"];
};
Just for debug purposes
but it doesn't seen to work... Hmm
Anyone got an ideas?
Erm, why don't you assign the action to the button itself?
Instead of using EHs. I am confused
It's probably not working because you are doing onMouseButtonClick, try MouseButtonClick
If you were adding it in the dialog config, like Dscha is suggesting, you'd use on beforehand, if you're using it with an event handler in a script, you don't use on
@jade abyss I'm not actually using that. I'm trying to use onMouseEnter but that doesn't work either, so I was trying that one. and @native hemlock That doesn't work either
Wait, now I restart it again and it wroks
that's weird lol
This was a script
:/
I know about UI. But this was just a script I execed in console ๐
Ik, I've been doing GUI's for awhile. Maybe I put my teamspeak push to talk key in at the very start and didn't notice the script error ๐
prolly
can someone help me with this? http://pastebin.com/SdftMLLA < Error http://pastebin.com/CWChUNxL < Code
Could be a few things
What was the value of _ammocount?
Did you have a weapon? @rocky marsh
Yeah I had a weapon and I had 3 mags, all full up
_fuck = 0;
if(_ammocount > 0) then
{
_fuck = _ammocount / _maxammo;
};
Good evening.
Is there any chance of making a ammo hemmet into a smaller vehicle, like a humvee?
So you can rearm vehicles and turrets with ACE 3
You cannpt change the model of objects in Arma and even if you could, they are both massively different config wise and that would cause all kinds of problems.
No, I think I sayed it wrong.
I would like to have like a "smaller Hemmet". Where you can rearm anything like the normal Ammo Truck
Only doable by Mod (search for "transportAmmo" in the Config.cpp's)
You would like to be able to (ACE) rearm at a Humvee?
Does anyone know the rate that triggers check if units are present?
not sure but I think triggers are supposed to be per frame
Strange, my trigger would only activate if I went slow enough
iirc 0,5s
fuck
Any way to make it quicker, or do I need to add a onEachFrame thingy and check the positions manually?
For what?
Racing
Clientside, per frame EH, tiny 5m Radius Check or so
kk
conditionStatement is evaluated every 0.5 seconds regardless of anything. If you have created a trigger, it is already evaluating its condition every 0.5 seconds.```
I'd recommend inArea or inAreaArray with markers.
https://community.bistudio.com/wiki/inArea
Is addMissionEventHandler local?
Yes.
hat hier jemand plan von altis Life 5.0 ?
English please.
AL? ๐บ
need help on Tanoa Life 5.0
I made new items (modelling) > Goldbar and a new shop to buy and sell.
My goldbar is a magazine and i cant sell it. This item isnt in "your inventory"
i think, the problem is this "_iS = [_x,_itemArray] call TON_fnc_index; in the fn_weaponShopFilter.sqf
_is = -1 and i dont know why
check the function to see why it returns it
merci
To set an agent locality to server i can use _agnt setOwner 0;?
Server id is 0?
@tough abyss oh my! Tremendous bug in my part!
Thanks!
I was using 0. This explain nuts situation.
@tough abyss in truth i saw that somewere, but not give credits: "server on 2?? Naaahh..."
And keepet using 0.
__SERVER__
SERVER______
i just added 20 _ + SERVER + 20 _
20 underscore + SERVER + 20 underscore
lol
and it worked
\_\_SERVER\_\_
try this
___________________________________SERVER_______________________________________________
lol
@tough abyss can i use _agnt setOwner __SERVER__;?
What's with everyone using isEqualTo instead of == ? ๐ค
It is slightly faster than ==, especially when comparing Strings
I guess this line might be the reason
I guess case sensitivity might reason why it compares quicker
isEqualTo might be dangerous for entities
entities?
yes
comparing two null entities will return true
its a useful trait of null is that its not equal to another null
simply replacing every == with isEqualTo might potentially break something
Also I guess _a != _b should be faster than !(_a isEqualTo _b) ?
the less commands the better
This dont work as i want (code exec in server) _agnt enableSimulation true; _agnt setOwner 2;, but this _agnt enableSimulation true; _agnt spawn {_this setOwner 2;}; works as i want. Any problem on that i need to consider? ๐ Thanks! It will be used many times, when the agents don't have a target and fall back to the server.
Seens the first command take some time to happens..
Can you even setOwner 2 if server is not player? ๐ค
@tough abyss ok, but in the tests it returned true so it worked, but not update the object imediatily.
Or was it fixed in A3?
setOwner 2 wasn't working on dedicated server
But I recall some talk about fixing it in A3
Fixed in rev. 129204.
yeah, fixed in A3
Feb 2015
2 years ago
@tough abyss Do you happen to spawn said _agnt on the same frame?
I recall there was issue with changing owner on same frame with entity creation
Only through scripts, client physically doesn't know other client ids
@meager granite zombies are created on server and have server locality, when they engage on a player, the zombie locality is transfered to the player machine and i use _zombie enableSimulation false on the server. When the zombie is not on engage anymore, its locality is set back to the server, this is when i use this code on server _zombie enableSimulation true;_zombie setOwner 2; but the zombie get teleported to the place he was when i disabled simulation.
if i exec that _zombie enableSimulation true;_zombie spawn {_this setOwner 2;}; the zombie don't get teleported.
So the issue is teleporting, not transfering locality?
Yes, is teleporting, and it teleport because for the server the zombie is still on the place he was when i disabled simulation.
When you disable zombie simulation on server it no longer updates its position there from messages received from client
The problem about setOwner was solved already thanks to @tough abyss.
So when you transfer it back to server, server's position becomes real entity position
which was where you last disabled the simulation
Yes, but i enable simulation right before setting the ownerit.
if you do spawn setOwner, there is a small time frame where position finally updates to whatever server got from real zombie owner
Otherwise you instantly change locality and whatever server knows about zombie state becomes actual zombie state
Any problem in using the code that works, with the aditional spawn? During a server time, 4 hours more or less, this can happens 1000+ times.
and server only knows about last position on the moment of enableSimulation false
Practically it shouldn't be an issue
You can try to change ownership on next frame to make sure to avoid theoretical scheduler issues
_zombie enableSimulation true;
server_returnOwnership pushBack _zombie;
on each frame somewhere:
{_x setOwner 2} forEach server_returnOwnership;
server_returnOwnership resize 0;
I can't use a sleep because its unscheduled "place".
spawn creates separate scheduled thread
its unrelated to where you create it from, scheduled or not
So you can use sleep inside that spawn
Thanks, i will leave the spawn on the code.
doubt you need it though
I think my approach with setting owner on next frame might work
Just guessing that 1 frame will be enough for server to simulate the object and apply real position
also, on a 50 fps server and 5 fps server.
Only test will say
I will leave with spawn for now, without sleep inside spawn
If i got reported problems about that, i change things
any easy way from client to get owner of remote unit? for P2P stuff
There is no P2P in Arma. It uses a server-client architecture. Every message goes through the server.
Anyone knows whats wrong with this? ``` class AebianUI
{
class controls
{
class BLUECIRCLE : IGUIBack
{
x = "SafeZoneX + (795 / 1920) * SafeZoneW";
y = "SafeZoneY + (30 / 1080) * SafeZoneH";
w = "(128 / 1920) * SafeZoneW";
h = "(128 / 1080) * SafeZoneH";
text = "media\bluecircle.paa";
};
class REDCIRCLE : IGUIBack
{
x = "SafeZoneX + (1170 / 1920) * SafeZoneW";
y = "SafeZoneY + (30 / 1080) * SafeZoneH";
w = "(128 / 1920) * SafeZoneW";
h = "(128 / 1080) * SafeZoneH";
text = "media\redcircle.paa";
};
class MIDDLEWARE : RscEdit
{
text = "conquest_score_west | conquest_score_east";
font = "EtelkaNarrowMediumPro";
x = "SafeZoneX + (909.166666666667 / 1920) * SafeZoneW";
y = "SafeZoneY + (29.166666666667 / 1080) * SafeZoneH";
w = "(250 / 1920) * SafeZoneW";
h = "(105 / 1080) * SafeZoneH";
};
};
}; ``` The UI is not getting displayed sadly when using cutRsc ["AebianUI","PLAIN"]; or I just didn't understand how UI works
any errors?
Why you have no idd, duration or name defined?
Not sure if these are actually required
Are you sure its in RscTitles?
also try cutRsc with layer number
Any problem in doing that? _obj setVariable ["dmg",0,true]; _obj setVariable ["dmg",0.5,false];
no
Thanks!
@meager granite well File C:\Users\Aebian\Documents\Arma 3\missions\[A]_Rising_Sun.Woodland_ACR\game_dialog.hpp, line 4: /AebianUI/controls.BLUECIRCLE: Undefined base class 'IGUIBack'
if I try to add them via class XY; I don't get an error but its still not shown
Well you don't have IGUIBack class defined to reference it
Are you including any kind of config with base classes?
Check what classes you have there
class RscFrame;
class RscText;
class RscListbox;
class RscControlsGroup;
class RscCombo;
class RscButton;
class RscStructuredText;
class RscButtonMenu;
class IGUIBack;
class RscEdit;
class AebianUI
{
class controls
{
class BLUECIRCLE : IGUIBack
{
x = "SafeZoneX + (795 / 1920) * SafeZoneW";
y = "SafeZoneY + (30 / 1080) * SafeZoneH";
w = "(128 / 1920) * SafeZoneW";
h = "(128 / 1080) * SafeZoneH";
text = "media\bluecircle.paa";
};
class REDCIRCLE : IGUIBack
{
x = "SafeZoneX + (1170 / 1920) * SafeZoneW";
y = "SafeZoneY + (30 / 1080) * SafeZoneH";
w = "(128 / 1920) * SafeZoneW";
h = "(128 / 1080) * SafeZoneH";
text = "media\redcircle.paa";
};
class MIDDLEWARE : RscEdit
{
text = "conquest_score_west | conquest_score_east";
font = "EtelkaNarrowMediumPro";
x = "SafeZoneX + (909.166666666667 / 1920) * SafeZoneW";
y = "SafeZoneY + (29.166666666667 / 1080) * SafeZoneH";
w = "(250 / 1920) * SafeZoneW";
h = "(105 / 1080) * SafeZoneH";
};
};
};
holy batman
but ArmA says that AebianUI not found :x
cutRsc requires displays to be defined in RscTitles
Are you sure its there?
Or are we talking addons here?
Looking at config referencing its addon
I just want some UIs to be displayed in my mission. no AddOn
Is this class defined inside RscTitles in description.ext?
hmm actually not. Wasn't sure if I really need RscTitles for that :x
You do, if you want to use display in cutRsc, you need to have it in RscTitles
Displays outside of it can be used for dialogs (createDialog)
_keyDown = (findDisplay 46) displayAddEventHandler ["0x1A",;"hint str _this";objecthidden true;]
_keydown = (findDisplay 46) displayAddEventHandler ["0x1B",;"hint str _this";objecthidden false;] Can someone tell me what is wrong with this (im new to scripting and this is supposed to be an early version of a stealth script)
everything wrong
This is the list of events you can add to display with displayAddEventHandler command
Since you want key presses, use KeyDown event handler
ok
myKeyDownFunction = {
_key = _this select 1;
if(_key == 0x1A) then {
player hideObject true;
};
if(_key == 0x1B) then {
player hideObject false;
};
hint str _this;
};
(findDisplay 46) displayAddEventHandler ["KeyDown", {call myKeyDownFunction}];
Here is what I guess you wanted to do
Do you call this from init.sqf ?
yeah i was using arma edit without knowing what to do
When unsure, search for command and see how it works:
https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3
ok thanks for the help
Hey guys, is there any way of getting a resource title ctrl to resize itself automatically depending on how much text is inside it?
Is there a toggle for true and false for this myKeyDownFunction = {
_key = _this select 1;
if(_key == 0x1A) then {
player hideObject true;
};
if(_key == 0x1B) then {
player hideObject false;
};
hint str _this;
};
(findDisplay 46) displayAddEventHandler ["KeyDown", "call myKeyDownFunction"];
it makes an annoying sound when i walk
it makes sound because of hint command
ok
No entry 'C:\Users\Aebian\Documents\Arma 3\missions\[A]_Rising_Sun.Woodland_ACR\description.ext/RscTitles/AebianUI.duration'. but I have it set. https://img.knight-industries.org/2017-02-04_20-32-58.png
it says duration in AebianUI, not one of controls
@rotund cypress If you hardcore in at how many characters you need a new line, you can work from that
ok i removed the hint and its not annoying anymore
is there a script published to make every building and all walls & fences indestructable ?
Whats the script to add particles?
hmm not sure what this error should tell me. Google wasnt helpfull /RscTitles/: 'c' encountered instead of '{'
@royal abyss no you can't make fences invincible, you still can destroy them through collision
@fathom cloud look into drop command
The config errors are often ambiguous, can you post where the issue is coming from? @hollow lantern
@sa Matra that realy sucks...^^
https://gist.github.com/Aebian/c73483240597d826f7dc2a26e346799f File C:\Users\Aebian\Documents\Arma 3\missions[A]_Rising_Sun.Woodland_ACR\game_dialog.hpp, line 14: /RscTitles/: 'c' encountered instead of '{'
@dusk sage ^
happens ๐