#arma3_scripting
1 messages ยท Page 264 of 1
Can also happen if you manage to trigger something recursively in the UI ie on listbox changed etc
nope
its just placed in the inventory to delete and item I clicked on and do some stuff with the classname
Try removing stuff from your function until crash stops
Or add until it happens
@tough abyss Yes, your best bet would be to trigger message on client, then send signal to server that message is shown and then do the kick
You could just make a box pop up with an OK button
No need to use GUI message
If you are only using it to tell them about the kick, though
@meager granite thats the joke, it happens even if the function is empty
Then your UI-Code must be broken somewhere.
shouldnt the game tell me then?
Check your .rpts again, from the beginnin
Its Arma.
Don't expect anything directly infront of your screen. .rpt -> First thing to watch.
Maybe its an missguided Class or whatever.
Wich doesn't cause a PopUpMsg ingame, but in the .rpt
Restart the game, go directly to that Sequence. Do nothing else.
thats what I do
Hey guys anyone got a idea on how to make a sandstorm only apear in a area?
execute the function only one the machines where the player is near the center of the sandstorm
and somehow abort it when they move away
trigger?
but it should work on multiplayer so if someone is outside the desert he has clear view wich is a high advantage or not ?
that's what I said
pretty sure the sandstorm function only has effects on the machne where it was executed
pretty sure the sandstorm function only has effects on the machne where it was executed
yeah thats what my problem is ๐
I don't see a way to stop this particular sandstorm script
at least from looking at the mods description
you'll have to edit that most likely
because you'll have to be able to stop the effect at any point
e.g. when a player moves away from the sandstorm area
yeah... maybe a counter script?
that sets the settings to 0
arount the area with a trigger
turn it off when the player leaves the area
turn it on when the player enters the area
you probably want a polling loop that checks the players position and then turns the state on or off
what i try to achive is a look that looks like this if u go into the desert: https://www.youtube.com/watch?v=jKMA-ESDDn4
you probably want a polling loop that checks the players position and then turns the state on or off
this is all you need
dunno if that partical script looks anything like the video does
I don't trust videos
you can put really cool shit in videos
nah its from a diffrent game ๐
but if it works in an actual playing environment... that is a different question
I didn't even look at this tbh. It's not important
I dl'd the script, but see no way to turn the effect off
oh
I think it's simple
AUSMD_sandstormenable is boolean. If it does what it says it does then you could use that
0 spawn {
for "" from 0 to 1 step 0 do { // fast while {true} alternative
sleep 5;
AUSMD_sandstormenable = player inArea "mission_sandstorm";
};
};
and then create a marker named "mission_sandstorm"
can be made invisible in the final mission
@royal abyss wake up
hmmmh
Ok so I guess I just needed to move some classes to the ControlsBackground
how ever, there is still one thing I need to figure out
the game crashes when you put something into an inventory of an object that is not globally simulated but locally
duh
Senfo - Today at 6:27 PM
well at least they are known... my game keeps crashing when I spawn a function via onLBDblClick ...
And it drives me crazy
Dscha - Today at 6:29 PM
My guess: Something wrong in the UI, i had that also a long time ago.```
๐
it's annoying that the game gives so little information when something is erroring
Hi guys,
Is there a reason
if ((!_target getVariable ["playerSurrender",false]) && (animationState _target != "Incapacitated")) exitWith {[format["The target have to surrender or be knocked out."]] spawn FLF_fnc_smallHint;};
why that wouldnt work?
I get an missing semicolon error
I know
but
not breaking it
Thanks guys
@rotund cypress It really is, if you add about 2000 particles
Your FPS will suffer a lot.
And the drop-interval also effects this.
A drop interval of 0.0001
is more costly than 0.1
etc.
drop interval = how often per second all those particles get spawned ?
Wait what? @tough abyss
@tough abyss thx fo that
that sounds super interesting
18,000 Particles is the engines hard limit
If you look in A3's config-viewer in game.
You'll find definitions in the weapons classes
on how many particles are allowed.
how about lowering that number, for performance ?
I do know however.
That Particles from gun-fire if there is enough
probably get very close to that 18,000 limit
As you will see extreme FPS drops when AI opens fire.
Which is quite interesting really.
Makes me think there is room for optimisation maybe for particle effects.
@noble juniper They could do what SpaceEngineers did
and move particles to GPU calculation explicitly.
Oh yea, that be great.
@lavish ocean Is particles calculated on the GPU or CPU?
or is it a hybrid system of both GPU / CPU?
I think I found the answer.
@noble juniper I think not sure but pretains to PhysX
So it's CPU calculated.
ArmA 3 only has non-APEX physX
@tough abyss if I have format in say 20 players FPS will suffer very much?
Create the particles where you'll have the mission only.
Particles?
@tough abyss what do you mean with ArmA 3 only has non-APEX physX
i know arma got a graphics upgrade with APEX.
APEX-PhysX is also known as GPU accelerated PhysX
arma 3 uses exclusively non APEX-PhysX
which is non-GPU accelerated
ARMA 3 Bohemia Interactive Released [CPU Only]
Even if you enabled your GPU to do physX calculations ArmA 3 can't use GPU-Mode
but everyone has the basics of APEX so everyone is one the Arma 3 Apex version !" ?=
ArmA 3 APEX refers to the "Expansion"
Not the Physics .dlls
If you go into your ArmA 3 folder
You'll see 2 dll's related to physics
PhysX_x86.dll etc
im looking for it
Just not .dll format
Interesting thing to note PhysX has 2 types of .dll's
x64 and x86 varients
the 64bit binaries may also improve the performance of physx
As BI would be able to use the x64 versions if the game became 64bit
There is actually when I really think about it
A lot of improvement potential from 64bit binaries
memory isn't just 1 benefit
Hey, if I want to do my GUI script as Bohemia do their code: E.g.: having it not like a function and just a file (.sqf) and just a dialog?
@tough abyss but here is more to 64 Bit architecture then just memory addressing.
I know
Register size
Internally without worrying about the details
EAX instructions can be replaced with RBX etc.
Tried changing the center of mass?
via script?
Did that and got SUV's to stop flipping upsidedown
doesn't help. the PhysX is broken, not the models
At high speed.
ehm, there is a DLC planed for Tanks and they probably do that for that
I am not sure why tanks flip when hitting things...
MP or SP?
Hahah
Since 1.42
Do you guys know how Bohemia does their scripts in one file called like RscDisplayScript.sqf and then one file called RscDisplayScript.hpp
Without any config classes or anything
a .hpp is a config
de-binarize the global config
a .sqf is a function/script
I know
It has everything in it
But they dont specify the functions in a hpp or cpp or anything
inc?
But they dont specify the functions in a hpp or cpp or anything
Does that stand for include?
I think I know what you mean
shh Geek
You want to know how they manage to execute a script when a dialog is created, JimZor?
Yes
onLoad event handler
^
BI uses a shitty framework
@tough abyss where should the physX dlls be ? i have found BEclient.so s so they got BE on linux now ๐
that cannot be used by moders
but you can easily use a onLoad event handler
just a config enty:
onLoad = "_this call whetever_fnc_blah";
works for displays/dialogs and all (most?) controls
_this select 0 being the display or control
@little eagle Can also use params [];
I want to be able to call RscDisplayWhatever.sqf without having it in like a function config
How do I actually call that?
@noble juniper PhysX.dlls won't be called PhysX.dll's on linux
DLL is window specific
.so normaly
Screenshot the directory?
use call compile preprocessFileLinerNumbers ""<function path>""; then
@tough abyss no just aproximation from teh root dir of arma
but it severly increases the displays load time
because you read a script file from disk, preprocess it and compile it
And then I just define what actions a button should have in that script for example?
@rotund cypress cfgFunctions.hpp
Ofcourse
pre-compile it when the mission starts
no, you should just use a function for it if you want your menu to open more than once per mission
or whatever ui you re doing
speeds up how fast it opens
better end user experience
What would be not as good?
Having it not like a function
@tough abyss tehre is, but i overlooked them, mybe they don't even get shown, had to grep for them
That is true regardless of life or whatever mission you play
I know one of the biggest ArmA servers have all their menus and UI based of off this way
what way?
They use onload eventhandler
@tough abyss libPhysX3Cooking_X##.so
not if you precompile your function
So beforehand?
yeah. like on mission start
@tough abyss im actually blind, 3 .so s all X86 one without any postFix, one cooking, one common
then it only takes a tiny bit longer to load the mission
but during mission the menu opens faster
So I can preProcess one file with a bunch of .sqf scripts in it using include and that will be fine?
no
you precompile your function on mission start
the function being in one file
and then you call that function with the onLoad thing
call compile preprocessFileLinerNumbers "myScript.sqf";?
oh I seee
cfg functions
Okay, lets explain it this way:
my_fnc_Name = {systemchat "hint"};
in the Config:
OnLoad = "call my_fnc_Name";
Better than
OnLoad = "systemchat 'hint'";
than*
*fixed
@jade abyss even in that exact usecase ?
Dscha you explained it like a cave man
Imagine writing a whole script inside the " "
@jade abyss thats what i meant
as easy as possible Commy
yeah but how do i load the RscScriptWhatever.sqf
ah I think i got it now
OnLoad = "WhatEverYouNameYourFunction";
@jade abyss how about OnLoad = "my_fnc_func";
shouldn't it now get the content of that var and execute it, just like the cal ?
or maybe not as a string
you have to put the call there
but
OnLoad = my_fnc_func;
and that containing a string or code
Example for CfgFunctions:
class CfgFunctions
{
class MyAddonClassTag //e.g. SZ
{
class Core //Description, can be anything, just sorting for yourself
{
file = "MyAddonName\MyFolder";
class functionname {};
};
};
};```
Filename:
fn_functionname.sqf in the Folder mentioned above ( "file"
ofcourse
onLoad = "_this call myfunction";
the _this is optional
use it anyway.
or don't
to troll the reviewers
*reworked
the point was to not precompile it every time
^
its crap to ExecVM it all the time
But then I can just use a regular function fn_myfunction.sqf
There 2 ways to make functions as files.
stick it in the cfgfunctions
Thats why -> Check the example i gave you above for th CfgFunctions
then call it by mytag_fnc_myfunction
you forgot the preprocessing part
derp.
that will just straight error
MyFuncGlobal = compileFinal preProcessFileLineNumbers "myScript.sqf";
thanks geekguy
In the init of the Mission/an Addon
onLoad = " _this call MyFuncGlobal"
So it definitely gets loaded
To stay away from the compile Madness -> CfgFunctions
But then I can
1MyFuncGlobal = compileFinal preProcessFileLineNumbers "myScript1.sqf";
2MyFuncGlobal = compileFinal preProcessFileLineNumbers "myScript2.sqf";
3MyFuncGlobal = compileFinal preProcessFileLineNumbers "myScript2.sqf";
stick that in a script
and call it on init?
Just put that in the init.sqf
You better stick with CfgFunctions
It will make it globally accessible.
This will get loaded from start, no matter if you call it or not. You are on the safer side.
ok great
@rotund cypress
mission init? not client init right
@tough abyss @jade abyss sorry for interfering in the above conversation, i was just momentarily confused with when variable content get inserted into something.
VariableContent?!
[myFunc]
that's an array
content of myFunc will become teh content of the array
and i thought about that , and just went overboard
@little eagle Can I give the long explanation of calls?
You can define a function by a simple
abc = {systemchat "bla"};
If you "call abc" -> that systemchat part gets executed.
I feel like it's needed.
if its just for me then DONT!#
@rotund cypress How can I explain this. I am trying to think of an analogue
I understand mostly
I just call the variable onLoad
1MyFuncGlobal = compileFinal preProcessFileLineNumbers "myScript1.sqf";
2MyFuncGlobal = compileFinal preProcessFileLineNumbers "myScript2.sqf";
3MyFuncGlobal = compileFinal preProcessFileLineNumbers "myScript2.sqf";
it's really not that complicated^^
@little eagle If he is not familiar with programming it might be.
so onLoad = "call 1myfucnglobal";
looks good to me
i'm not sure a variable name can start with a number though
that might not work in sqf
And yes, I am familiar with quite familiar with some programming, but this just confused me a bit
First is @rotund cypress is the _this. _this simply means when the onLoad runs it passes what the onLoad returns to the function or execVM'd script you run.
so when you pass onLoad = _this is basically an array of
Geeky, shall I give you a long explaination of why he doesn't need the _this here?^^
so like it could pass a param or whatever?
through _this?
like getting a param from a remoteExec?
in onLoad , _this stores the display/control the event handler is attached to
In an array. ^
you'll need that to edit your buttions
[display/control]
I hate how shitty discord cuts off the closing parenthesis:
https://community.bistudio.com/wiki/Functions_Library_(Arma_3)
Inside your function it may look like this
// Filename: myFunction.sqf
_display = _this select 0;
_control = _this select 1;
So when you call it in the dialog it does this
onLoad = " _this call myFunction.sqf" _this is passed inside it.
well. 0 is only a control if the onLoad is attached to a control and not a display
there is no 1
Already read it
its the same this as cursorTarget call myFunction.sqf
or player call myfunction.sqf
That all I know
_this is a magic variable in most event handlers
Its just the whole concept of doing it this way got me confused with not using cfgfunctions and how it is all loaded
To go even more simple Input -> (Process input) Function -> Output
This cleared it up for me
1MyFuncGlobal = compileFinal preProcessFileLineNumbers "myScript1.sqf";
2MyFuncGlobal = compileFinal preProcessFileLineNumbers "myScript2.sqf";
3MyFuncGlobal = compileFinal preProcessFileLineNumbers "myScript2.sqf";
CfgFunctions is just a framework to not having to do the precompiling yourself
^
I just didnt know how to load myScript.sqf
it does basically the same as you wrote
Saves a lot of time.
OK I see
Okay so to load it you do this
init.sqf
You've got your precompiled go there?
// inside init.sqf
1MyFuncGlobal = compileFinal preProcessFileLineNumbers "myScript1.sqf";
2MyFuncGlobal = compileFinal preProcessFileLineNumbers "myScript2.sqf";
3MyFuncGlobal = compileFinal preProcessFileLineNumbers "myScript2.sqf";
yeah
Now it's available k.
yes
onLoad = "_this call 1MyFuncGlobal";
inside your control
Thats all there is to it.
Yeah, I understand that now ๐
I repeat myself
But I'm pretty sure variable names have to start with a-z
1MyFuncGlobal won't work
Yeah
Numbers are NOT POSSIBLE
Im not using numbers anyways so its fine
Oh yeah thats a common programming thing.
Don't make examples with it
It was just example of different functions
Oh yeah thats a commy programming thing.
Sorry ๐
Fixed it...
don't blame me
xD
Who else?
if it where for me we only had numbers and no letters in the world
I have another question, if you can bare with me ๐
Is it possible to change looks of group hexagons and add say a playername to them?
you can disable the hexagons with the difficulty settings
and then add some nametag script
Cant you add an eventhandler or something for it?
eachFrame displayEH
draw3d to not make it choppy
draw3D evh instead of eachFrame evh?
yeah
Or that
Won't eachframe really downgrade performance?
every script does
draw3D was the one i meant.
Hey, i haven't done stuff in arma for the past 4-5Months, keep that in mind ๐
ok
So'
draw3d on a player with a nametag?
just like you would with normal nametags?
how do I actually get the nametag to show on the player?
@rotund cypress Before you start playing around with that -> You should learn the basics first.
It is possible, but you will run into some limits/problems.
I know how to display actual nametags, already have that. But just above a hexagon
No clue what "just above the hexagon" means
You know the group hexagons?
disable them via difficulty setting
I dont want to disable them @little eagle
I want to show so players can see who it is
the hexagons?
With a nametag
Yes
Group hexagon -> Still be there but with a profileName of player on top
well. it's just as I wrote
I know a lot of basics
You don't know how to register a function^^ Soooooo ๐
I didnt know the preProcess stuff
that is a basic basic though
That is a basic
Not all basics ๐
Yeah ๐
it sure is
Thats why, learn the basics.
how else do you want to script
Do you know how forEach works?
Its a loop
or do you know what forEachIndex is?
nah
gotta know how to turn files into chows for the game to execute
Not rly, you cycle through an array.
by the way, can you add to the array the forEach is iterating through ?
private _inArea = false;
{
if ( player distance (getMarkerPos _x) < 20) exitWith {_inArea = true;};
} forEach _pokemonLocations;
if (!_inArea) exitWith {[format["Your smartphone didn't find any pokemons."]] spawn FLF_fnc_smallHint;};
Did that today
like
technically forEach is indeed a loop
_pokemonLocations = ["pokemon_1","pokemon_3","pokemon_4","pokemon_5","pokemon_7"];
bla = [1]; {bla pushBack _x;}forEach bla;
is that Pokรจmon Go inside Arma? Game - RL - Game - RL inception?
In case I add any variables
inArea -> There is already an command for that
madness
Yes its pokemon go within ArmA
oh boy
i wanna die
oh my gaaawd
Arma is the correct spelling
Okay, everyone has his kink.
on a life server ?
At least, its not LIFE
Okay.. is it for a life server?
Yes
of caue on a life server ...
I am out.
xD
oh no ๐ญ
The point of Pokemon Go was so that people actually leave their house again
and now you wan t to put it inside another video game
D:
Well I mean, I've developed a bit of other missions but I find life to be the most interesting and fun to develop
I find something to be really fun with SQF scripting
And coding life
its interesting, i mean, most of us come from the Life mission
Yes, I recognise your name @noble juniper
liking SQF can only be explained with the Stockholm syndrome
@rotund cypress What from where ?
Im from Stockholm ๐คฃ @little eagle
@tough abyss Can I slap you?
did they implement my indicators in the new verison ?
XD
@tough abyss You spelled "cancer" wrong. Not "Heart" - "cancer"
@noble juniper they did not but your indicators on GH was the way I found you
ah
๐คฃ
doesn't life already have multiple nametags ๐ค
Pokemon in ArmA 3
yes
why you need more?
This is some seriously f***'d up sh**
50% of the LifeServer are pure crap or CopyPasta... sad, but true
49% violate Monetizaion rules...
^
1% ?
Mine ๐ (old)
LOL
"leak"
i mean, you had a good server, do you still have it ?
Nope, i quit.
ah i remember ..
Distrikt41 <-Maybe heard, maybe not.
In the end, i only did that stuff to help some "friends"
Do whatever you want with it.
But... i think its only 1.3 on the Repo, no clue. >1.3 was done by other guys.
It was an AddonServer. Some guys from the "community" took over some files and created their own one, you can download them there (i think they had the 1.4 Files)
Whats the legality of making an addon thats a 2 part system?
that locks the mission folder while a player is online?
?
and sends an encrypted zip / unpacks it on the client side?
Loads all the mission data?
But the player can't open that folder after it's loaded
how?
when you actually go that for of making an adon, you can just encrypt that
SO it's a 2 part system server manager managing heart beats.
between the client and the server
client DC's
Server encrypts the data again.
Can't access the zip
It only keeps the folder open while the client is connected
Why not encrypt that addon, and decrypt through an extension
After they disconnect it gets deleted.
Cause the extension must be load on ClientSide too, wich means -> Whitelist by BE -> Still Easy to edit/Opens up hackergate
tools
as far as i got it from the discussion on one of those forums
@tough abyss what you were saying is only achieveable through a clientside extension. So you basically need to make an addon.
with that addon, you can simply everithing in the way i said.
People hate me for doing it?
@little eagle
but i hope, noone will notice , therfore not hate me
WHAT
Do you think this would work? http://hastebin.com/eqiluditiz.cs
SO how are you encrypting and decrypting the mission Rage?
_units is undefined
_units = _units - [player];
_units is still undefined
oh but then it would be _units = "man";
_units = allPlayers; (or so);
_units = _units - [player]
I didnt make it just remade some old code
@tough abyss i encrypt everything once, after development is done, and the client has amod, dthat contains an extension that contains the decrytion algorythm.
now you need to get the content to decrypt and the key into it. the decrypted stuff comes out
Which algorithm you using?
RC4? AES? BlowFish?
what of those makes sense ?
Depends
Maybe like this then? http://hastebin.com/pajazipezo.cs @jade abyss @little eagle
symetryc of cause
Some algorithms have a high enough throughput to decrypt the data
the throughput should be big enough because native execution
oh yeah
@tough abyss better question is how to get the key and contetn in and out
Will that be fine or?
What means are you using to exchange the key data?
This must require a sockets layer
i'm under disclosure, and if you want to continue, we need to move to a private chat.
Last words, its simpler as it seems
addMissionEventHandler ["Draw3D",{
#define iconID 78000
#define scale 0.8
if (visibleMap || {dialog}) exitWith {
500 cutText["","PLAIN"];
};
_ui = uiNamespace getVariable ["Life_HUD_nameTags",displayNull];
_units = allplayers - [player];
private _index = -1;
{
private "_text";
_idc = _ui displayCtrl (iconID + _forEachIndex);
if (!(lineIntersects [eyePos player, eyePos _x, player, _x]) {!isNil {_x getVariable "realname"}}) then {
_sPos = worldToScreen _pos;
if (vehicle player isEqualTo player): {format["%1",(_x getVariable ["realname",name _x])];};
_index = _forEachIndex;
_idc ctrlSetStructuredText parseText _text;
_idc ctrlSetPosition [_sPos select 0, _sPos select 1, 0.2, 0.65];
_idc ctrlSetScale scale;
_idc ctrlSetFade 0;
_idc ctrlCommit 0;
_idc ctrlShow true;
};
} forEach _units;
(_ui displayCtrl (iconID + _index + 1)) ctrlSetStructuredText parseText "";
}];
That did not work ๐ญ
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
1:57:45 Error Invalid number in expression
1:57:45 Error in expression <#define iconID 78000
#define scale 0.8 >
1:57:45 Error position: <#define iconID 78000
#define scale 0.8 >
I get that error
I only do addons, how would I know
Its an ordinary .sqf file
... that is executed by hard coded engine magic
... but works like a standard .sqf
addMissionEventHandler ["Draw3D",{
#define iconID 78000
#define scale 0.8
Does MEH support define?
doesn't matter where you put it
I tried putting it outside eventhandler aswell
I'd put it on the top of the file or in the header
But, why not:
_iconID = 78000; <- then refering to _IconID instead of IconID
one is resolved once at preprocessing
the other searches all scopes for the variable hash each time
it's better to make statics a static
Maybe i need call compile?
Won't work
omg
Yeah, compile...
debug console doesn't support macros
don't use the debug console to debug
restart the mission
Now I get this error
2:04:48 Error in expression <[eyePos player, eyePos _x, player, _x]) {!isNil {_x getVariable "realname"}}) th>
2:04:48 Error position: <{!isNil {_x getVariable "realname"}}) th>
2:04:48 Error Missing )
2:04:48 Error in expression <[eyePos player, eyePos _x, player, _x]) {!isNil {_x getVariable "realname"}}) th>
2:04:48 Error position: <{!isNil {_x getVariable "realname"}}) th>
2:04:48 Error Missing )
2:04:48 Error in expression <[eyePos player, eyePos _x, player, _x]) {!isNil {_x getVariable "realname"}}) th>
2:04:48 Error position: <{!isNil {_x getVariable "realname"}}) th>
2:04:48 Error Missing )
2:04:48 Error in expression <[eyePos player, eyePos _x, player, _x]) {!isNil {_x getVariable "realname"}}) th>
2:04:48 Error position: <{!isNil {_x getVariable "realname"}}) th>
2:04:48 Error Missing )
if (!(lineIntersects [eyePos player, eyePos _x, player, _x]) {!isNil {_x getVariable "realname"}}) then {
there should be a && or || between the conditions
2:06:24 Error in expression < if (vehicle player isEqualTo player): {format["%1",(_x getVariable ["realnam>
2:06:24 Error position: <: {format["%1",(_x getVariable ["realnam>
2:06:24 Error Generic error in expression
if (vehicle player isEqualTo player): {format["%1",(_x getVariable ["realname",name _x])];};
is that the next error or what?
then not :
if (condition) then {
i had a case before
Of course @little eagle
I had a switch before that is why that happened eksdee
I think you pinned the wrong one
oh shit ๐
Tagged wrong guy
Change it
next error
2:07:53 Error Generic error in expression
2:07:53 Error in expression <Text parseText _text;
_idc ctrlSetPosition [_sPos select 0, _sPos s>
2:07:53 Error position: <ctrlSetPosition [_sPos select 0, _sPos s>
2:07:53 Error Type Any, expected Number
I think it has something to
something to do with it being a string?
_sPos is undefine
because it's defined as
= worldToScreen _pos;
but _pos is undefined
yeah
That I did now but still doesnt work
2:14:12 Error position: <ctrlSetPosition [_sPos select 0, _sPos s>
2:14:12 Error Type Any, expected Number
2:14:12 Error in expression <")) select 2)+.65;
_sPos = worldToScreen _pos;
if (v>
2:14:12 Error position: <worldToScreen _pos;
if (v>
2:14:12 Error worldtoscreen: Type Number, expected Array
_pos = [visiblePosition _x select 0, visiblePosition _x select 1, ((_x modelToWorld (_x selectionPosition "head")) select 2)+.65];
looks like a 3d array to me
2:19:23 11650.3
2:19:23 [3639.33,13109.9,2.2582]
what is the first one?
time
does it still error like before?
worldToScreen [3639.33,13109.9,2.2582]
in debug console ^
[0.0867414,-0.331512]
nope
2:15 Error worldtoscreen: Type Number, expected Array
2:22:15 11822.4
2:22:15 [3639.33,13109.9,2.21457]
2:22:15 WARNING: Function 'name' - d0e5eb00# 1781836: infostand_v1_f.p3d REMOTE has no unit
2:22:15 - network id 2:1985
2:22:15 Error in expression < if (vehicle player isEqualTo player): {format["%1",(_x getVariable ["realnam>
2:22:15 Error position: <: {format["%1",(_x getVariable ["realnam>
2:22:15 Error :: Type if, expected switch
2:22:15 Error in expression < if (vehicle player isEqualTo player): {format["%1",(_x getVariable ["realnam>
2:22:15 Error position: <: {format["%1",(_x getVariable ["realnam>
2:22:15 Error Generic error in expression
2:22:15 Error in expression <Text parseText _text;
_idc ctrlSetPosition [_sPos select 0, _sPos s>
2:22:15 Error position: <ctrlSetPosition [_sPos select 0, _sPos s>
2:22:15 Error Type Any, expected Number
2:22:15 Error in expression <")) select 2)+.65;
_sPos = worldToScreen _pos;
if (v>
2:22:15 Error position: <worldToScreen _pos;
if (v>
2:22:15 Error worldtoscreen: Type Number, expected Array
2:22:15 11822.4
2:22:15 [3639.33,13109.9,2.21444]
that is not an error anymore
why is it in the RPT then?
its because it is an event handler from before
shrug
*most likely
the editor does weird stuff with ui event handlers
lemme try log in and out
they carry over when pressing restart
some of them
always go back and relaod
ร'm going to bed though
gl
now I get this error 2:26:19 Unknown entity: '& {!isNil {_x getVariable "realname"}}) then { _pos = [visiblePosition _x select 0, visiblePosition _x select 1, ((_x modelToWorld (_x selectionPosition "head")) select 2)+.65]'
@jade abyss Do you have an idea of why?
I stopped caring about this conversation ages ago. Because #Altis-life
addMissionEventHandler ["Draw3D",{
_mygroupplayers = group player;
ctrlSetStructuredText [ parsetext format["%1",profileName], [ 0.75, 0, 0, 0.9 ], _mygroupplayers modelToWorld ( _mygroupplayers selectionPosition "Spine3" ), 0.6, 0.6, 0, "", 1];
}];
COuld something like that maybe work?
anything can maybe work if the code is correct
CAN ANYONE HOOK ME UP A SCRIPT TO PLAY MUSIC (3D) FROM A VEHICLE?
@lyric isle playSound3D can attach the sound source to an object
@rotund cypress no. A group is not an object
Is there an all-in-one tutorial for arma 3 (Multiplayer) scripting?
no
also @stable wave http://killzonekid.com/category/tutorials/ KK's tutorials may give you some insight on how stuff works.
probably not if something weird happens
it moves the object towards the direction the object is tild to
Interesting, maybe it does then. What kind of command are you using exactly? And what do you want it to do?
set\getPos(ASL\ATL) use different points for getting and setting position
That's why there is setPosWorld\getPosWorld which takes and sets coordinates without any modifications
Oh we got a command like that too! xD Thanks for the info @meager granite
Page 57 of 57 - Scripting Discussion (dev branch) - posted in ARMA 3 - DEVELOPMENT BRANCH: Wrong? Wrong it was removed? I dont think so. Wrong it was duplicating functionality? This is why it was removed. You said: >playerControlled was added and removed because it was duplicating existing functionality. If I remember correctly you could get the same results with cameraOn. But the changelog says: >Arma 3 1.24: New command playerControlled (like the playe...
fun with mine detectors
regarding ground weapon holders beeing deleted:
https://forums.bistudio.com/topic/151099-scripting-discussion-dev-branch/?p=3119630
Page 57 of 57 - Scripting Discussion (dev branch) - posted in ARMA 3 - DEVELOPMENT BRANCH: Wrong? Wrong it was removed? I dont think so. Wrong it was duplicating functionality? This is why it was removed. You said: >playerControlled was added and removed because it was duplicating existing functionality. If I remember correctly you could get the same results with cameraOn. But the changelog says: >Arma 3 1.24: New command playerControlled (like the playe...
can't remember with whom I was talking yesterday / two days ago
so I assume using setPosWorld will fix it? ... ok thx
Am I right, when assuming that:
((AGLToASL(player modelToWorld _attachPos)) vectorAdd [0,0,_hightOffset])])
would still get the right coordinates to use with SetPosWorld?
if you get hight offset correct
its just: set that object +5 m on z-axis
then no. you feed ASL to a command that expects World
should use setPosASL for that
then I have got the error with vectorUp again
why not tilt the object first and then read it's position?
I like them
((AGLToASL(player modelToWorld _attachPos)) vectorAdd [0,0,_hightOffset])])
_floats = [_newPos] call _isFloating;
buildObject setVariable ["memPlusZ",0];
if (!_floats && !(surfaceIsWater _newPos)) then {
buildObject setPosASL _newPos;
_attachPos = (player worldToModel (getPosATL buildObject));
} else {
_newPos = (AGLToASL(player modelToWorld _attachPos));
_floats = [_newPos] call _isFloating;
if (!_floats && !(surfaceIsWater _newPos)) then {
buildObject setPosASL _newPos;
};
};```
if you blink at that you could think it's some kind of regexp
Is there any predefined way to get the events of:
Arsenal opened
Arsenal closed
Item in arsenal equipped
?
BIS_fnc_addScriptedEventHandler (iirc) ?
will have a look, thanks!
What is _isFloating ?
private _begPos = _this select 0;
private _endPos = [(_begPos select 0),(_begPos select 1),((_begPos select 2) - 0.5)]; //TODO maybe create offsets?
private _ins = lineIntersectsSurfaces [_begPos, _endPos, buildObject, objNull, true, 1];
(_ins isEqualTo []);
};
for what purpose?
checks wheter the object floats in the air (doesnt look so nice if you get a tent floating 5 m above the ground)
everything's bugged in this game, famalarm
in one way or another
but it's 100% more accurate that raycasts
ok, well yeah, since I could tilt the object to be upside down, idk if it would work either
however, thats not the problem (but thanks anyways :) )
In my opinion
which you can ignore
You're using way to many z-offsets
it looks to me "overengineered"
need to solve the problem anyways xD
Any details on how to use bis_fnc_addScriptedEventhandler?
I assume the "event" is the name of a cfgFunctions classname?
yeh. thats how far I got myself. thanks ๐
events are called with https://community.bistudio.com/wiki/BIS_fnc_callScriptedEventHandler
it's basically like CBA events
but no network support
so useless ๐
Had a look at the code of arsenal and zeus, found a couple of instances where it is used, but nothing clear about the namespace I should target.
well, arsenal is local, and I only need local effect, so no CBA here is fine.
there is no namespace
oh. but maybe BIS_fnc_addScriptedEventHandler only works in mission namespace
not sure about that
you should never script in uiNamespace anyway
just use it as function dump
^ imo
Ahhh. Ok i figured it out.
I've never used them, but I think one problem the arsenalOpened has, is that the complete inventory of the player is already removed
Obviously the functions I want to target need to have callScriptedEH in their scripts. So it is not linked to the function classname, (ie. an EH that runs whenerver this function is called)
in my case, the arsenal allows two scripted EH:
arsenalOpened and arsenalClosed
Inside arsenal, yes. there's others:
curatorGroupPlaced
BIS_fnc_playVideo_stopped
respawnTicketsExhausted
dominantSideChanged
ok
pretty neat system to make functionality modular. I like it.
Thx for the pointer to that function ๐
Yep, works splendidly fine ๐
event handlers are indeed nice
especially for modular stuff
but be carefull not to take away the "fun" and "soul" of Arma
What do you mean? ๐
Ignore it. I'm talking to myself again
๐ Worried I might break something? ๐
In this case I just needed a way to re-apply uniform specific insignias such as rank and service branch after arsenal, as it removed them. :/
don't worry about it
if i do
private _a=0;
scopeName "main";
<stuff>
is _a known in scope main?
nvm, issue fixed. forgot to declare a variable in mainscope
Do anyone know how to change the timer on County Jail? I run Critical gaming, and when i jail them 30 min, they spawn in county? But i deleted the county building, so you are aactually spawning in thwe water? But yea, i won't to change the timer to 0 so you can't spawn in County?
@halcyon crypt Allright ๐
Why does the name "Critical Gaming" sound familiar? Must go check the #ip_rights_violations logs (to make sure I'm not confusing them)
Was it a name of some Life community?
Yes
Not all Life communities are bad...
I was the lead coder in one of them and the "boss" spent around 2500-3000โฌ making brand new content...
Page 57 of 57 - Scripting Discussion (dev branch) - posted in ARMA 3 - DEVELOPMENT BRANCH: Wrong? Wrong it was removed? I dont think so. Wrong it was duplicating functionality? This is why it was removed. You said: >playerControlled was added and removed because it was duplicating existing functionality. If I remember correctly you could get the same results with cameraOn. But the changelog says: >Arma 3 1.24: New command playerControlled (like the playe...
intended
fml
3 years of this bug. I could fix it in 10 minutes
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Is it possible to change the CfgSurfaces config on missionside?
It's rather annoying to continously get hatchback sports stuck in sand.
no
@icy raft How do you spend 2500-3000 Euro "making brand new content"?
didn't you know that throwing money at something fixes everything?
is that a Chris Roberts (RSI) quote? ๐
I'm not that familiar with RSI (the space game, right?), but yes? ๐
Yes, now well over 90 Million
๐ฎ
Correction, its over 130 Mil as of this month
that better become the best game ever
Offtopic Guys
@little eagle Is there a way to suspend scripts in the unscheduled environment?
some kind of time based per frame handler would work for that
but as far as I know there's no command like sleep to suspend in unscheduled
CBA_A3 has an executeOnNextFrame
and CBA's https://cbateam.github.io/CBA_A3/docs/files/common/fnc_waitAndExecute-sqf.html https://cbateam.github.io/CBA_A3/docs/files/common/fnc_waitUntilAndExecute-sqf.html which are most likely based around some kind of PFH
hmm that second one is based on a condition
Do you know if you can cause a single [] spawn'd thread to lockup
from too many internal calls?
e.g
[_args] call GG_fnc_functionA;
[_args2] call GG_fnc_functionB;
[_args3] call GG_fnc_functionC;
};
Can too many of calls within calls cause issues?
don't think so, the engine just pauses the script if it takes too long
once in scheduled anyway
and continues it on the next time
not entirely sure but that's what I've been assuming for years ๐
I've learned that even though it's probably redundant if (canSuspend) then { run my code };
Eliminates any problems with non-scheduled vs scheduled
as the canSuspend catches it.
Say I've got a several level deep function
I can put if (canSuspend) at the top effectively
Or I could wrap it into a macro
that macro doesn't make much sense?
if (canSuspend) then {};
vs
if (SUSPENDABLE) then {};
same thing but longer ๐
@open vigil Hiring freelanzers to make your models for you, so you don't have to rip other's stuff ๐
We had a set of artists plus coders (we coders did it free of charge 'cos we love the game and have people having fun ๐ )
#define SUSPENDCHECK() if (canSuspend) then { \
diag_log format ["Suspension Possible: %1",canSupend]; \
} else { \
assert !(canSuspend); \
};
There we go.
Suspension test
@tough abyss aww that's not nice, deleting that post. Now my bit makes no sense
Delete it then ๐
it didn't anyway but still ๐
Pretty sure for that macros to work I needed \ characters
I agree with Senfo that this is more appropriate for OT, but paying for someone to make arma models is against the rules as well.
it is?
@open vigil Please, do explain
Wonder if CBA has a similar macro
I didn't find a section in the EULA that said anything about that part, as we weren't comerzialicing any part of BIS's IP stuff, and were adding stuff we were legitime owners of
I guess it's commercial/monetization use of the engine/tools on the end of the freelancer
They did the model in generic format (Maya/Max/Blender), we did the tranformation in Object Builder
Technically if you commercialised anything to do with scripts
So... They were technicaly making models, we (coders) made them Arma 3 models
Is deemed commercialization
Read ArmA 3's Manual
And the "license agreement in it"
"All code scripts, assets, images, and associated files are owned by Bohemia"
Including the modding interface
and all mods. by extension.
*** All title, ownership rights and intellectual property rights in and to
the Program and any and all copies thereof (including but not
limited to any titles, computer code, themes, objects, characters,
character names, stories, narrative, locations, artwork, animations,
sounds, musical compositions, audiovisual effects, methods of
operation, any related documentation, and addons incorporated into
the Program) are owned by Bohemia Interactive a.s. (the Licensor)
or its licensors. The Program is protected by the Czech copyright
laws, international copyright treaties and conventions and any other
applicable laws. All rights are reserved.
Clear as a day in writing
Yeah... I still don't see the issue. It's clearly protecting all software + art originally owned by BIH a.k.a. legally covering their IP against other ripping their stuff into outside of Arma 3's projects... Doesn't say anything about third parties content...
I know how to read a license...
*** Any related documentation AND addons incorporated into the program are owned by Bohemia interactive***
it does not mean mods are their property
except if they become part of the core program
Yes, and that's in a release bundle, regarding the content already contained int that specific static copy of the product they provide with the manual.
You are granted the use of that interface.
any model you make you keep.
@tough abyss , I believe you are terribly misunderstanding the concept of licensing...
except if you make them from Arma models
I'm an last year engineering student and I've coding for opensoruce license-nightmerish projects, I have studied all this license dilemas for a while now...
But its getting late. ๐ Gotta hit the sack. Bottom line no-one would do mods, if they would not keep their own 100% self created models.
I'm just saying, I've been studying the official version and how to manage this stuff man
I just don't see where is any reference backing up what you are saying in any of the content you have provided. I have been though it many times checking we didn't break the EULA or BI's IP licenses
This belongs to #ip_rights_violations , so if you are still wanting to keep going, we should move there
it belongs in #offtopic_arma so we dont keep bother the scripters. I'm still trying to locate the documentation for you.
@Akryllax#5678 Ah, I missed the key sentence at 10:50 (my time) "They did the model in generic format (Maya/Max/Blender), we did the tranformation in Object Builder"
Nah, @open vigil , don't worry, it just ended in an useless conversation. If there's really any problem, I don't have any problem in talking with BIH, though I'm nout currently active in that community
I'm so sorry for the trouble
Next posts of mine will be about coding, cos right now I'm lost
I'm trying to achieve too much for myself, and it's getting out of hand too quick. Can do it, but's gonna take hell of a time
Is there a way to suspend scripts in the unscheduled environment?
no
well, not without locking up the game
you could emulate pausing... But that's way too complicated
using something like a for loop with step 0
So how are you supposed to stay out the scheduled as much as possible?
?
Most things in arma require some kind of sleep #;
marceldev89 already posted how you'd do that in unscheduled env
but that is a different scope, so you're not suspending anything
the script still runs to it's end
Most things in arma require some kind of sleep #;
I don't think that is true
TFAR script I have needs it
and a waitUntil
to stop, it failing to initialise the radios
Otherwise if there is no sleep is doesn't actually recognize the radio
sounds more like a problem with your setup than actually requiring sleep/waitUntil
bad design
check private messages @little eagle
there's no need to avoid scheduled like the death, if you can avoid it than do so but don't go to great lengths just because. ๐
IMO anyway ^^
It should just depend on the flow of the thing you want to achieve
For example, you could implement a custom EH with a
well. his current setup created unsuspened waitUntil loops every time you closed your inventory that would run forever if you didn't have a specific kind of radio
'''
[] spawn {
if(eventHandlerVariable) then {
[] call fancy_function;
eventHandlerVariable = false;
};
};
that is not an event handler. that is a polling loop disguised as one
And what is a key handler called in reallity...?
the code of the keyhandler is only executed when you press a key