#arma3_scripting
1 messages ยท Page 259 of 1
hmm
_positions = ...
_positions = _positions apply {[_origin distance _x, _x]}
_positions sort true
_closest = _positions select 0 select 1
something like that?
Yeah
hey guys
that's a nice trick to use sort with apply
But at [_origin distance _x, _x] the last element does it screw with the order?
...
i got my server to work but its vanilla
I don't see why it would
i'm following you guys @little eagle and @south storm on the idea's and logic, but cant put it on paper
whats the best tutorial for someone hosting a server
what step is the problem`?
@clear tendon I've taken a break from A3 coding
Been focusing on python.
Taking what I learn there translate it to A3
In any language arrays @clear tendon are like bread and butter
will the mods do will they actually give me money in the game and spawn vehicles and weapons and shit
especially and shit
like will they make them spawn
@covert gulch Google it
cause my vanilla is empty
ive googled it already
all that did was kill my server and give me a headache'
@little eagle The step that I found was the problem
id rather be led by someone who knows what theyre doing
was when I piped in an array using {sort _x } count (_positions)
Those mods are Exile made, and the topics have support
It screwed with the order of x,y,z
Lazy lazy, isn't this unrelated to scripting
that is wrong Adjust
Needs double nesting?
you don't want to sort the x,y and z of the positions
to prevent the data being screwed with?
you're sorting the coordinates , not the positions
it would screw the positions in _positions
because sort actually alters the array
if you don't want that to happen, you could use:
{sort + _x } count (_positions)
so you copy the position before sorting the coordinates
why you would sort the coordiantes in the first place, no idea
apply is totally different from count
Trust me it's a problem I needed to do.
Didn't even know you could do sort + _x
- array just copies the array
has nothing to do with sort
array values are references
Rightio.
_a1 = [2,1];
_a2 = _a1;
_a2 sort true;
_a1
-> [1,2]
vs
_a1 = [2,1];
_a2 = + _a1;
_a2 sort true;
_a1
-> [2,1]
because _a2 and _a1 are different arrays in the second example
in the first one you just copy the array reference
with the second one you copy the array contents
Neat
SQF is a huge clusterfuck now about which commands copy the array and which don't
they used to make everything alter the array reference instead of copy the contents
then they added apply, select and arrayIntersect
now no one knows what does what
@icy raft That code you gave @clear tendon is a visual eyesore. ```
_veh = vehicle (_this select 0);
_returnRoadPos = roadAt getPosATL (_veh);
vector_x = (((getpos (_veh)) select 0) + random(round random 10)) * cos (getDir(_returnRoadPos));
vector_y = (((getpos (_veh)) select 1) + random(round random 10)) * sin (getDir(_returnRoadPos));
_veh setPosATL ([vector_x, vector_y, 0] vectorAdd (getPosATL _veh));
oh and + and - always copied too
visual eyesore, but it didn't give errors ยฏ_(ใ)_/ยฏ
I normally add more lines purely for the sake of readability.
just magically poof disappears the vehicle hahaha
does it work though?
No.
hahaha
it works_ish_
it moves it somewhere in the void
It runs, it compiles doesn't do what it's supposed to do
sounds perfect to me
I'd rather have it error if it doesn't do what it's supposed to, tbh
which do I belong to?
can I have OCD and be nitpicky?
the 0.01%
Missed the strings
So, mexico wins/
Try that @clear tendon
cause none of this makes sense to me
{deleteVehicle _x} forEach candidates
@covert gulch
1: read the wiki how to setup a server, it's in there.
2: read how to setup mods for a server, also in the wiki
3: get mods, configure, have fun!
trying @south storm
Paste it again
I missed a )
What I'd do for a bit of cleverness to see the actual displacement
still missing the perpendicular part
a draw3D handler and link it to the displacement and drawLine3D in it
array vectorAdd array
array must be 3d
no
yes. and this is one reason why the vector commands have shitty names
see what shitty names lead to?
yep... moves it to notepad++
remove them all. not needed
how the hell you guys see that...
OCD and nitpickiness
hahaha, that's been buggin you, ey?
No he's right it's wrong
Random comes first
calculates random value
round, rounds it to the closest whole integer
might as well want to publish this as a script on armaholic when it's actually done and working with all this effort haha
I don't publish any of my scripts
not one.
I wrote a TFAR radio-preprogrammer for our milsim group and sets all our radios when using the press inventory I key and close
sets both LR and SR
I publish all my scripts : (
You da MVP
I run a server 2012 for a milsim group. I also discovered a clever way to spawn AI in Zeus and add them to zeus
using key'd markers
Is it worth start writing my own moveOffRoad function now? I can't sleep anyway
The keys invoke commands when you move them into place
then they initialise auto-patrolling
From the marker as the origin point
apparently AI get stuck if the vehicles die on the road
I'm doing an alternative project
which is what we've been talking about
For magic warfare
@little eagle yep
Sounds weird for arma, but I think it might work
Got the teleport and time freeze going, working on camouflage, astral projection, telekinesis
Reason I designed our Zeus system like I did makes it easy for us to do full fledged zeus missions with dynamic AI
so it's just missing one part @south storm ?
$5 bounty!
If code doesn't work, stepping it manually
one of the best debugging methods.
Hmmm
I just thought of a way to create breaklines
Wrap it into a #define MACRO
use spawn { } waitUntil inside it
Breaks line
@clear tendon Don't mind the matrice notation.
_veh = vehicle (_this select 0); // Get vehicle of unit
_returnRoad = roadAt (_veh); //Get road object
_vehPos = getPos _veh; // Get vehicle position returned in [x,y,z]
_vehPos_X = _vehPos select 0; // Seperate X axis
_vehPos_Y = _vehPos select 1; // Seperate Y axis
_vehPos_Z = _vehPos select 2; // Seperate Z axis
vector_x = (_vehPos_X + round(random 30) * cos (getDir(_returnRoad))); //Get vector displacement in X
vector_y = (_vehPos_Y + round(random 30) * sin (getDir(_returnRoad))); //Get vector displacement in Y
//Set vehicle position after summing _vehPos in [x,y,z] vectorAdd [x,y,z]
/*
[x1 [x2 [x1 + x2,
y1 + y2 = y1 + y2,
z1] z2] z1 + z2]
*/
_veh setPosATL [(_vehPos) vectorAdd [vector_x, vector_y, _vehPos_Z]];
setPosATL --> error 1 elemts provided 3 expectee
done
this addEventHandler ["killed", {_this call commy_fnc_moveOffRoad}];
// init.sqf
commy_fnc_moveOffRoad = {
#define DISTANCE_TO_MOVE 10
params ["_wreck"];
private _road0 = roadAt _wreck;
// vehicle is not on a road
if (isNull _road0) exitWith {};
// get connected road segments
(roadsConnectedTo _road0) params ["_road1", "_road2"];
private _roadDir = _road1 getDir _road2;
// perpendicular in random direction
_roadDir = _roadDir + selectRandom [90, -90];
private _pos = AGLToASL (_wreck getPos [DISTANCE_TO_MOVE, _roadDir]);
_wreck setPosASL _pos;
};
Good old params
how far should they move @little eagle
the define
idk. 10 meters seems to be enough
is how far
yeah . line 3
let me remove the mines and equip myself with a tow
do whatever you need
WHY YOU YELLING?
yeah, no, figured that in the script, didn't see them move in the game, so gimme a sec
blew it up... dead center on the road, stays there @little eagle
CUP
aww
walk on the road
open debug console
and enter:
systemChat str isNull roadAt player
what does the chat say?
false
hmm
you sure that you put this addEventHandler ["killed", {_this call commy_fnc_moveOffRoad}]; into the vehicles init box?
didn't say that you have to do that
it's in the init, let me resave
haha, it works, it's wierd, but it works
boom, teleport sideways, keep burning
that's what you wanted, right?
if not or if you can't find it, don't bother
they have hidden it very well
wait. we do actually have something like that?^^
no, meaning i cant find a page w/ my google-foo
andddd done ๐
Does anyone know where i can find the pop up targets
Also how to respawn VR units when I activate it on a laptop
so this guy
has been teaching me the scripts, how to mod them and how to install mods and adjust mission files loot tables and all that
we've been going 12 hours straight
and we've almost got my pvp server set up ๐
my eyes are drifting into the back of my skull
ErrorMessage: Include file mpmissions__cur_mp.Altis\addons\statusBar\statusBar.hpp not found.
@gilded rover props in 3den editor = location of pop up targets.The add an action to the laptop for respawning units would need some scripting
i lost my statusbar.hpp D:
lol so
we modified files from his server
but we modified some on my server
and now we dont remember which server we were suppose to upload too
we tired mangs
Is there any script to replace Civilian Site module for Tanoa (Apex DLC) or at least Altis?
@icy raft like what VSM did , they doubled the reselution of the texture files , but ill go ask that in texture makers , @zenith bramble I know but how do i script it and I also ment they assests in the config files
what does it do when i spawn something with persistent turned on in infistar
If you know one of the class names use the config viewer and trace down the model or picture path @gilded rover
Sorry I'm mobile or I'd find it for ya in the cfg vehicles on the wiki
@zenith bramble That is actually quite smart I shall go attempt that now
:) gl my friend
would you maybe know how to script the respawns and stuff?
Pm me and when I get home we can chat :)
cool thanks ๐
Give me ideas of superpowers to implement
I already got teleport, camouflage, timefreeze
Speed... Might look into that
Yeah, I was thinking on making a shield that lasts like 10 sec or 2.5 (two and a half deaths) damage
moving stuff without touching it
sounds doable
like in those spooky American movies
invisibility
creating explosions out of thin air
lightning strikes like zeus can do
I made a invisibility script already long ago to spy on possible cheater in my rp server hahaha
Doable in earlier version
@tough abyss it is, with scripting and memory cheats.
Some of them even disable it, causing spectate on them to swap to someone else
Use a PIP spectate to get around that ๐
and invis is ineffective as well, ESP will let the cheater know the admin is there.
Is there any way to export the virtual arsenal attributes of a weapons crate in the editor? I've got a weapons crate setup with VA but I want to limit that by class, which apparently has to be done via script so I was hoping I could just export what I have selected already and chop that up into the sections I need
Dialog question
Is it possible to completely overflow controls in a controlsgroup? Basically i got a bunch of controls in there that i just want to hide outside the controlsgroup if I'm resizing the controls group in height
has anyone made a script so that if you kill anyone in zeus that it doesnt say it was you in the killfeed
i dont know how to script arma. but im pretty sure it would say something like
if player kills player then killfeed - "player was killed"
not too sure tho
do I have to call publicVariable someArray to update a global array if I'm adding a value to it? This is occuring on initServer.
if you would like that value to propagate over the network to remote clients, yeh
remember the quotations ", though
I figured it out @dusk sage ๐ Thanks. The values weren't showing up because I wasn't adding them properly. I dont think I'll have to propagate this particular global value since it'll only be used server side.
for info's sake; globalArray + [_someVar]; didnt work at all; replaced + with pushback and worked fine (order doesn't matter in this case).
Whats the best way to make GUI?
Open eyes, use Keyboard, Use UI-Editor, erm... know what you do. Yeah, thats the best way to do it.
I understand the inheritence side of the GUIs
Alot of people don't use "base class" definitions
Their faults
@tough abyss thats a very broad subject. I suggest you start looking at dialog controls. https://community.bistudio.com/wiki/Dialog_Control
and over-ride them with custom names by using class someAssName: Inherits this
and the type = ##
I am still wondering, why you write that down ๐
what the type number?
- the stuff before
Still: Why? oO
You can have a "skeleton" GUI and use it to build more complex GUI
So the baseclasses deal with effectively error handling
Why did you write that down? Thats what i was asking
Because I've seen a lot of people use nothing like this. RscTitle they mutate it like this.
class RscTitle { type = CT_STATIC };
The type number.
Refers to the GUI type
Ever seen Altis Life?
Why did you write that down?
Last time i am asking, then i am out:
What do you want exactly? Do you wanna know something? Do you need help? Do you just write stuff down because you can?! oO
Whats I&A?
Invade & Annex?
kk
Also their method of spawning the AI is a very processor hungry task
The entire AI is for loops
Then hf with it. Open up the UI in the Editor -> Move stuff around -> Save stuff and overwrite it with your own mod.
wow... after >20 sentences -> The first question
Display what data?
Change what in GUIs?
Well I want to create a new class of Hint box
and?
To display mission status etc?
You wanna know how to Display a text in the center of a screen? Yes/No?
Do you know how to Distplay a text in the Center of a screen? Yes/no?
If "No" -> Start with that.
Okay. Currently the way I&A operates is it uses cfgNotifications which has certain limitations
I want to create a custom notification window with smoother more sleek design
Also cfgNotifications leaves a giant list in the log section in the player diary entries
Do you know how to Distplay a text in the Center of a screen? Yes/no?
If "No" -> Start with that.```
And with that quote, i am out =} hf and gl
(start with something small, get the basics -> Do it. UI is pretty easy, just takes time)
Do I know how to display text in the center of the screen oh, yes I do...
Sorry didn't read what you said
HintC
or TitleText
or BIS_fnc_typeText2 . BIS_fnc_typeText
For cool effect of printing it out letter by letter
@broken mural Is there a way to retrieve the locality of an object or variable?
As in if a variable is assigned to an object
is there a way to get the getVariable and print it out?
you want to know whether or not a variable is server, client or specified client?
or do you want the var name?
or var value? lol
Both
vehicleVarName for variable name
vehicleVarName for variable name (so if I name a box "ThisDamnBox", it'll return "ThisDamnBox"
Owner returns the ID of the client where object is local, otherwise 0.
local returns a bool for whether or not object is local
@tough abyss here's some more info from a far more experienced scripter than I. http://killzonekid.com/arma-scripting-tutorials-locality/
What about getting the a variable from a name space
to display it?
How can you do that?
Do you use diag_log format ["%1",_objectsNameSpace getVariable "MyObjectData" ] ];
?
This needs to allow me to find the values on clients and servers
@broken mural
You should probably read up on namespaces. https://community.bistudio.com/wiki/Namespace
though it appears you can only use _namespace on global variables.
@tough abyss sorry, I'm not familiar enough with the language to assist you on your issue. I've only been doing this for about a month myself.
NameSpaceName getVariable ["NameSpaceVarName","blaVarNotFoundSoThisStandardTextIsHere"];
like:
cursorTarget getVariable ["NameSpaceVarName","blaVarNotFoundSoThisStandardTextIsHere"];
or
player getVariable ["NameSpaceVarName","blaVarNotFoundSoThisStandardTextIsHere"];
etc
@jade abyss actually that goes along with what I'm trying to figure out atm; how can I get the cursorTarget's name? for example, I setVehicleVarName "derp" and I want to get "derp" when I get execute cursorTarget
cursorTarget getVariable ["Derp","StandardTextIfVarDERPIsNotSet"];
On cursortarget:
cursorTarget setVariable ["Derp","MyFancyName",true];
Thanks Dscha ๐
check for setVariable in the Biki
thafuck; Im getting "Error: No Unit" despite having an add action display on that object. Any ideas?
Error: No Unit = Null
aka name is not being set.
Whats the command?
check what i wrote after name cursorTarget
or do you mean what is the code Im using for setting var name?
Oh I need the name set on init so this is a verification. (I'm getting Error Undefined variable in expression when passing vehicleVarName _object to a custom function)
I'll try that one out though.
nevermind that wouldn't make sense on init; cursortarget, that is.
In Init of your Target:
this setVariable ["Derp","Blerps",true];
Ingame:
hint str ( cursorTarget getVariable ["Derp","Banana"] );
might need some more info as I'm not really getting how I can impliment that;
on init, I'm looping through a ton of objects and doing this;
_vehName = VehicleVarName _x; //_x has a custom name I need to carry over to another object -- object is deleted before name is set so no contradictions should occur
later, I'm setting calling this;
_someNewCustomObject setVehicleVarName _vehName;
I've verified this functions using this hint on init;
hint format ["%1, %2", vehicleVarName _someNewCustomObject, _vehName];
testing something now.
on interact, I'm getting the name via hint format ["%1", vehicleVarName _object]; so it appears to be set properly.
hint str vehicleVarName cursorTarget worked, though! ๐
balls I figured out the problem. I didnt save the function file in the right location.
var name is being set and passed properly ๐
yo
guys
what do if i flew off map so far
that now im getting memory errors every time i try to log back in to my server
restart your server or open the map in editor and move player position
If youre talking the literal box, restart the server.
like the machine, not the arma server. lol
i pay for hosting x.x
That sucks. Lesson learned, though; test environment has value. Fire up a VM next time or run from your personal machine
you can all of your mission building locally, just setup the server on your computer and test ๐
is there not a way to reset the memory for a uid
like reset the entire account on a server
cant i just delete the appdata?????????
Hey, does anyone have a decent script for creating map markers for placed in biuldings?
Or should I do the entire thing manually?
placed what in buildings
As in you can put down biuldings as objects in editor. But they obviously do not have a map marker. Things like shops, ruins, similar.
Is there a way to spawn in editor placed units w/ a trigger? Setting the presence field w/ a trigger to change the value obviously didn't work...
@tough abyss should be easy to do. Just use a forEach loop that iterates through entities "Building"
Is there a way to spawn in editor placed units
Aside from using the editor, no. If they are not created with the editor, they are by definition not "editor placed"
maybe i phrased it wrong
Remember. I'm OCD and nitppicky
yes, haha
If i have units which are placed on a map, through the editor. How can you have them 'spawn' when a trigger fires? Condition of Presence field doesn't check a trigger state
I.e: your group activated a trigger, which 'spawns' the editor places units
you can't. if they are placed with the editor, they will exist at mission start already
however
there are probably a million scripts out there that can serialize these placed units
and then you can spawn them in with the deserialization script accordingly
i came around to either jebus or eos, those scripts however only allow script based placing, while i need certain settings which are enabled on these units in the editor.
would be nice if there was something built in.. every coop group has to do it somehow
the only fundamental (unsolvable) problem is that you can't connect triggers with waypoints
because BI
with scripts that iis
ah...
but what wouldn't be a problem if they are set to be grouped w/ already existing group w/ waypoints, right?
in the editor they are already grouped to the group they need to add to.. ๐
but what wouldn't be a problem if they are set to be grouped w/ already existing group w/ waypoints, right?
really depends on your serialization script
you can easily make one yourself and choose for yourself what properties should be stored and restored
waypoints will be a bit difficult
but for the rest there are commands
getPosASL / setPosASL
i'm not sure you usually need to reload event handlers? usually they'd be readded when the new units spawn
getUnitLoadout / setUnitLoadout
etc.
etc.
yeah, Lecks
it really depends
I mean those added via init box for example
yeah
we made a custom init box
because we couldn't get the script from the default one
Yeah, can't really do that
Maybe with an unbinarized mission and manually reading the mission.sqm
yuk
Same for eden attributes
You'd have to serialize all possible eden attributes
true
It's a mess. Fortunately, for ai, you can ignore these most of the time
But these are the reasons why no one has made something like this so far
I think
yeah, you can get most 3den attributes with getvariable, but some of the built in ones don't seem to be accessible
setUnitPos is not a object variable
our 'solution' was to replace all the default attributes with new attributes that can be easily serialized
but yeah.. it wouldn't be compatible with all scripts and stuff.. i don't think we'd release it
And this is why every comm that uses something like this has it's own system
you have to adjust it for what you need exactly
But there should be enough solutions all over the forum already
@little eagle i think i found a workaround, but i have something wierd going on. I cant place anything with an empty variable name, eden throws me an error: encoutered restricted character
perf v10 ?
uhm. dev branch?
perf, not dev
the perf binaries have auto update?
steam allows you to
ah, so it's not me, good, thanks @little eagle
was about setVariable ["",
they fixed it and now you can't place modules without names
just give them a name for now
throwaway name
@little eagle found a way to add them, but is it correct the join and follow waypoints do not sync the waypoints of the group they join? I.e: they join w/ waypoint but dont follow the lead and stay in position where they 'spawned'
they should follow the same waypoint. what did you do? not delete the leader and add the created units to his group ?
jebus spawns them in, could that interfere?
the first waypoint the groupleader has, is join, set on the groupleader they need to join
jebus spawns them in, could that interfere?
no idea
No idea what the "join" waypoint does either
I mean this command:
https://community.bistudio.com/wiki/join
https://community.bistudio.com/wiki/joinSilent
@little eagle only if you use steamclient branch but for anyone skilled i would suggest manual route, to stay in control
sometimes (rarely but it happens) we roll out somewhat more buggy profiling branch (thus performance binary too)
btw the empty variables are fixed both in DEV branch and PROFILING branch (and PERFORMANCE binaries) (v11 fixed the issue vs EDEN)
Hey yow yow! Question time again! Does someone know which are extension limitations for a DLL or where to find them? I mean, BE usually blocks stuff, I want to know what I can and can't do with the extension.
BE blocks all dlls unless you submit yours to them
avoid memory leaks and bugs otherwise all the anti vir programs will block you
Hi, how do i know the world position the cursor is on the map?
For example, if map is on screen and the mouse is above position [1234,8377,0], i want to return this position.
ctrlMapScreenToWorld
screenToWorld
Damn he beat me
lol ๐
damn discord
You can de-pbo
the bin.pbo
to get the binary rapified file with all the GUI data
Find the IDC for the RscMap
doing that vs ctrlMapScreenToWorld... hmmmm
yeah sorry my bad ๐
As I said look at the derapified version of thee bin.pbo
map display is 53
There you go
and the control.... can't remember
(findDisplay) displayCtrl (IDC of map) ctrlMapScreenToWorld [x, y]
Learned a lot about how all the GUI stuff works by derapifiying the binary config.bin
in bin.pbo
All the root classes reside in there.
All addons / addon classes are compiled to that file
private _mapIDD = -1;
{
if (!isNull (findDisplay _x)) exitWith {
_mapIDD = _x;
};
} forEach [12, 37, 52, 53, 160];
And all config data it becomes one big blob cluster F
private _mapCtrl = (finddisplay _mapIDD) displayctrl 51)
The root class will be in the RscMap
_mapCtrl ctrlMapScreenToWorld [x, y]
That where you got it commy2?
that's how we do it in ACE
works for all maps that are in vanilla
SP actually uses a different one from MP for some reason
etc.
wtf
By the way? I came up with a way to bypass map-markers in I&A and now use a primary function that uses NearestLocations
from the map >> "worldPos"
origin point and scans the entire map
Plugs in all the locations
randomises their choice. Will that work on modded maps? Takistan etc?
there are lot of terrains that don't have proper configs but I'd imagine that CUP is good in that aspect
Ah good.
Is it faster to use configs?
to store advanced data?
or arrays in .sqf files?
For example I was slowly replacing the I&A system for displaying objectives and what I did was use my own configs defined
scan through them, add the data on the fly?
getArray(configFile ("RootClass" >> "ChildClass" >> "MyArray");
or my number etc?
I doubt that there's a big difference
Depth of the search I know impacted performance
arrays could be faster because it doesn't have to go through the configs but that's just a wild guess
Deep classes take much longer to find
But anyway thats good it will make piping in the locations configs
to our new I&A easy and my code can be just dropped in
and plugin / work
I also replace the old garbage collector in the AO with a destroyed Handler
Triggered when the radio tower is destroyed && AI count < 4
Being in the unscheduled environment the GC system that way was lightning fast
One of the main problems with I&A
It feeds all units data into this giant queue structure
So it can be used for garbage collection later.
But I could just integrate it into the remains collector now
My work? Good
The main branch?
Don't care.
Was it you that suggested the massive array?
For the building the units list?
You know they eat CPU time a lot?
The one that pumps it into the enemiesArray
Also known as a queue data structure
Ehhhh could be improved.
Make it into a tree data structure 2 seperate systems in parallel
Vehicles / units
Yeah, sucks they run in unscheduled for the conditions
but scheduled for the entire FSM
BMR insurgency?
Seen how many scripts run in that mission?
1120 SQF instances
Simple optimisation I did
Removed a large amount of the squares
made them cover a bigger area so 4 squares was replaced by 1 square of equivalent diameter
One word
Bad clients
Multiple zones activated
Would just kill performance
Same problem existing for liberation. People trigger lots of zones
FPS degrades
Perfect world people go for 1 objective at a time.
So the entire server doesn't explode
As I said you used a queue data structure to manage the AI I found I could make GC clean up lightning fast
using a "onDestroyed" handler on the tower
Garbage Collection
Used your initial code and then replaced it for it's own main script
When the towers destroyed
and the AI count < 4
It runs the forEach script you had,
but I replaced that with count
forEach includes _x _forEachIndex
Sure micro-optimisation
But when the tower dies, and the waitUntil count(ai < 4)
Then runs this the entire AO cleanup
the onDestroyed handler was very efficient
Interestingly I did some profiling on the CPU0
Handlers don't effect the game the same as call
or spawn or execVM
It actually didn't make CPU0 budge much at all.
Most of my missions are now event driven
I also added in my version of I&A BIS_fnc_holdAction for squads > 4 guys to call in a small vehicle support drop
Refreshes every 5 minutes
Yes
Gets caught in the same cycle
if it's destroyed
what if client disconnects? : >
If it doesn't get picked up by the event driven GC
It gets picked up by BI's remains collector
getOut/Man ?
^
I did that once as well
Very effective
The even listening for get in getout works very well
The distance was also tied to a timer
The other optimisation for maintenance I did to I&A was bypassed needing tedious map-markers
Instead the mission runs a check of nearestLocations [worldOriginFromCfg, ["NameCity"], MapSize,true];
2 seperate calls
pipes into 2 seperate arrays after filtering the text(Locations)
and the pos Locations
Then is fed to the createAO code, no more markers needed
Drops the marker and creates the marker on the position of the retrived nearestLocations
No markers meant I could port this to any map
because it gets all the locations on the map
gets their names, and positions drops the CreateMarker on the location pos
I also created a universal function for deleting / adding markers
into 1 script dependent on the type of "condition" fed to it and the data from the locations and pos
so say _Town = [TownPos,LocationNameBigTown,1] call GG_fnc_createMarker;
1 refers to the operation task to delete just change it to 0
Can't right now PC's out of comission
My GTX 980 TI ASUS STRIX Direct-CU-III went for an RA
That floods the scheduler
Every 1 seconds creates a new VM-thread
O_o
What?
bubbles
Particles...
and fish
Of course...
Clocks in trucks flood the schduler
I will try it when I get my PC back
But in Altis Life
I remember logn ago clock.sqf
run about 1 instance
per, truck
So 30 trucks == 30 clock.sqf instances
Why not make a new event ? for time?
Give an interval choice commy2
Make it event handlers managing time
not...
clock.sqf
Hell particles being even driven would be good too
Fun fact.
Even with headless clients active when AI open-fire
the particle effects from the AI's guns degrades FPS
...
on a server ?
Yeah
Client FPS takes a dump
BIS_fnc_ambientAnimals
@tough abyss
Why does the server need to run rain?
I did a hack to do this. remoteExec ["setRain",-2,false];
I wrote my weather system that way.
using only variable data stored server side
states published to clients only
so the server was sunny
clients would receive the state updates.
Wierd stuff happened though.
e.g SimulWeatherSync;
Wouldn't update the clouds
Quiksilver
isn't it the same for every map? or does tanoa spawn extra many fish?
fish are totally unneeded imo. I'd rather have civilians than fish I 99.99% of all missions never see anyways
Although I've noticed I can get some serious speedup in missions using CBA functions
yeah
there is no config entry that influences the rate of spawning animals per map
so it should be the same everywhere
Like QGVAR or GFUNC( or LFUNC()
I know
But more spawned animals = more scripts
But hey. I don't care about scheduler space. I don't use it.
@tough abyss Tried running a script to disable them?
Should for the lulz of it quik use Zeus to add all the fish to the curator
so meh
Just to find how many are around
...
Has anyone tried a Cooperative Networking architecture in A3?
Rather than a client server model?
Cooperative is a system in which nothing is nor a server nor a client
But both distributed between each client
would be annoying to handle disconnecting and JIP players I imagine
@little eagle Yeah your right.... unfortunate though.
As cooperative computing is meant to be the future of networking.
digging to deep for us puny mission / addon makers
that is something that could only payoff if the engine does it
I imagine
Yeah I figured latency would be the biggest issue
Thats why the HC's either reside on the server or close to the server
connected to the loopback IP
127.0.0.1
I actually did a crazy thing quick
I found out you can offload script code using remoteExec
by specificing the HC's ID
you can actually do, what I did as an experiment was to create a HC to act as a server
It worked the server sent the initial message
HC received it, HC executed code
HC then sent [60,1] remoteExec ["setRain",-3,false];
This way the HC sent the weather update
I mean [60,1] remote ["setRain",-2,false];
the HC recieved code like this [60,1] remoteExec ["HCsFunc",-3,false];
in the HC's function it then passed [(_this select 0),(_this select 1)] remoteExec ["setRain",-2,false];
Hazzar cheated multi-threaded offloading with not only AI
@tough abyss
So this meant the HC acted more like a server than a client
Holy sh**
My eyes
Does that do the same thing in?
Altis?
Would making these event driven improve it?
Creating a single event handler per unit?
We need one of these in description.ext
disableAmbientNonAI = true;
๐
Then let the mission designers decide I want AI here here and here
It's now my choice.
Spawn them only when needed
Have you looked at the "fn_animalBehaviour_mainLoop"script?
Whats the most intensive part of it?
So I take it you stopped dev'ing for StrayaGaming?
Found out the were hmm uhh questionable?
I joined a Milsim group
Much happier
I wrote them a Zeus template, etc.
It's a Marine group
I also manage the entire DS for them
We have our own repo etc.
And no I didn't make a FileZilla repo
I used IIS 8.5
Yep
"Non commercial gain"
I've actually started packaging all my code with WARNINGS at the top
I know it's my code.
Always.
I even embedd a tiny water-mark in the code
by changing the HEX data slightly
If I wanted to make it a headache to take my code apart
lots of local inliners work but degrade performance
https://gyazo.com/dc465617f0ed70851f5257e1641c98a0
tried to install some kind of jumpMF
broke my server
need help please
then i tried to delete the folder i uploaded to the server
and it didnt do jack
getting same error
@halcyon crypt @spark phoenix @tough abyss thanks a lot! But screen coordinate [x,y] must be get from the mouse position. Btw i'm trying another thing that don't need that.
@tough abyss You could use events as well as the command we mentioned. https://community.bistudio.com/wiki/getMousePosition can't be directly used because the map UI offsets are different than the results returned
No, what is it?
@spark phoenix it's a mod I'm working.
@tough abyss got a website?
Hey guys, I'm doing a port of liberation
I'm porting it as a Falklands War persistant campaign - so far I have most things nailed down
but I have no suitable EI in our mod repo's cfgVehicles classes to use as Argentinians
Can I define cfgVehicles classes in description.ext or something similar for use?
I ask because liberation has a very easy script setting to replace the EI with unit classes
and anything else would require me to rewrite all their spawn scripts to allow for custom loadouts
Would appreciate it if anyone knows if defining custom cfgVehicles units in the mission works
Would appreciate it if anyone knows if defining custom cfgVehicles units in the mission works
Can't do that, not supported
Not even if I drop a cheeky config.cpp into the folder?
no
Ah well. Might have to try sneak some config alterations into the group mods then :P
that is the only way to do it
Well at least I know for sure now. Thanks for the advice mate :)
..
Liberation can be easily ported
with other infantry types
Oh from the description.ext
No. But I know I could define post processing types in the description.ext
Anyone need script help?
is it just me or is the entityKilled mission event handler broken... I am just getting the same unit for both killed and killer
pretty sure everyone is not committing suicide
never mind might be ACE3
lmao, so someone else said that and i have no idea what it is...
i barely work on arma these days, too busy making awesome radios and flight software in real life to go on rockets.
BI is in no way going to invest in another scripting thing for A3. They're already investing a lot in to the EnfusionScript (or whatever it's called) thing - not sure sure anymore ๐
Intercept still has my โค though
its probably a dutch forces mod, since the dutch are a squirelly bunch....
we are? ^^
yea, what with your hording nuts and all that... and love of tulips
๐
not dutch for sure
i broke into their office in amsterdam the other day and no pictures of dutch forces found
heh that pic, I'm going to be famous for quoting Nou ^^
that squirrel though.. hmmmmmmmmmm
marcel, i'm sure infowars will give you a ring one of these days
hmm not so sure if I want Alex on the phone ^^
let's try this; @grizzled cliff If someone would (try) to pickup where you left with Intercept, would you advise to do so? ๐
might bust your speaker
genuinely interested though, I'm just not sure if I want to or even able to
It is open source for a reason. ๐
that also means that BI could've picked it up ^^
I'd be happy with a coherent set of inventory commands right now :(
hello guys ilve been trying for the last 3 hrs
when people logout of the server and log back in there gear dosent save
anyideas anyone?
nope altis life i am assuming its ether the database or loadouts not to sure tho
@tough abyss
You should go ask the Life people.
is there a life discord?
@HyperDude#4593 https://discord.gg/HVv74
Database is not connected by the sound of that @HyperDude
hi, when I want to place a control left of the compass, for my screen resolution ctrl ctrlSetPosition [0,-0.55,0.5,0.5]; works just fine, but for different screen resolutions it doesn't seem to work. Is there a generic way to place a control left of the compass in a vehicle?
safezone
use the safezone value
Use those @round scroll
Can i use vectorAdd with 10 dimension vectors?
thanks @tough abyss , appreciated
_newVec = [0,0,0,0,0,0,0,0,0,0] vectorAdd [1,5,3,4,5,7,2,5,3,4];
controlName ctrlSetPosition [0*safeZoneX,-0.55*safeZoneY,0.5*safeZoneW,0.5*safeZoneH];
Thats how you'd do it @round scroll
use backticks for quoting your code
Done
If you want to accommodate multi-monitor arrays
use safeZoneAbsX
and safeZoneAbsW
ok, multi monitor is definitely to think of, as it's for placement of a bearing indicator for a non directional beacon
Always try to accomodate for "worst case scenario events"
For example make a function
make sure it's got default values
yeah, defensive programming, thanks ๐
Also known as "padding code"
@tough abyss
I think the wiki answers that one
@dusk sage yes... sad. Answer is no.
@tough abyss what is the 10 dimensional vector for?
and do you understand what a "vector" is?
I just want to sun 2 different arrays.
With n dimension.
Using that: {_atual set [_forEachIndex,(_atual select _forEachIndex) + _x];} forEach _mudanca;
_atual and _mudanca are arrays.
They're not a vector then.
multi-dimensional arrays are not vectors
vectors are a point with magnitude and direction
So angular information + a scalar representation
What are you actually trying to do @tough abyss
?
Yes... but you can have vectors with more than 3 dimensions right?
Yes, but 10th dimensional vectors are not pertinent to A3
It's possible to do an RscTitle move from the left to the right ?
Yes
Vector it.
So i will use that code so: {_atual set [_forEachIndex,(_atual select _forEachIndex) + _x];} forEach _mudanca;
X,y,displacement find the sum of the vectors
_atual and _mudanca are arrays with 10 numbers each.
when you find the sum of vectors they're tail to tail in the X,y axis
the sum is the hypotenuse between the X,Y in the right handle triangle
ok, but this is exactly what vectorAdd do: {_atual set [_forEachIndex,(_atual select _forEachIndex) + _x];} forEach _mudanca;
cringe
So origin vector1 addVector vector3
It could be done using the vector formula for 2D
As vectorAdd only supports 3D
so you'd just do [x1,y1] + [x2,+y2];
Yes @tough abyss
for a 2D vector
_arr1 = [1,2];
_arr2 = [2,3];
{
_arr1 set [_forEachIndex, (_arr2 select _forEachIndex) + _x];
} forEach _arr1;
Is vector addition
Perhaps it's just not a position vector
There is many uses for large 1D arrays
Better description of what that is a @dusk sage is a Matrice
The array store statistics.
Why not just use a keyValue pair?
BIS_fnc_addToPairs ?
So i sun old statistics with the new one and get a up to date statistics.
@tough abyss i will look into that. Thankyou.
time for some proper dictionary commands
Agreed
just make it an array command
to do it all
The dictionary fncs's are pretty under used
I can't say I've seen much use of them
Not too much use for them in ARMA
Most things can be solved more simply, and especially without these functions
object location storage.
Using a more advanced find function, most of these problems can be solved
why the format :d
You're making a string out of a string ๐
TypeOf returns a string?
yeh
I mean, sure, you can do that, I was just saying the functions aren't really needed
Actually @tough abyss Weren't you trying to do this the other day?
It'd probably be clearer to do things more manually ๐
They are baked in on init
I'm not quite sure what you are asking
You're not going to write to files with SQF, no, not unless I've missed out on something
๐
Pitty.
Extensions exist
Nah it's not ๐
The hardest part is just making your schema/tables, which shouldn't be hard
There should be an example function packed along with it, probably by Tonic
Use that to call the extension itself, and pass queries to it
I.e
["SELECT something FROM something WHERE something = something",2] call xxxx_asyncCall;
It should be quite obvious by just reading it though ๐
Yeah DB calls are pretty easy to understand
is there a better way to get Object IDs yet without parsing the format["%1",_object] for it?
@tough abyss Is there anything that is required to use extDB2 other than the files?
examples provided?
There are multiple ways to implement it. Some knowledge of sql is recommended
You should look at extDB3 , i dont provide support for extDB2 anymore.
Eitherway both have a command line test program to let you test sending commands to the extension and see what it returns.
That way you don't need to be in arma
I need help! I've played a random mission from Steam Workshop and encountered several problems related to CQC.
- Can AI opens door before entering a building?
- Is it possible to navigate AI through a building using markers instead of waypoints?
@tough abyss If you plan to run the encrypted version back through to decrypt it, sure
Is there a way to #define a value in the mission.sqm, lets say a debug position. Now I want to use that debug position later on in an sqf script. what would be the best approach to read it from the mission sqm.
if __EXEC works in mission sqm I guess I could find it in parsingNameSpace, but yeah .. not sure about that
is there some global init that can be done in the mission sqm so that I could setVaribale it on the missionNamespace?
Why not use init.sqf?
Global variables defined in init sqf will then be available in all sqf scripts. Var1 = true; would then also be the same as missionNamespace setVariable ["Var1",true];
@random glen 1. manually through scripts yes. Default ai behavior makes them open the door as they're walking through iirc. 2. Ai pathfinding in buildings is done through a pathing LOD in the building model itself iirc which has defined points
@thin pine Thanks! But how then in more than one mission I witnessed that AI walked through the door like a ghost? I mean what can case this problem?
dunno if init.sqf is loaded up before mission.sqm and I still couldnt change the hardcoded position of units to that variable f.e.
What are you trying to achieve
@random glen was this on a vanilla map?
@vague hull init sqf is loaded after mission sqm but yeah what are you trying to achieve?
I wanna have a predefined DebugPos, where joined players spawn and waitr until their init is done
yeah ofc
Why not setpos on init sqf?
thing is, the units you can load in are placed by a position set in mission sqm
and I just want to leave them there
Yeah just exploit locality. Setpos locally. And before you setpos you cache their position
So you can tp em back when init is done?
Or am I missing your intentions right now?
Yes, @thin pine, once it was Altis and another one was on Tanoa. Aside from that, on Tanoa AI soldiers hesitated to peruse me inside the building, but I'm not what to blame for that - overall AI behaviour or author's scripting.
I have one vector v1 = [0,0,-100] and another vector v2 = [25,37,0]. The angle beetwen v1 and v2 is 90d. How can i rotate v2 up increasing this angle to 105d?
Like that: http://imgur.com/1QWCsZ1
I need to try out extDB3
math riddles
the angle between two vectors v1 and v2 is the arcus cosine of the dot product of v1 and v2.
fml. I should stop trying this
Arcus ๐ฝ
yes arccos. it's latin for something something
@tough abyss tbh, i am not rly sure, what uisleep on the Dedi does (or i forgot it, no real clue anymore. too long ago ๐ )
@jade abyss Understood. I'll read up on it a bit and test. Thanks for the support and ideas. It's going to be nice to have this stuff logged now and in the set variable filter and will be fun to see who gets caught.
@tough abyss: If v1 and v2 are arbitrary and neither as axis aligned then you take the cross product and plug that into an arbitrary-axis rotation matrix.