#arma3_scripting

1 messages ยท Page 259 of 1

south storm
#

?

little eagle
#

hmm

#

_positions = ...

#

_positions = _positions apply {[_origin distance _x, _x]}

#

_positions sort true

#

_closest = _positions select 0 select 1

#

something like that?

south storm
#

Yeah

covert gulch
#

hey guys

little eagle
#

that's a nice trick to use sort with apply

south storm
#

But at [_origin distance _x, _x] the last element does it screw with the order?

covert gulch
#

yo adjustment team

#

how do i add shit to my vanilla arma 3

#

exile

south storm
#

...

covert gulch
#

i got my server to work but its vanilla

little eagle
#

I don't see why it would

clear tendon
#

i'm following you guys @little eagle and @south storm on the idea's and logic, but cant put it on paper

covert gulch
#

whats the best tutorial for someone hosting a server

clear tendon
little eagle
#

what step is the problem`?

south storm
#

@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

covert gulch
#

will the mods do will they actually give me money in the game and spawn vehicles and weapons and shit

clear tendon
#

especially and shit

covert gulch
#

like will they make them spawn

lusty hearth
#

@covert gulch Google it

covert gulch
#

cause my vanilla is empty

#

ive googled it already

#

all that did was kill my server and give me a headache'

south storm
#

@little eagle The step that I found was the problem

covert gulch
#

id rather be led by someone who knows what theyre doing

clear tendon
south storm
#

was when I piped in an array using {sort _x } count (_positions)

clear tendon
#

Those mods are Exile made, and the topics have support

south storm
#

It screwed with the order of x,y,z

lusty hearth
#

Lazy lazy, isn't this unrelated to scripting

little eagle
#

that is wrong Adjust

south storm
#

Needs double nesting?

little eagle
#

you don't want to sort the x,y and z of the positions

south storm
#

to prevent the data being screwed with?

little eagle
#

you're sorting the coordinates , not the positions

#

it would screw the positions in _positions

#

because sort actually alters the array

south storm
#

{[[sort _x]]} count _positions would work?

#

much the same as apply?

little eagle
#

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

south storm
#

Trust me it's a problem I needed to do.

little eagle
#

copy each position array before sorting it then

#

with +

south storm
#

Didn't even know you could do sort + _x

little eagle
#
  • array just copies the array
#

has nothing to do with sort

#

array values are references

south storm
#

Ohhh it's a unary operator?

#

+array

#

?

little eagle
#

some commands adjust the referenced array

#

some copy it

#

yes, + is unary

south storm
#

Rightio.

little eagle
#
_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

south storm
#

Neat

little eagle
#

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

south storm
#

@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));

little eagle
#

oh and + and - always copied too

clear tendon
#

visual eyesore, but it didn't give errors ยฏ_(ใƒ„)_/ยฏ

south storm
#

I normally add more lines purely for the sake of readability.

clear tendon
#

just magically poof disappears the vehicle hahaha

little eagle
#

does it work though?

south storm
#

No.

little eagle
#

hahaha

clear tendon
#

it works_ish_

south storm
#

Semantic Errors

#

๐Ÿ˜›

clear tendon
#

it moves it somewhere in the void

south storm
#

It runs, it compiles doesn't do what it's supposed to do

clear tendon
#

^ feature

#

๐Ÿ˜›

little eagle
#

sounds perfect to me

#

I'd rather have it error if it doesn't do what it's supposed to, tbh

clear tendon
#

fair enough

#

@tough abyss thanks, i've been pointed out so.

little eagle
#

which do I belong to?

clear tendon
#

the other 3/8?

#

half man

#

half bear

little eagle
#

can I have OCD and be nitpicky?

clear tendon
#

the 0.01%

south storm
#

Missed the strings

clear tendon
#

So, mexico wins/

covert gulch
#

guys

#

where do i start

south storm
#

Try that @clear tendon

covert gulch
#

cause none of this makes sense to me

little eagle
#

{deleteVehicle _x} forEach candidates

clear tendon
#

@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

south storm
#

Paste it again

#

I missed a )

#

What I'd do for a bit of cleverness to see the actual displacement

little eagle
#

still missing the perpendicular part

south storm
#

a draw3D handler and link it to the displacement and drawLine3D in it

clear tendon
#

error generer error in expression

#

|#|vectorAdd

little eagle
#

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?

south storm
#

I noticed the error.

#

Try that.

little eagle
#

parenthesis fucked I think

#

in the last line

south storm
#

yep... moves it to notepad++

little eagle
#

remove them all. not needed

clear tendon
#

how the hell you guys see that...

little eagle
#

OCD and nitpickiness

south storm
#

OCD nitpickiness is required for programming

#

even more so for OOP

little eagle
#

can we at least fix that random(round 30)

#

OCD is a real thing

clear tendon
#

hahaha, that's been buggin you, ey?

south storm
#

No he's right it's wrong

#

Random comes first

#

calculates random value

#

round, rounds it to the closest whole integer

clear tendon
#

might as well want to publish this as a script on armaholic when it's actually done and working with all this effort haha

south storm
#

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

little eagle
#

I publish all my scripts : (

clear tendon
#

You da MVP

south storm
#

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

little eagle
#

Is it worth start writing my own moveOffRoad function now? I can't sleep anyway

south storm
#

The keys invoke commands when you move them into place

#

then they initialise auto-patrolling

#

From the marker as the origin point

little eagle
#

apparently AI get stuck if the vehicles die on the road

icy raft
#

I'm doing an alternative project

little eagle
#

which is what we've been talking about

icy raft
#

For magic warfare

clear tendon
#

@little eagle yep

icy raft
#

Sounds weird for arma, but I think it might work

#

Got the teleport and time freeze going, working on camouflage, astral projection, telekinesis

south storm
#

Reason I designed our Zeus system like I did makes it easy for us to do full fledged zeus missions with dynamic AI

icy raft
#

All free to join mi GitHub is wanna colaborate

#

Its super barebones

clear tendon
#

so it's just missing one part @south storm ?

south storm
#

Stiil looking at it.

#

I'm stepping through it manually

#

commenting as I go.

clear tendon
#

$5 bounty!

south storm
#

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]]; 
clear tendon
#

setPosATL --> error 1 elemts provided 3 expectee

little eagle
#

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;
};
south storm
#

Good old params

clear tendon
#

how far should they move @little eagle

south storm
#

the define

little eagle
#

idk. 10 meters seems to be enough

south storm
#

is how far

little eagle
#

yeah . line 3

clear tendon
#

let me remove the mines and equip myself with a tow

little eagle
#

do whatever you need

south storm
#

#define DISTANCE_TO_MOVE 10

#

it's called a Macro

little eagle
#

WHY YOU YELLING?

clear tendon
#

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

little eagle
#

what map?

#

custom map might not have correct roads

clear tendon
#

CUP

little eagle
#

aww

#

walk on the road

#

open debug console

#

and enter:
systemChat str isNull roadAt player

#

what does the chat say?

clear tendon
#

false

little eagle
#

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

little eagle
#

and commy_fnc_moveOffRoad is defined?

#

systemChat str isNil "commy_fnc_moveOffRoad"

clear tendon
#

it's in the init, let me resave

#

haha, it works, it's wierd, but it works

#

boom, teleport sideways, keep burning

little eagle
#

that's what you wanted, right?

clear tendon
#

yeeep

#

where can i pay that bounty

little eagle
#

meh. I don't want it

#

donate to ACE if they have something somehwere

clear tendon
#

or something for the headache and effort

#

rgr

little eagle
#

if not or if you can't find it, don't bother

clear tendon
#

they have hidden it very well

little eagle
#

wait. we do actually have something like that?^^

clear tendon
#

no, meaning i cant find a page w/ my google-foo

little eagle
#

I really don't know, lol

#

here, donate to Flummi

#

ahh wronf link

clear tendon
#

andddd done ๐Ÿ˜ƒ

gilded rover
#

Does anyone know where i can find the pop up targets

#

Also how to respawn VR units when I activate it on a laptop

covert gulch
#

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

icy raft
#

@gilded rover what do you mean?

#

@covert gulch Great! Have fun! :D

covert gulch
#

ErrorMessage: Include file mpmissions__cur_mp.Altis\addons\statusBar\statusBar.hpp not found.

zenith bramble
#

@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

covert gulch
#

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

random glen
#

Is there any script to replace Civilian Site module for Tanoa (Apex DLC) or at least Altis?

gilded rover
#

@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

covert gulch
#

what does it do when i spawn something with persistent turned on in infistar

zenith bramble
#

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

gilded rover
#

@zenith bramble That is actually quite smart I shall go attempt that now

zenith bramble
#

:) gl my friend

gilded rover
#

would you maybe know how to script the respawns and stuff?

zenith bramble
#

Pm me and when I get home we can chat :)

gilded rover
#

cool thanks ๐Ÿ˜ƒ

icy raft
#

Give me ideas of superpowers to implement

#

I already got teleport, camouflage, timefreeze

gilded rover
#

Speed?

#

DemiGod? (only high calibers such as 12.7 and above can kill)

icy raft
#

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

little eagle
#

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

icy raft
#

I made a invisibility script already long ago to spy on possible cheater in my rp server hahaha

#

Doable in earlier version

spark phoenix
#

@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.

wet pecan
#

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

austere granite
#

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

fast fractal
#

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

broken mural
#

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.

dusk sage
#

if you would like that value to propagate over the network to remote clients, yeh

#

remember the quotations ", though

broken mural
#

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).

tough abyss
#

Whats the best way to make GUI?

jade abyss
#

Open eyes, use Keyboard, Use UI-Editor, erm... know what you do. Yeah, thats the best way to do it.

tough abyss
#

I understand the inheritence side of the GUIs

#

Alot of people don't use "base class" definitions

jade abyss
#

Their faults

broken mural
tough abyss
#

and over-ride them with custom names by using class someAssName: Inherits this

#

and the type = ##

jade abyss
#

I am still wondering, why you write that down ๐Ÿ˜„

tough abyss
#

what the type number?

jade abyss
#
  • the stuff before
tough abyss
#

Inheritence

#

It's an oop concept

jade abyss
#

Still: Why? oO

tough abyss
#

You can have a "skeleton" GUI and use it to build more complex GUI

#

So the baseclasses deal with effectively error handling

jade abyss
#

Why did you write that down? Thats what i was asking

tough abyss
#

Because I've seen a lot of people use nothing like this. RscTitle they mutate it like this.

jade abyss
#

I still don't get it: Do you want an answer to that?

#

confused

tough abyss
#

class RscTitle { type = CT_STATIC };

#

The type number.

#

Refers to the GUI type

#

Ever seen Altis Life?

jade abyss
#

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

tough abyss
#

Ohhh I am working on I&A

#

And want to throw their GUI system in the bin

jade abyss
#

Whats I&A?

tough abyss
#

Invade & Annex?

jade abyss
#

kk

tough abyss
#

Also their method of spawning the AI is a very processor hungry task

#

The entire AI is for loops

jade abyss
#

Then hf with it. Open up the UI in the Editor -> Move stuff around -> Save stuff and overwrite it with your own mod.

tough abyss
#

Okay?

#

How do I specifically display data?

#

or change it in GUIs?

jade abyss
#

wow... after >20 sentences -> The first question

#

Display what data?
Change what in GUIs?

tough abyss
#

Well I want to create a new class of Hint box

jade abyss
#

and?

tough abyss
#

To display mission status etc?

jade abyss
#

You wanna know how to Display a text in the center of a screen? Yes/No?

tough abyss
#

No. More.

#

Images as well

jade abyss
#

Do you know how to Distplay a text in the Center of a screen? Yes/no?

#

If "No" -> Start with that.

tough abyss
#

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

jade abyss
#
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)

tough abyss
#

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?

broken mural
#

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

tough abyss
#

Both

broken mural
#

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
#

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

broken mural
#

though it appears you can only use _namespace on global variables.

tough abyss
#

Not that this

#

Objects

#

controls displays etc

broken mural
#

@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.

jade abyss
#

NameSpaceName getVariable ["NameSpaceVarName","blaVarNotFoundSoThisStandardTextIsHere"];

#

like:
cursorTarget getVariable ["NameSpaceVarName","blaVarNotFoundSoThisStandardTextIsHere"];
or
player getVariable ["NameSpaceVarName","blaVarNotFoundSoThisStandardTextIsHere"];
etc

broken mural
#

@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

jade abyss
#

cursorTarget getVariable ["Derp","StandardTextIfVarDERPIsNotSet"];

#

On cursortarget:
cursorTarget setVariable ["Derp","MyFancyName",true];

broken mural
#

Thanks Dscha ๐Ÿ˜ƒ

jade abyss
#

check for setVariable in the Biki

broken mural
#

thafuck; Im getting "Error: No Unit" despite having an add action display on that object. Any ideas?

jade abyss
#

Error: No Unit = Null

broken mural
#

aka name is not being set.

jade abyss
#

Whats the command?

broken mural
#

hint str name cursorTarget

#

in debugger

jade abyss
#

check what i wrote after name cursorTarget

broken mural
#

or do you mean what is the code Im using for setting var name?

jade abyss
#

Yes

#

Compare it to the one i posted above

broken mural
#

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.

jade abyss
#

In Init of your Target:
this setVariable ["Derp","Blerps",true];

Ingame:
hint str ( cursorTarget getVariable ["Derp","Banana"] );

broken mural
#

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! ๐Ÿ˜ƒ

jade abyss
#

nah, ignore vehicleVarName

#

+for Code 3x `

broken mural
#

balls I figured out the problem. I didnt save the function file in the right location.

#

var name is being set and passed properly ๐Ÿ˜ƒ

covert gulch
#

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

broken mural
#

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

covert gulch
#

i pay for hosting x.x

broken mural
#

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 ๐Ÿ˜ƒ

covert gulch
#

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?????????

vapid frigate
#

how are you saving your position?

#

is it a mod?

tough abyss
#

Hey, does anyone have a decent script for creating map markers for placed in biuldings?
Or should I do the entire thing manually?

little eagle
#

placed what in buildings

tough abyss
#

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.

clear tendon
#

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...

little eagle
#

@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"

clear tendon
#

maybe i phrased it wrong

little eagle
#

Remember. I'm OCD and nitppicky

clear tendon
#

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

little eagle
#

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

clear tendon
#

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.

vapid frigate
#

would be nice if there was something built in.. every coop group has to do it somehow

little eagle
#

the only fundamental (unsolvable) problem is that you can't connect triggers with waypoints

#

because BI

#

with scripts that iis

clear tendon
#

ah...

#

but what wouldn't be a problem if they are set to be grouped w/ already existing group w/ waypoints, right?

little eagle
#

the problem , Lecks is

#

that you can't serialize attached event handlers

clear tendon
#

in the editor they are already grouped to the group they need to add to.. ๐Ÿ˜ƒ

little eagle
#

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

vapid frigate
#

i'm not sure you usually need to reload event handlers? usually they'd be readded when the new units spawn

little eagle
#

getUnitLoadout / setUnitLoadout

#

etc.

#

etc.

#

yeah, Lecks

#

it really depends

#

I mean those added via init box for example

vapid frigate
#

yeah

#

we made a custom init box

#

because we couldn't get the script from the default one

little eagle
#

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

vapid frigate
#

true

little eagle
#

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

vapid frigate
#

yeah, you can get most 3den attributes with getvariable, but some of the built in ones don't seem to be accessible

little eagle
#

setUnitPos is not a object variable

vapid frigate
#

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

little eagle
#

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

clear tendon
#

@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

little eagle
#

perf v10 ?

clear tendon
#

could well be

#

i've set it to auto update yeah

little eagle
#

uhm. dev branch?

clear tendon
#

perf, not dev

little eagle
#

the perf binaries have auto update?

clear tendon
#

steam allows you to

little eagle
#

yeah, they are fucked

#

I made a bug report about the empty variable names

clear tendon
#

ah, so it's not me, good, thanks @little eagle

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

clear tendon
#

@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'

little eagle
#

they should follow the same waypoint. what did you do? not delete the leader and add the created units to his group ?

clear tendon
#

jebus spawns them in, could that interfere?

#

the first waypoint the groupleader has, is join, set on the groupleader they need to join

little eagle
#

jebus spawns them in, could that interfere?
no idea

#

No idea what the "join" waypoint does either

lavish ocean
#

@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)

clear tendon
#

coolcool @lavish ocean

#

steam is just my lazy way tbh

icy raft
#

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.

little eagle
#

BE blocks all dlls unless you submit yours to them

#

avoid memory leaks and bugs otherwise all the anti vir programs will block you

tough abyss
#

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.

halcyon crypt
spark phoenix
#

ctrlMapScreenToWorld

tough abyss
#

screenToWorld

spark phoenix
#

Damn he beat me

halcyon crypt
#

lol ๐Ÿ˜›

little eagle
#

damn discord

tough abyss
#

You can de-pbo

#

the bin.pbo

#

to get the binary rapified file with all the GUI data

#

Find the IDC for the RscMap

halcyon crypt
#

doing that vs ctrlMapScreenToWorld... hmmmm

tough abyss
#

You need an IDC

#

to use ctrlMapScreenToWorld

#

map ctrlMapScreenToWorld [x, y]

halcyon crypt
#

yeah sorry my bad ๐Ÿ˜„

tough abyss
#

As I said look at the derapified version of thee bin.pbo

little eagle
#

map display is 53

tough abyss
#

There you go

little eagle
#

and the control.... can't remember

tough abyss
#

(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

little eagle
#
    private _mapIDD = -1;

    {
        if (!isNull (findDisplay _x)) exitWith {
            _mapIDD = _x;
        };
    } forEach [12, 37, 52, 53, 160];
tough abyss
#

And all config data it becomes one big blob cluster F

little eagle
#

private _mapCtrl = (finddisplay _mapIDD) displayctrl 51)

tough abyss
#

The root class will be in the RscMap

little eagle
#

_mapCtrl ctrlMapScreenToWorld [x, y]

tough abyss
#

That where you got it commy2?

little eagle
#

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.

halcyon crypt
#

wtf

tough abyss
#

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?

halcyon crypt
#

there are lot of terrains that don't have proper configs but I'd imagine that CUP is good in that aspect

tough abyss
#

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?

halcyon crypt
#

I doubt that there's a big difference

tough abyss
#

Depth of the search I know impacted performance

halcyon crypt
#

arrays could be faster because it doesn't have to go through the configs but that's just a wild guess

tough abyss
#

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

little eagle
#

what if client disconnects? : >

tough abyss
#

If it doesn't get picked up by the event driven GC

#

It gets picked up by BI's remains collector

little eagle
#

getOut/Man ?

tough abyss
#

^

#

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?

little eagle
#

bubbles

tough abyss
#

Particles...

little eagle
#

and fish

tough abyss
#

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?

little eagle
#

how would that work? time passes all the...

#

time

tough abyss
#

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

#

...

little eagle
#

on a server ?

tough abyss
#

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

little eagle
#

isn't it the same for every map? or does tanoa spawn extra many fish?

tough abyss
#

Again those things should be event driven

#

Or. engine internal

little eagle
#

fish are totally unneeded imo. I'd rather have civilians than fish I 99.99% of all missions never see anyways

tough abyss
#

Although I've noticed I can get some serious speedup in missions using CBA functions

little eagle
#

yeah

tough abyss
#

Using CBA I can create my own event handler classes

#

and universal macros

little eagle
#

there is no config entry that influences the rate of spawning animals per map

#

so it should be the same everywhere

tough abyss
#

Like QGVAR or GFUNC( or LFUNC()

little eagle
#

I know

#

But more spawned animals = more scripts

#

But hey. I don't care about scheduler space. I don't use it.

tough abyss
#

@tough abyss Tried running a script to disable them?

little eagle
#

: P

#

I max out on the 3 ms time anyway with my machie

tough abyss
#

Should for the lulz of it quik use Zeus to add all the fish to the curator

little eagle
#

so meh

tough abyss
#

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

little eagle
#

would be annoying to handle disconnecting and JIP players I imagine

tough abyss
#

@little eagle Yeah your right.... unfortunate though.

#

As cooperative computing is meant to be the future of networking.

little eagle
#

digging to deep for us puny mission / addon makers

#

that is something that could only payoff if the engine does it

#

I imagine

tough abyss
#

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

covert gulch
#

then i tried to delete the folder i uploaded to the server

#

and it didnt do jack

#

getting same error

tough abyss
#

@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.

spark phoenix
tough abyss
#

@spark phoenix thanks a lot.

#

@spark phoenix have you played BRPVP? ๐Ÿ˜„

spark phoenix
#

No, what is it?

tough abyss
#

@spark phoenix it's a mod I'm working.

spark phoenix
#

@tough abyss got a website?

marsh storm
#

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

little eagle
#

Would appreciate it if anyone knows if defining custom cfgVehicles units in the mission works
Can't do that, not supported

marsh storm
#

Not even if I drop a cheeky config.cpp into the folder?

little eagle
#

no

marsh storm
#

Ah well. Might have to try sneak some config alterations into the group mods then :P

little eagle
#

that is the only way to do it

marsh storm
#

Well at least I know for sure now. Thanks for the advice mate :)

tough abyss
#

..

#

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

median iris
#

Anyone need script help?

weak tiger
#

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

weak tiger
#

never mind might be ACE3

austere granite
#

so orange dlc is intercept btw

#

right @grizzled cliff

#

no more hiding

grizzled cliff
#

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.

halcyon crypt
#

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

grizzled cliff
#

its probably a dutch forces mod, since the dutch are a squirelly bunch....

halcyon crypt
#

we are? ^^

grizzled cliff
#

yea, what with your hording nuts and all that... and love of tulips

halcyon crypt
#

๐Ÿ˜

austere granite
#

not dutch for sure

#

i broke into their office in amsterdam the other day and no pictures of dutch forces found

halcyon crypt
#

heh that pic, I'm going to be famous for quoting Nou ^^

#

that squirrel though.. hmmmmmmmmmm

austere granite
#

marcel, i'm sure infowars will give you a ring one of these days

halcyon crypt
#

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? ๐Ÿ˜„

austere granite
#

might bust your speaker

halcyon crypt
#

genuinely interested though, I'm just not sure if I want to or even able to

grizzled cliff
#

It is open source for a reason. ๐Ÿ˜›

halcyon crypt
#

that also means that BI could've picked it up ^^

buoyant heath
#

I'd be happy with a coherent set of inventory commands right now :(

stone galleon
#

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

buoyant heath
#

You should go ask the Life people.

stone galleon
#

is there a life discord?

buoyant heath
#

There's a discord link and forum there.

dusk sage
#

@HyperDude#4593 https://discord.gg/HVv74

tough abyss
#

Database is not connected by the sound of that @HyperDude

round scroll
#

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?

round scroll
#

thanks @tough abyss , appreciated

tough abyss
#

_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

round scroll
#

use backticks for quoting your code

tough abyss
#

Done

#

If you want to accommodate multi-monitor arrays

#

use safeZoneAbsX

#

and safeZoneAbsW

round scroll
#

ok, multi monitor is definitely to think of, as it's for placement of a bearing indicator for a non directional beacon

tough abyss
#

Always try to accomodate for "worst case scenario events"

#

For example make a function

#

make sure it's got default values

round scroll
#

yeah, defensive programming, thanks ๐Ÿ˜ƒ

tough abyss
#

Also known as "padding code"

dusk sage
#

@tough abyss

I think the wiki answers that one

tough abyss
#

@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

elfin bronze
#

It's possible to do an RscTitle move from the left to the right ?

tough abyss
#

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;

dusk sage
#

cringe

tough abyss
#

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];

dusk sage
#

Yes @tough abyss

tough abyss
#

for a 2D vector

dusk sage
#
_arr1 = [1,2];
_arr2 = [2,3];

{
    _arr1 set [_forEachIndex, (_arr2 select _forEachIndex) + _x];
} forEach _arr1;
#

Is vector addition

tough abyss
#

I still have no idea @dusk sage The purpose of 10 dimension vector would be.

#

In A3

dusk sage
#

Perhaps it's just not a position vector

tough abyss
#

Multi-dimensional array for data-structure

#

Yes, but positional vectors no.

dusk sage
#

There is many uses for large 1D arrays

tough abyss
#

Better description of what that is a @dusk sage is a Matrice

dusk sage
#

Huh?

#

You're saying it's a matrix, sorry?

tough abyss
#

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.

dusk sage
#

time for some proper dictionary commands

tough abyss
#

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

dusk sage
#

Not too much use for them in ARMA

tough abyss
#

What about object location storage?

#

eh he, i do that.

dusk sage
#

Most things can be solved more simply, and especially without these functions

tough abyss
#

object location storage.

dusk sage
#

Using a more advanced find function, most of these problems can be solved

#

why the format :d

tough abyss
#

.format

#

I use that a lot in python

dusk sage
#

You're making a string out of a string ๐Ÿ˜‰

tough abyss
#

TypeOf returns a string?

dusk sage
#

yeh

tough abyss
#

Ah well derp

#

[TypeOf(_veh),getPosATL(_veh)] call BIS_fnc_addToPairs;

dusk sage
#

I mean, sure, you can do that, I was just saying the functions aren't really needed

tough abyss
#

Actually @tough abyss Weren't you trying to do this the other day?

dusk sage
#

It'd probably be clearer to do things more manually ๐Ÿ˜ƒ

tough abyss
#

Is it possible to edit a .hpp file?

#

with a script?

dusk sage
#

They are baked in on init

tough abyss
#

what about .txt files?

#

The Processor support them?

#

But can you edit them?

dusk sage
#

I'm not quite sure what you are asking

tough abyss
#

Can I modify the contents of a .txt file?

#

using script commands?

dusk sage
#

You're not going to write to files with SQF, no, not unless I've missed out on something

#

๐Ÿ˜‰

tough abyss
#

Pitty.

dusk sage
#

Extensions exist

tough abyss
#

But setting up a database is a headache

#

extDB2

dusk sage
#

Nah it's not ๐Ÿ˜ƒ

#

The hardest part is just making your schema/tables, which shouldn't be hard

tough abyss
#

How do you make the .sqf code to call the DB @dusk sage

#

?

dusk sage
#

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 ๐Ÿ˜ƒ

tough abyss
#

Yeah DB calls are pretty easy to understand

weak tiger
#

is there a better way to get Object IDs yet without parsing the format["%1",_object] for it?

tough abyss
#

@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

tough abyss
#

@tough abyss Could a function be run through a callExtension to encrypt it?

#

SQF ?

random glen
#

I need help! I've played a random mission from Steam Workshop and encountered several problems related to CQC.

  1. Can AI opens door before entering a building?
  2. Is it possible to navigate AI through a building using markers instead of waypoints?
dusk sage
#

@tough abyss If you plan to run the encrypted version back through to decrypt it, sure

vague hull
#

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?

thin pine
#

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

random glen
#

@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?

vague hull
#

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.

thin pine
#

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?

vague hull
#

I wanna have a predefined DebugPos, where joined players spawn and waitr until their init is done

thin pine
#

have you worked with init.sqfs before?

#

Just wondering

vague hull
#

yeah ofc

thin pine
#

Why not setpos on init sqf?

vague hull
#

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

thin pine
#

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?

random glen
#

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.

tough abyss
#

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?

empty blade
#

I need to try out extDB3

little eagle
#

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

dusk sage
#

Arcus ๐Ÿ‘ฝ

little eagle
#

yes arccos. it's latin for something something

jade abyss
#

@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 ๐Ÿ˜› )

tough abyss
#

@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.

tribal crane
#

@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.

tough abyss
#

v1 is allways [0,0,-100]

#

So i will need to convert from one coordinate system to another?