#arma3_scripting

1 messages ยท Page 292 of 1

little eagle
sudden ravine
#

There seems to be a bit of conflicting info online; but, if I was to learn a scripting language to do scripting in arma, what language would be the best to suppor tthat (I know Arma has it's own language, I mean in addition). Would it be C++?

tough abyss
#

C# in my opinion was the closest

sudden ravine
#

Okay, thanks for the answer. I'll look into both!

tough abyss
#

ah c++ the pain in the butt, but the savior of all

dusk sage
#

@sudden ravine Honestly, there isn't really one. If you wanted to compare, it's a complete mash up. C like syntax, Javascript like typing <insert more here>

#

I would suggest you learn SQF, and ignore everything else

peak plover
#

The syntax or the examples are wrong on that wiki page

#

Is having some variables in missionnamespace bad? should I clean up all the variables after my script is done running?

jade abyss
#

?! whats that for a question?

#

Its like: I have tools in my toolbox ๐Ÿ˜„

#
missionNameSpace setVariable ["MyVar", 1, false];
==
MyVar = 1; //on executing Machine
///////////////////////////////
missionNameSpace setVariable ["MyVar", 1, true];
==
MyVar = 1; //on every connected Machine (Client, Server, WhatEver)
peak plover
#
for "_i" from 0 to 100000 do {missionNamespace setVariable [format["useless_%1",ceil random 1000000],random 1000000 * random 1000000]};

seems to take around an extra 2 megabytes of memory according to task manager

#

However it does not have an impact on the framerate

jade abyss
#

Why would someone do that?! oO

peak plover
#

With 64 bit around the corner, I think it won't be an issue

jade abyss
#

+ffs, you create 100000 Vars oO

peak plover
#

Why not?

jade abyss
#

Its like typing:
useless_1 = ceil random 1000000;
useless_2 = ceil random 1000000;
useless_3 = ceil random 1000000;

peak plover
#

I will try 100 millions now

jade abyss
#

Again: Why? oO

peak plover
#

Testing the significense of having too many variables defined in the missionNamespace

jade abyss
#

lulz, okay^^ hf with that

peak plover
#

Tried with a trilion. It crashed ๐Ÿ˜ญ

#

Ooh, it's back alive

#

Erm...

#

Arma only taking up 200 mb of memory now ???

#

This is incredible

#

Nope

#

Just run ```sqf
for "i" from 0 to 10000000 do {missionNamespace setVariable [format["useless%1",ceil random 100000000],random 1000000 * random 1000000]};

#

Game worked fine, no missing textures etc.

#

after I reloaded my mission it went back to around 800 Mb

#

I wonder if this would counter the 3fps bug ๐Ÿ˜„

#

I also wonder what does this actually do

#

Does the memory reset when it reaches the limit?

jade abyss
#

Everythings possible - Arma.

dusk sage
#

Your MNS variables are cleared when you reload the mission. Variables are going to take a negligible amount of memory, but obviously 1 trillion is not going to be

peak plover
#

I will try with 3 paragraphs of lorem ipsum

#

Same results as before

#

I should try with more later 'tho

dusk sage
#

What exactly are you achieving?

peak plover
#

I wanted to know if having too many or too big variables would cause a drop in performance

#

Anyway, why does using the arrowkeys or spacebar do stuff with my buttons in my dialog

turbid thunder
#

Unless you run out of memory

#

You should only worry about settimg public variables too frequently as doing so requires the variable to sync across all clients which can heavily affect network performance if you go way overboard with it

proven crystal
#

hello hello, i have a questin that will probably/hopefully easy for you guys to answer

#

i installed the KSS mod, a simple hunger/thirs system, and i want to extend it a little

#

there is a variable called KSS_thirst that i should assess, but that somehow doesnt work. I assume that said variable was added to th eplayers

#

so i call a script from the initplayerserver.sqf

#

this is it: ```sqf
//if (!isServer) exitWith {};
diag_log format ["thirsteffect started"];
_unit = _this select 0;

while {true} do {

_thirst = _unit getVariable ["KSS_thirst",999];

diag_log format ["%1 thirstlevel is at: %2",_unit,_thirst];

sleep 10;
};

#

it does find tha player correctly but returns the 999 as thirst. so something doesnt work. is the script somehow incorrect or is the KSS_thirst not added to the player?

tough abyss
#

I have a potentially complicated problem and not entire sure how to approach it. Modded gameplay. From our testing we have determined that editor placed units behave differently (how we want) compared to those units placed with MCC/Zeus during a game. What I kind of want to do is work out what all the differences are in the units placed. Can I get a complete dump of the config that applies to the vehicle perhaps as well as some knowledge of what scripts are acting on it?

peak plover
#

Is the thirst broadcasted in the script? Probobly in the kss script the variable is not set as public

surreal kettle
#

@proven crystal I'm looking through the code but I can't find a setVariable that sets KSS_thirst to the player (or any unit). Assume it is a global variable and try with _thirst = KSS_thirst.

proven crystal
#

the mod itself does hat @surreal kettle im just trying to read the variable

#

and there is KSS_thirst

surreal kettle
#

I know, I wasn't refering to your code ๐Ÿ˜.
Treat KSS_thirst as a normal variable and see what happens.

#

alternatively try with missionNamespace getVariable ["KSS_thirst", 999];

proven crystal
#

but that cant be a global one. every player has their own hunger/thirst value

surreal kettle
#

it's global in the sense of scope, not machine

#

wait... I'm confused

#

let's say, it's global but for your machine only

proven crystal
#

i think so too :D thank god its not me this time

surreal kettle
#

to sync a global variable you have to use publicVariable

proven crystal
#

ah ok i see what you mean

#

so the missionnamespace thing i would execute on a players machine weher that value is stored as a global variable hm?

#

sort of right?

#

but then would i have to remoteexec that command

#

?

little eagle
#

initplayerserver.sqf only runs on the server and for each unit.

#

So you have a copy of the script running for each connected player

#

Since the while loop never exits, that means that you will have potentially infinite of these scripts running, because players can disconnect and relog, which would execute initPlayerServer.sq again.

proven crystal
#

yes i saw that loop continuing after i logged out

little eagle
#

If a player respawns, the _unit will no longer be the same entity and the script will target the dead body. The respawned unit will no longer be handled correctly.

#

The whole approach is wrong imo.

proven crystal
#

but i was more focussing on that damn variable for a start ^^

#

really? goddamn

little eagle
#

Well, you should focus on executing the script correctly first imo. That sounds more important, but what do I know.

proven crystal
#

i mean i was planning to launch a single script that checks through all players from the server

#

but i first wnat to find that variable

little eagle
#

There are many possibilities, but this isn't a good one imo.

proven crystal
#

through the initserver though should be alright no?

little eagle
#

I just explained why it isn't.

proven crystal
#

you explained why ititplayerserver is not the right approach i thought?

#

because it starts every time on connect

#

but initserver should only start once at start no?

little eagle
#

Oh, you mean initServer.sqf. That is different.

#

Sure maybe. As I said, there are many ways.

peak plover
#
myList = [1,2,3];
_list = myList;
reverse _list;
myList //321
#

Why

willow basin
#

Learning purposes? ๐Ÿ˜

peak plover
#

How do I circumvate this?

split coral
#

_list = +myList;

peak plover
#

Thanks.

#

What the box?

#

This wierd box around my CT_STATIC

little eagle
#

Why
Array references

civic maple
#

Does anyone know how to link an explosive to a Dead man's switch via scripts? I use ACE Explosives.

peak plover
#

Can I disable keyboard interaction with A tree dialog ?

#

@civic maple

[player, claymore1, "ACE_Clacker"] call ace_explosives_fnc_connectExplosive
#

It's nice when functions come with comments

#

Found a fix to my problem disableKeyboardSearch

#

MODS!

civic maple
#

Problem is, there's no way to get a reference to the explosive since it only exists in the inventory

#

so that doesn't work

peak plover
#

You want to link an explosive that is not placed to the Dead Man's Switch?

civic maple
#

yeh, like you do usually

little eagle
#

You have to place it.

peak plover
#

Wha? I'm still puzzled

#

Do you want the unit to explode when he dies if he has the explosive in his inventory?

cerulean whale
#

@civic maple foreach items player and check an array of explosives

civic maple
#

In ACE, you can attach a dead man's switch to an explosive in your inventory

#

without having it be placed before

#

and I'm wondering how I could go about scripting that

#

nvm, I figured it out.

#

you do ```sqf
unit setVariable ["ace_explosives_deadmanInvExplosive", "DemoCharge_Remote_Mag", true];

peak plover
#

I didn't know you could do that

#

That's cool

civic maple
#

discovered it while wading through ACE code

still forum
#

Filling up missionNamespace will cause a performance drop as soon as you create some hash collisions between variable names. And x64 won't make that better. Unless they increase the hash size but... I don't think so.

little eagle
#

Yeah, but that "performance drop" only applies when reading any of the two collided variables.

still forum
#

but with 10 million crap variables... There can be a ton of collisions.

little eagle
#

How common would you say that more than one variables end up in the same "bucket"?

#

Normal use. Not spamming 10kk variables without meaning.

#

Would be interesting to know how good the hash function is BI uses.

tough abyss
#

are triggers on dedi servers a problem?

little eagle
#

No, why?

tough abyss
#

that setup only seems to work when locally hosted

#

when run on a dedi, there is no response from the trigger

#

but the script does run

#

also initserver.sqf: //--------------------- Lamp behaviour Safezone_switch = true; publicVariable "Safezone_switch"; underattack = false; publicVariable "underattack";

#

but like I said, no problems whatsoever on a local server, problems on dedi

little eagle
#

player is null on the dedicated server.

tough abyss
#

aaah

little eagle
#

player is a command that reports the local machines avatar unit.

tough abyss
#

what should I use instead?

#

forEach playableUnit?

little eagle
#

Don't see why this would be in a trigger.

#

They made initPlayerLocal.sqf for this

tough abyss
#

because that addeventhandler should be applied to every player

little eagle
#

forEach won't work either

tough abyss
#

and be able to be removed

little eagle
#

You have to execute addAction on the machine where you want to add the action

#

The player won't have any actions if you add them only on the server machine.

#

initPlayerLocal.sqf is executed for every player, Nightstalker

tough abyss
#

yes but it deactives when the safezone.sqf in run

#

and that change must be applied to every single player on the server

little eagle
#

Shrug

tough abyss
#

que?

little eagle
#

Well, that doesn't change anything that I said.

#

addAction has to be executed on the players machine

#

That's just how it is.

tough abyss
#

ah so there's no way to let an addaction define the eventhandler (on/off) for everyone on the server at once?

#

1 player addaction -> every player eventhandler added

#

what a shame :/

#

there goes my safezone management ๐Ÿ˜›

still forum
#

while (*key) { hashValue = hashValue*33 + tolower(*key++); } return hashValue % tableCount where key is a char* of the variableName and hashValue is int.
Tablecount is 16 by default. till the total value Count reaches tableCount*16 in size then tableCount get's incremented by 1.

little eagle
#

I'm pretty sure there is a simple way to achieve what you're trying to do.

#

I'm no hashologist, dedmen. That says nothing to me.

tough abyss
#

hm any clues? ๐Ÿ˜…

little eagle
#

I don't know what exactly you're trying to do.

still forum
#

10 mio variables are stored in about 600k buckets. So you can expect every bucket to have atleast 10 keys. == bad

tough abyss
#

basically there is a safezone that removes bullets/grenades etc when safezone is "activated". On a laptop a player should be able to "deactive" this and the event handler shouldn't be removing the bullets anymore

little eagle
#

Yes, but we use only about 3k I'd guess.

tough abyss
#

gonna try by incorporating the switch into the eventhandler itself with if-statement

#

which would've been a lot easier to do

little eagle
#

Yeah. Adding and removing eventhandlers or action is not really needed most of the time.

tough abyss
#

another topic for that script, is there a way to retrieve the name of the player who activated the script?

little eagle
#

activated the trigger?

tough abyss
#

there is no trigger anymore

#

just an addaction on a laptop

#

that runs a script setting the true/false of the publicVariable

little eagle
#

name (_this select 1)

#

Oh, btw.

#
if(!Safezone_switch) then
{
    Safezone_switch = true;
    publicVariable "Safezone_switch";
} else
{  
    Safezone_switch = false;
    publicVariable "Safezone_switch";
};

could be written as:

missionNamespace setVariable ["Safezone_switch", !Safezone_switch, true];
tough abyss
#

fair enough but I just added a sideChat message so the latter probably wouldn't work anymore xD

#

will include it in comments for future uses

little eagle
#

sideChat won't work either on a server. It's another command that only has effects on the machine where it's executed.

tough abyss
#

globalChat?

#

any chat? ๐Ÿ˜›

#

oh but that script runs locally

little eagle
#

All chat commands have "local effects". Even globalChat, even if that sounds unintuitive at first

tough abyss
#

fair enough

#

any way around that? For example custom message of the sorts?

little eagle
#

oh but that script runs locally
But then it makes no sense that you pubVar the variable

tough abyss
#

because it's in the addaction :/

little eagle
#

Oh

#

I think what you're doing is no good idea then. If the script can run on multiple machines on the same time.

#

And you flip a boolean.

tough abyss
#

wouldn't having an invisible unit placed down and using unit sideChat "..."; work?

little eagle
#

You could end up with a different value for "safezone" on the machines for the rest of the mission.

tough abyss
#

:/

little eagle
#

Because first you set the variable locally

#

And then you use publicVariable

#

And both machines could receive the network message after they send theirs.

tough abyss
#

so using your piece of code would tackle that?

little eagle
#

Especiially when both enter the safezone at the same time.

tough abyss
#

or not as it runs locally from the addaction?

little eagle
#

E.g. they sit in a car or walk side by side.

#

publicVar should only ever run on one machine

#

Preferably the server

#

Or a local machine where the namespace belongs to if you use setVar on an object for example.

tough abyss
#

hmmm

#

maybe better to not have a local client involved? e.g a trigger server-side that detects CSAT forces and set the variable to false/true?

little eagle
#

I dont know. I'm still confused about how what that trigger even does.

tough abyss
#

basically when there is no OPFOR in a certain, the eventhandler should prevent friendly fire

#

but when OPFOR enters the area players need to be able to shoot at the OPFOR

#

(and potentially friendly fire)

little eagle
#

But why the addAction thing?

tough abyss
#

because at first I wanted a manual switch

#

but now I just threw away that feature ๐Ÿ˜›

#

have the server handle variables

little eagle
#

Because I said bad things about it?

tough abyss
#

because you said it would create complications

little eagle
#

You could have both systems, but they would be separate for simplicity.

tough abyss
#

two separate systems defining variables?

little eagle
#

Two separate variables.

#

Both checked with boolean magic.

#

Is this for vanilla or with mods?

tough abyss
#

with mods

#

but they shouldn't interfere

little eagle
#

Which ones? Some could help.

tough abyss
#

pfff it's quite a list

#

RHS, ACE3, TFAR, SMA, USAF, VCOM AI are just a few of them

little eagle
#

alrighty

#

A trigger and addAction for everyone to toggle of a fired eventhandler that deletes bullets

#

right?

tough abyss
#

I think so, the sentence isn't entirely clear to me but I think we are talking about the same thing

little eagle
#

off*

#

I made it as short as possible.

tough abyss
#

in that case yes ๐Ÿ˜›

little eagle
#

About that trigger

#

does that mean the bullets are deleted when the blue unit is inside it?

tough abyss
#

yes

#

but the trigger doesn't do that

#

anymore

#

initPlayerlocal: sqf player addEventHandler ["FiredMan", { params ["_unit", "_weapon", "", "", "", "", "_projectile",""]; if ((_unit distance2D (getMarkerPos "safezone") < 125) && Safezone_switch) then { deleteVehicle _projectile;}}];

#

right now only server touches the variable changes

little eagle
#

why "firedman" ?

tough abyss
#

because assholes can still use vehciles when I use "Fired" ๐Ÿ˜„

little eagle
#

right

dusk sage
#

@still forum Do they still use that hashmap impl in more recent times?

still forum
#

Don't know. Guess so. Won't check

turbid thunder
#

Defensive programming FTW Nightstalker ๐Ÿ˜„

#

Kinda reminds me of when I had to make smth similar for grenades but with a hint message pointing out which noob managed to "accidently" press G in base

peak plover
#

if (nadedInBase) then {disableUserInput true};

rancid ruin
#

those days of accidentally pressing G were a brilliant time

#

it was such a widespread and comedic phenomenon

pliant stream
#

am i the only one who bound gear to G in A3?

little eagle
#

Same.

#

grenade system in A2 was overall better

pliant stream
#

lol except the part where your guy stands still like a dumbass for 10 secs

peak plover
#

Anyone remember all the friendly fire during the Alpha?
I miss the grenades from A2 as well. It was so much more realistic and less casual

#

Now supposedly soldiers just run around with grenades ready to throw, with safety pins removed and shit

thick ridge
#

Any examples of how to create a simple overlay on the bottom right of the screen to show some dynamic text? I'd like to show a vehicle's speed in km/hr.

peak plover
#

Hey, atleast we have mods!

thick ridge
#

thanks

cerulean whale
#

Hey, is there a way to get data from a road which has a database entry in terrain builder?

#

(I want to set a road name)

#

I have a way to do it but it will take a lot of configuration work, so I'm hoping that there is a simple solution

#

or even just a name thing would be good

polar folio
#

i think both nade systems have pros and cons. imho it would be ideal to have grenades be another slot like rifle, pistol and launcher. then you'd have to put away the weapon and see your hand holding a grenade. holding the fire button would allow to cook it or whatever you call that. also actually being able to aim it and control strength of the throw would be great, if we want something resembling reality.

locking people into shitting animations JUST to get a delay seems lazy and not realistic either. lack of all the control i just described you would have in real life. is why i prefer the simpler one we have now. potentially better to mod too.

proven crystal
#

i like the ACE way of doing it takes a second or two more but thats fine. a shortcut for direct throwing would be nice though

#

ok so i must be making some very basic mistake here. noobishness in server scripting. im still stuck with this stupid variable. The situation is: there is a global variable on the clients, and i would like to execute some scripts on the client to work with that variable.

#

so if i use


_unit remoteExec ["fez\fez_kss\fez_thirsteffect.sqf", _unit];```
#

that should run said script on the clients, if _unit is a player, correct?

#

and then inside that fez_thisrteffect.sqf


    _thirst =  missionNamespace getVariable ["KSS_thirst", 999];
    diag_log format ["%1 thirstlevel is at: %2",_unit,_thirst];
    systemChat  format ["%1 thirstlevel is at: %2",_unit,_thirst];
    
    
    _thirst2 = kss_thirst;
    diag_log format ["Look here, %1 has %2 of thirst", player, _thirst2]; 
    systemChat  format ["Look here, %1 has %2 of thirst", player, _thirst2]; 

#

both of these should work, to get that global variable into the log and the systemchazt, no?

turbid thunder
#

Personally I like the A3 nades more. Its simple and you dont have to press F and scroll through all your firemodes to get the grenade, then being unnable to shoot because you want to shoot and throw a grenade instead. A2 nade throwing was way too slow imo.

proven crystal
#

or should i somehow remote execute publicVariableServer "KSS_thirst";

#

just found that command

turbid thunder
#

@proven crystal use remoteexec without any specified unit

#

You want it to run on all clients at the same time right?

proven crystal
#

yes it will be running for all clients.

#

i launch it from the initplayerserver atm

turbid thunder
#

Then dont specify a unit in remote exec

#

Another issue: systemchat is local

proven crystal
#

thats why, but yes i guess i can improve that part. probably run it from the normal init or initServer?

#

which would be fine

#

i dont really need that output its just there so i could see if the thing finds that variable

turbid thunder
#

Remote exec should run only on one machine, server prefered

#

Does it work in sp? Mp when you are host?

proven crystal
#

it doesnt find the variable

#

the stuff is supposed to run in a loop on every client

turbid thunder
#

Put the first line where you declare _thirst into the debug console and see if it returns something

#

Wait

proven crystal
#

the dieag log outputs gave me a 999 so it never reads the variable

turbid thunder
#

Well I gotta go now sry

proven crystal
#

aight.. thanks anywy

proven crystal
#

ok i got that bit figured out

#

now does anyoneknow if i can affect the speed of stamina regeneration or depletion for individual players?

#

its probably a universal setting...

#

would like to make things more exhausing when badly hydrated...

#

but currently i will only be able to deduct stamina at bad hydration level, no matter whether the player is on the move or not

old basin
#

IIRC setMass will affect dudes getting tired

rotund cypress
#

Is there any experts on Draw3D in here?

little eagle
#

IIRC setMass will affect dudes getting tired
no

#

What's wrong with pasting it here?

proven crystal
#

whats fatigue, whats stamina?

turbid thunder
#

@proven crystal btw, consider using the bottom lines of the debug menu if you want to observe variables quickly

#

Sry for pingspam

#

I think in arma, fatigue and stamina refeer to the same thing

#

Always about how exchausted a unit is which directly influences movement speed and weapon sway

proven crystal
#

thanks. looks interesting indeed. can that coefficiet exceed 1?

turbid thunder
#

Yes

proven crystal
#

assuming 1 is normal

#

good good

turbid thunder
#

Though be careful when going into extreme values

proven crystal
#

the stamina thing is a bit weird

#

it only moved between 58 and 64

turbid thunder
#

Or else one step depletes all stamina :D

proven crystal
#

not planning to do that, just a bit harder everything if one is thirsty

#

but they still need to be able to get to water of course

turbid thunder
#

You could go as fancy as making it so that when thirsty, stamina is reduced and cant be higher than a certain value

#

If set right, the character would permanently make the sounds of being exchaused :D

proven crystal
#

that was a consideration too

#

so if i get that bit right, stamina is sort of the limit for fatigue?

#

if i want to make a player tired, i would set his fatigue doen?

#

if i want him to be weak permanently, id affect stamina?

#

fatigue would regenerate, stamina does not?

turbid thunder
#

Also imagine loadCoef like, if you'd set it to 2 it would be like carrying twice the load which exchaust you twice as fast

#

0.5 would half that and make you last twice as long ect

proven crystal
#

yes yes, dont worry :) im rather thinking about 1.1 or 1.2 after a certain point

#

but i have hunger to work with too. so im thinking i could uese the loadCoef, or fatigue reductions for the thirst effect

#

and stamina for hunger

#

maybe?

#

so hunger is weakening on the long run, and lack of water is added trouble

slim apex
#

Anyone know how you can judge heartbeat? I'm attempting to create a medical system, and I'm using the stamina currently, I'm in the middle of making a blood system so you can judge how much blood has been lost and what stamina they're at

#

But anyone got any ideas?

peak plover
#

Try looking at ACE3, AGM or XMedSys

plucky beacon
#

Can you do else exitwith ?

halcyon crypt
#

nope

plucky beacon
#

:P

thin pine
#

dont need to either

plucky beacon
#

What's something I can do to make sure initPlayerLocal only runs after the player's character is initalized

#

TIL there are specific commands for fireplaces

#

I could just use a sleep, so that it only happens when the simulation has started

little eagle
native hemlock
#

I wonder how many of those small quality of life commands KK is responsible for.

tough abyss
#

That endl is beast

plucky beacon
#

WHAAAAAT that's neat

native hemlock
#

He'd probably get spammed for such minor things

little eagle
#

I just use

#
#define NEWLINE toString [10]
drowsy axle
#

Where is the best places to get information about scripting and making your own custom missions?

drowsy axle
#

Other than that.. ๐Ÿ˜ƒ

plucky beacon
drowsy axle
#

Apart from the wiki

little eagle
#

The wiki is the best place.

drowsy axle
#

Okay. So were do you think someone, with no knowledge should start?

little eagle
#

The wiki.

plucky beacon
#

lol

drowsy axle
#

What part of the wiki... ๐Ÿ˜ƒ

#

Is there an Index page of all pages??

plucky beacon
#

look through the commands and read some ones that stand out to you, then think about how you can use it in a mission and try to implement it

drowsy axle
#

Respectfully, thats not what I am trying accomplish. ๐Ÿ˜ƒ @plucky beacon

#

@little eagle This is an index of everything (editing wise atleast)?

little eagle
#

I think so.

#

The best pages were posted already.

#

scripting commands
and
functions

#

also

#

and

drowsy axle
#

Yeah, i've been playing and using the wiki for around 5 years. I just want to refresh my memory with the basics ๐Ÿ˜ƒ

plucky beacon
#

too many smileys

drowsy axle
#

๐Ÿ˜„

plucky beacon
#

๐Ÿ˜ฑ

drowsy axle
#

:]

#

๐Ÿ˜’

plucky beacon
#

Since you already know about the wiki and scripting just get into editor and throw stuff down

#

eden is pretty intuitive

drowsy axle
#

Okay. I'll spill the beans ๐Ÿ˜› I've coded this website. Wanting to (in my own words) describe from each level. How to get started within editing and mission making. I hope it's okay to link :/ http://scorpionnetwork.uk/

plucky beacon
#

banned

tough abyss
#

Banned

plucky beacon
#

I reccomend anyone wanting to know how to get started in mission making look at the eden editor

drowsy axle
#

Why?

plucky beacon
#
it's a joke because it'd be ridiculous for you to get banned for posting one link with the pretense that you weren't sure it was a rule
drowsy axle
#

Right. haha

#

phew

#

Good joke, m8. ๐Ÿ˜ƒ @plucky beacon

plucky beacon
#

I made a youtube video on sort of the mentality in starting to build missions

drowsy axle
#

link?? I'd love to look at it

plucky beacon
#

I don't like to self promote here but I'll pm you

drowsy axle
#

Okay ๐Ÿ˜ƒ

open vigil
#

Yeah, self promoting is frowned upon. Mainly because it looks like advertising and advertising is spam.

peak plover
#

Wow DriftingNitro. I've seen them before. The world is surely small..

#

Had the feel they are leaned towards zeus

open vigil
#

@drowsy axle Just a bit of advice on your website... spellcheck.

drowsy axle
#

I know. It's still in development. ๐Ÿ˜ƒ Thanks again, for the feedback.

open vigil
#

Welcome

plucky beacon
#

@peak plover It's funny how everything pre-eden was about zeus, and I didn't make many episodes after eden to focus on that as much.

#

So frankly the technical aspects can be out-of-date but the ciritcal thinking still applies

peak plover
#

2D editor was nice as well. I think things like furnishing buildings should be done by scripts like in one of the TPW modules

plucky beacon
#

I oughta make more :I

peak plover
#

Definately

plucky beacon
#

They even added a merge function like I talked about in one video

#

they=BI

open vigil
#

I prefer well put together video tutorials

plucky beacon
#

These admittadely were not tutorials, so ya

#

admitted... admited

#

brb

#

admittedly

open vigil
#

(I hope that didn't sound as if yours weren't well put together) I learn better from videos than text.

plucky beacon
#

No offense taken, they weren't designed as a tutorial so it makes sense

#

although I did one tutorial on briefing files, and I did something I still have yet to see in almost any other tutorial video, being a table of contents with timestamped links

open vigil
#

Definitely handy

#

Esp if you ever need to edit it in the future

plucky beacon
#

right, technically you could even ammend the video with updated parts by linking to an unlisted ammendment

drowsy axle
#

That would be handy ๐Ÿ˜ƒ

proven crystal
#

what does loadCoef do eactly? doesnt seem to have an effect?

plucky beacon
#

I think it's custom effects

proven crystal
#

what do you mean with custom effects?

#

that page doesnt explain anything unfortunately

#

i want to make the players load feel heavier

#

tried to set it to 10. thats apparently no different from 0.1

#

or 1

#

actually at 10 it does seem to do something visible. its just a lot less than i thought

plucky beacon
#

You can make your own unit type properties

#

What's the cfg that has unit traits?

#

duh

#

You cheeky

proven crystal
#

hm i would go with the loadCoef, but i have been runnin in circles now for a while and there seems to be no gifference

#

0.1 or 10 feels the same

surreal kettle
#

To see the effect you must have some equipment

#

the more weight you are carrying, the more obvious it is

proven crystal
#

hm i have my gear full loaded. should be able to see something

#

is stamina not on by default?

dim owl
#

hey is it possible to make an arma soundtrack with a online link of a sound ?

leaden knoll
#

Hi guys. Just a quiestion regarding addAction and remoteExec. If I use remoteExec to add an action to all players in a dedicated MP environment, how would I get the action ID?

#

Because as I understand it, remote execVM doesnt return a function return value but rather this as stated in die wiki: Anything - Nil in case of error. String otherwise. If JIP is not requested this is an empty string, if JIP is requested, it is the JIP ID. See the topic Function for more information.

#

Or am I misunderstanding that statement?

little eagle
#

You can't.

leaden knoll
#

Thought as much, thans commy

little eagle
#

wait

surreal kettle
#

Yes he can

#

you have to be smart about it

#

from inside the script with _id = _this select 2, and then set it to a global variable if needed

little eagle
#

Instead of

#

_unit addAction _actionParams;

#

You write:

#
[[_unit, _actionParams], {
    My_ActionId = (_this select 0) addAction (_this select 1);
}] remoteExec ["call"];
#

My_ActionId is the id to remove then.

leaden knoll
#

Brilliant. Thanks!

little eagle
#

I hope it makes sense to you.

leaden knoll
#

@surreal kettle & @little eagle

little eagle
#

I'm tired.

leaden knoll
#

No it does, instead of using the "addAction" as the functionName, you use Call which allows you to execute and return values of addAction, correct?

little eagle
#

Yeah.

leaden knoll
#

Never even crossed my mind. Thank you

plucky beacon
#

@dim owl do you mean run an audiotrack in game by streaming it?

little eagle
#

Just rip the track and put it in your mission.

plucky beacon
#

^

ionic orchid
#

actually that reminds me of something - one time I was playing arma 2 and someone joined the server and played a sound effect on everyones client ...but it was a custom sound

#

never was sure how that was done

little eagle
#

Some servers allow that. 50kb .ogg files.

ionic orchid
#

ooh, like a custom face thing you could do?

#

face/texture

#

emblem, etc

little eagle
#

Yeah, same idea.

#

It's a radio command

ionic orchid
#

ahh that makes sense, cool

ionic orchid
#
 both amuse and annoy other players

haaa

little eagle
#

Some of used it in A2 to play funny sound bites from movies and shit.

#

Every client has to DL the files when they connect to a server and they are stored in the APPDATA folder, even when not used.

peak plover
#

Play a sound that sounds like somone shooting at you.

ionic orchid
#

in this case it was one of the dayz spinoffs...and the sound was someone saying 'i see you' made to sound like local comms

#

it was pretty good imo

little eagle
#

As a mission maker you can use bigger sound files.

ionic orchid
#

yeah, kinda planning on that for a thing

#

it's be nice to be able to stream audio to clients, but I get the impression you're restricted to what's already in the mission folder/pbo when you start it?

#

(I could supply a dll to stream audio from a web service, but I can't be arsed to write another one of those)

turbid thunder
#

Its not a big issue if people download a mission with sounds

slim apex
#

But that makes the mission file quite big tbh

turbid thunder
#

Audacity - export as ogg at lowest quality - bam you have a small file that sounds good

slim apex
#

If you were going for the no-modded side, then mission file would be the best. But i would always recommend mods

turbid thunder
#

Depends

#

If you are just using a bunch of 1 - 3 sec sounds then it wont be that big

slim apex
#

Good point ๐Ÿ˜ƒ

#

But if you were to play sounds, like theme tunes etc, then i would recommend mods

turbid thunder
#

Even 2000 kb isnt that much but then again, it depends on what one is doing

#

(Thats like 2mb)

#

Mods: Yeah thats good if one knows how to do that

slim apex
#

Any mission i do that has external sounds, i always do them mod sides. It's a lot better imo.

#

Then again, any mission i do is always heavily revolved arounds mods

little eagle
#

2000kb is exactly 2mb, dude

turbid thunder
#

I try to keep mine vanilla so they are easily usable without external downloads and more suitable for public play.

little eagle
#

not "like"

slim apex
#

Alright commy ๐Ÿ˜„

#

Calm down ๐Ÿ˜„

little eagle
#

triggered

#

keep going, ignore me

slim apex
#

Too late ๐Ÿ˜„

turbid thunder
#

My horror mission is 13mb apperently. Waaaaat

slim apex
#

Holy hell

jade abyss
#

Still better then the 300Mb Mission a Server once tried to let me load.

turbid thunder
#

One 4.23mb file

#

xDDD

slim apex
#

Wtf is that file

little eagle
#

4.23 is nothing for an audio file.

turbid thunder
#

Ambience

#

But I usually like to keep filesize below 10mb

#

4 digits dont scare people as much as 5

little eagle
#

Uncompressed audio can be multiple giga bytes per hour.

#

But Arma only has shitty codecs.

turbid thunder
#

Jup

little eagle
#

As expected of a game.

turbid thunder
#

The audiofile is 5 min 48 sec long

#

that explains

plucky beacon
#

4MB is less than most of my missions files

little eagle
#

That's your problem ๐Ÿ˜›

turbid thunder
#

Key word being "Most"

leaden knoll
#

Hi @little eagle I apologise for bothering you directly, but why would my globalID be 0 continiously? Here is part of my script now with your added part:

{ 
[[_addActionObject, _addActionVars],{returnActionID = (_this select 0) addAction (_this select 1);}] remoteExec ["call"];
 actionIDGlobal pushBack returnActionID;
} forEach insertionMarkerArray;
missionNamespace setVariable ["actionIDGlobal",actionIDGlobal,True];```
slim apex
#
'''
{ 
     [[_addActionObject, _addActionVars], {returnActionID = (_this select 0) addAction (_this select 1);}] remoteExec ["call"];
            actionIDGlobal pushBack returnActionID;
        } forEach insertionMarkerArray;
        missionNamespace setVariable ["actionIDGlobal",actionIDGlobal,True];
        '''
#

There ya go ๐Ÿ˜„

#

That's not the issue though

leaden knoll
#

Hahaha, I saw. Still formatting is wrong.

slim apex
#

Wait, can you use remoteExec like that? ( remoteExec ["call"];)

little eagle
#
    [[_addActionObject, _addActionVars], {

        returnActionID = (_this select 0) addAction (_this select 1);
    }] remoteExec ["call"];

    actionIDGlobal pushBack returnActionID;
} forEach insertionMarkerArray;

missionNamespace setVariable ["actionIDGlobal",actionIDGlobal,True];
#

There is one problem here

#

returnActionID is only set on the clients and not everywhere else.

#

The piece of code you send to the clients is treated as a string and only executed on their machines.

#

So the variable is never set.

leaden knoll
#

Yes I thought about it. But I was thinking since the code is first executed on the client, then actionIDGlobal is transmitted to everyone. It wont matter

#

O wait

#

Yes your right. Since the other clients are transmitting say ID = 0, it overwrites it

#

Dammit, thanks.

little eagle
#

But it never is transfered to anyone

leaden knoll
#

Yes currently id doesnt

little eagle
#

And why would you need the action ids on the server anyway?

#

They only apply to the clients machine and are useless on the server

leaden knoll
#

No its only for testing. I know it should be -2

#

But when I tested it last, while in the editor, using -2 will cause the addAction not to show.

#

But like have proven tonight, I might have just missed something. ๐Ÿ™„

little eagle
#

-2 executes it on every machine,except the server. In SP, you are the server.

leaden knoll
#

I will just add a missionNamespace setVariable withing the forEach. Should solve the issue.

little eagle
#

But why Twakkie? The variable is useless on the server

leaden knoll
#

Wait.... am I understanding missionNamespace incorrectly

#

Is that what your referring to?

little eagle
#

Each machine has a different mission namespace.

leaden knoll
#

O....

little eagle
#

shattered dreams lol

leaden knoll
#

Man, no wonder during server testing wierd things happened....

#

I thougth MissionNamespace is the shared environment between the server and clients...

#

Sheesh

little eagle
#

Nope.

#

The setVariable public command can be used to set a variable in the local mission namespace

#

And to send an instruction to all other machines to set the variable to the same value

#

But that means that you have to be careful when you use that for the same variable on different machines at the same time. You can still desych them.

leaden knoll
#

Wow, how did I get this so wrong.

#

Yes, I am a bit wiery (is that the right word) of racing conditions.... I dont know how to actually avoid it.

little eagle
#

The wiki is never honest. Makes you believe in the wildest dreams and it shows when you open scripts from random people.

leaden knoll
#

Luckily, the chances of more than one person activating the script is very low. But it is continiously nagging me. Will see how it plays out.

#

hahaha, feel ashamed to be one of those random people.

#

Anyways, will not keep you longer. Thanks for solving that issue.

pliant stream
#

ok here's what you gotta do... #define SET_VARIABLE(var, val) (call {var = (val); publicVariable #var}) always use this macro when setting global variables and all will be well

dusk sage
#

What is that achieving?

dim owl
#

hey can i force the audio setting music volume to be activated?

vague hull
#

why would you do that?

dim owl
#

for making a great intro with arma 3 soundtracks ๐Ÿ˜ƒ

vague hull
#

use something not considered Music then

#

like playSound or something

#

this worked with Music turned off iirc

dim owl
#

okay. can i use a soundtrack with playsound or how can i use it as sound ?

vague hull
#

I think you need to crate an CfgSounds entry in your description.ext/config.cpp and just insert the total path to the arma sound file in there

dim owl
#

okay thx sir

little eagle
#

@pliant stream
That does absolutely nothing to solve the problem.

pliant stream
#

i thought he wanted all variables in the missionnamespace to be global ๐Ÿ˜‚

little eagle
#

But that wouldn't work. Not all of them are supposed to be global.

turbid thunder
#

Something I've been trying for a while now but never really got to work: Is there a way to have AI target and shoot specific other AI's / Player that are on the same side without the use of addRating? Usually the AI is somehow not able to comply with forcing them to shoot at a target (Really wish there was some kind of createSide command)

little eagle
#

What's wrong with addRating?

turbid thunder
#

Two things: ACE3 and, well I basically want something to somewhat simulate having more than 3 sides and so far I've been rather unsuccessful trying that

#

Problem with ACE3 is that it keeps putting the players rating at 0 (probably so that you wouldnt have problem getting in vehicles when friendly fire happend)

peak plover
#

Hmm, there used to be a pardon action for ace. Didn't know they keep putting it at 0

turbid thunder
#

Well atleast as far as I remember when I used ACE3, it wasnt possible for me to set a negative rating as it was instantly reset again

turbid thunder
#

[QGVAR(pardon), {(_this select 0) addRating -rating (_this select 0)}] call CBA_fnc_addEventHandler; Yeeeeeeeeaaaah, that kind of looks like the reason for why my attempts at setting a rating never worked. Still, any way to force the AI to target and shoot something / someone without changing their side or making them a renegade?

little eagle
#

Not really. That event is only ever called by the action to pardon a unit.

turbid thunder
#

I actually wonder if the sides that exist are hardcoded into arma or if it could theoretically be possible to see a feature where one can create their own side and set relations using setFriend

little eagle
#

Maybe you set this ^

turbid thunder
#

I actually didnt but interesting to know that it exists

little eagle
#

Sides are hard coded.

#

"WEST", "EAST", "GUER", "CIV", "LOGIC", "ENEMY" (eg: renegades), "FRIENDLY", "AMBIENT LIFE", "EMPTY" or "UNKNOWN".

peak plover
#

if a unit dies in a vehicle and respawns 'GetOutMan' will not run?

little eagle
#

It might if the dead body get's kicked out

#

But certainly not if the dead body stays in.

peak plover
#

Better not risk it, maybe someone disconnects, it will fail to fire

lusty phoenix
#

Hey guys, i was wondering if anyone knew how to make the VTOL aircraft land without flying over the landing zone and circling back? Ideally would like it to land like a normal helicopter. Any help would be much appreciated thanks

proven crystal
#

I can set units to hostile to all with side enemy ?

peak plover
#

Yes?

nocturne bluff
#

the fuck was that macro up there

pliant stream
#

very good macro))

nocturne bluff
#

missionNamespace setVariable ["mystupidvar",value,true]

#

ยฏ_(ใƒ„)_/ยฏ

little eagle
#

Thanks Putin.

nocturne bluff
peak plover
#

Haha, if you hover your mouse off him when his eyes are closed, they stay closed ๐Ÿ˜„

rotund cypress
#

Hey guys, I'm trying to set a default animation texture on a RscButton in a config, I also have the anim texture focus and that works, so when I hover over the button, the texture shows, but it doesnt show when I open the menu and not hovering. Anyone that could know whats up?

barren magnet
#

a code snippet of your rsc button config showing the entries you talk about makes it easier :)

rotund cypress
#
                    animTextureDisabled = "textures\buttonDefault.paa";
                    animTexturePressed = "textures\buttonDefault.paa";
                    animTextureNormal = "textures\buttonDefault.paa";
                    animTextureFocused = "textures\buttonFocused.paa";
                    animTextureOver = "textures\buttonFocused.paa";```
barren magnet
#

But if I got you correctly than you have your rscbutton showing the right textute on hover, but not when you dont hover

rotund cypress
#

Yes ^

barren magnet
#

What does the button look like when just opening the dialog?

rotund cypress
#

Normal Default ArmA Texture

barren magnet
#

Ok. I would guess you are missing a cfg entry then telling the default if that is possible there

#

Even though your cfg suggests it has a default

#

But he clearly does not care about that. Try to remove all entries to find the one that actually makes the hover work

#

Then you can be sure the rest is ignored from arma

#

That would be my approach. Also I would look up a working sample from another author who has been able to do what you are trying

rotund cypress
#

Alright, thanks for the help @barren magnet

#

Do you think the colour can have anything to do with the animtexture? @barren magnet

barren magnet
#

The bg color, color active etc might be overwriting that, but I do not know it for sure. But as we are talking arma here I would gess so :)

rotund cypress
#

Haha bg was overwriting it

barren magnet
#

See, arma ...

tough abyss
#

is there is a command that instructs units to search a house or is that kind of ai behavior to advanced?

little eagle
#

There is no such command.

tough abyss
#

so, AI just wanders about?

little eagle
#

On it's own, AI just stands around.

#

But you can give it waypoints like Search and Destory or Guard.

#

And then they'll attack and move around.

tough abyss
#

so, you would have to designate waypoints for each room of a structure? - Can you identify a certain structure?

little eagle
#

Long ago I made a custom scripted waypoint that would make AI search all nearby houses by giving each single soldier doMove orders into the predefined garrison positions.

#

But they would get stuck in doorways and stuff so I never released it anywhere.

tough abyss
#

hmm right... so you can detect structures from proximity?

#

oh

#

"predefined garrison positions"

tough abyss
#

just gathering global information... i like to script for dayz one day which may be based upon arma... just saying

little eagle
#
_allpositions = nearestBuilding player buildingPos -1;
tough abyss
#

right ๐Ÿ˜ƒ

#

interesting

little eagle
#

But in the end you will run into the same problem as anyone else that tries to do this.

#

AI gets stuck in doorways and in corners.

tough abyss
#

is that a height problem? (dayz may be different)

little eagle
#

It's a RV4 problem.

tough abyss
#

with arma AI cannot go to the next floor can it?

little eagle
#

No, they also get stuck in doorways on the basement level.

tough abyss
#

right... thats a pitty

#

thank you for answering my question commy2

young current
#

@tough abyss Isnt DayZ switching to 100% enfusion?

rancid ruin
#

yeah they stopped using sqf the other day apparently

tough abyss
#

they call it enforce script (tm).

rotund cypress
#

Hey guys, when I'm trying to set an icon for Draw3D it says could not load texture. Does that means that there is a problem with the texture or that it cant find it?

#

Found that I had to get my mission root lol

austere granite
#

๐Ÿ˜„

rotund cypress
#

Usually works without it

austere granite
#

it's one of those common problems, good you found the result

rotund cypress
#

But not with Draw3D

austere granite
#

There's only a couple commands where you need the full path. PlaySound or so is one of them too I think

rotund cypress
#

Ye

peak plover
#

How do I make it so my dialog does not close when I hit Escape?

#

I wish for the dialog to stay open, but the "Escape Menu" to still work

tough abyss
#

@peak plover why not use different displays

#

seems like wha ti would do

peak plover
#

What does that mean?

tough abyss
#

like to createthe dialog on a different display?

peak plover
#

Do I use createDialog instead of createDisplay?

tough abyss
#

yes

#

try that

peak plover
#

sure, Thanks ๐Ÿ˜„

#

This is wier

#

Also escape still closes it

#

Also, instead of having a camera, it was all white.

#

keyDown eventhandele works fine

tender narwhal
#

is there tutorial how to use hintc?
I'm trying to use this to display rules before user play in my server
please mention me! thank you

peak plover
#

scroll down

tender narwhal
#

@peak plover,
Thank you for quick answer, I found this and wrote the code, I don't know how to apply this into server

peak plover
#

You can't put it on your mission?

tender narwhal
#

hmm. how should I put this..
I wrote the code named "WelcomeMsg.sqf", Idk how to load this file.
Should I create "initplayerlocal.sqf" and excute from there?

#

@peak plover

peak plover
#

YOu can put it in the initplayerlocal as well

#

so it's like this ```sqf
sleep 1;
hintC 'my stufff';

#

You can load it by creating a description.ext

#

and then define the file as a function and call it

tender narwhal
#

on the description.ext, how should I define the file and call it?
can I just do this?

[] execVM "WelcomeMsg.sqf";
#

@peak plover

peak plover
#

description.ext


class CfgFunctions {
    class nigel
    {
        class fnc {
        file = "filefolder";
        class hint1{};
        class hint2{};
        class hint3{};
        }
    }
};

#

Then you create the folder and have inside of it fn_hint1.sqf , fn_hint2.sqf

#

then you call

call nigel_fnc_hint1;
call nigel_fnc_hint2;
tender narwhal
#

@peak plover
Thank you! I'll try and let you know the result!

peak plover
#

Good luck and good night. It's 4 am, gotta take a nap

leaden knoll
#

Whats the best method to send an array as publicVariable? toString?

jade abyss
#

uh, what?

#

toString is not a "make this XYZ to a string"-thing you might think it is.

#

+Sending an array over the net ->

missionNameSpace setVariable["VariableName", MyArray, true];```
OR (since you wanna use PubVar (no idea why, but okay)):
```sqf
MyVar = MayArray;
publicVariable "MyVar";

(Hint: str [] = "[]" - https://community.bistudio.com/wiki/str)

little eagle
#

The correct question is:

Whats the best method to send an array across the network?
And the answer is:
Use either missionNamespace setVariable public or publicVariable

leaden knoll
#

Yes, thats much better refraised. Sorry, English is not my first language and was in a haste. Thanks, will look into it.

jade abyss
#

So it isn't ours ๐Ÿ˜‰

little eagle
#

True, but English is basically dumbed down German, so ...

jade abyss
#

...sooooo, its easier for us ๐Ÿ˜„

leaden knoll
#

Hahahaha!!

thin pine
#

it's up to you to decide which items you want to remove. If a tiny backpack contains 5 smoke grenades and one mine detector and the mine detector is absolutely vital to the mission, you would have to find a way to prioritize the removal of the smoke grenades

slim apex
#

Is it possible to find the IDC numbers that are in the ArmA main menu? I have no clue where to start looking haha. Well, i know it's possible. But how can i do it?

peak plover
#

@little eagle Doesn't publicVariable have a size limit? I tried to send an array from HC to the player, but it didn't work. (~300 lines)

#

@tough abyss ```sqf
if(canAddItemToBackpack _item) exitWith {player addItemToBackpack _item};
{if (!canAddItemToBackpack _item) then {player removeItem _x};true}count (backpackItems player);
player addItemToBackpack _item;

slim apex
#

Where do you find those?

peak plover
#

ui_f.pbo in the addons folder of the main arma 3 folder

slim apex
#

Thank you! I'm going to attempt to create a new menu haha (Is that even allowed? :P)

peak plover
#

Everything is allowed

slim apex
#

Oh, nice ๐Ÿ˜ƒ

#

Cheers for the help ๐Ÿ˜ƒ

peak plover
#

No problem, have fun ๐Ÿ˜„

slim apex
#

I'll try to haha

peak plover
#

deleteVehicle (alldeadMen select 9) // nothing happens ( the man died in the gunner steat of an offroad )

#

Anyone run into this issue?

#

setPos does nothing

proven crystal
#

how do i change a players current fatigue when im running ace advanced fatigue system?

#

loadcoeff etc dont seem to work, so i suspect ace uses different variables

solid violet
#

Hey guys!

#

I have a Question. Im building mission where I would like to set an ambush using IED and BRDM

#

I set a BTR to move to the IED and I want the enemy BRDM to push to that IED location afterwards

#

when the BTR is destroyed

#

And the question is how do I sync it :D?

open vigil
#

Make the BRDM move when the IED detonates

solid violet
#

yes but sync the BRDM when !alive btr

#

I cant snc the waypoint with the trigger

#

I can only set navigation point

open vigil
#

Looks like SuicideKing is giving you good advice in Mission Makers. I'd follow his suggestions.

peak plover
#

@proven crystal There's a module for that

turbid thunder
#

you can sync triggers with waypoints, but you need to use the point that specifically says smth about syncing waypoints when right clicking the trigger

#

The regular sync wont work, thats true

solid violet
#

yes he already is, so thank you ๐Ÿ˜ƒ

tender narwhal
#

hello,
Follow up for the displaying rule from yesterday. btw, Thanks to @peak plover .
Now, I'm trying to put hyperlink on hint something looks like this;

#

oh, no picture..

#

darn it. anyways, trying to put hyperlink on hint page, anyone know how to do it?
I used following code:

<a href='http://google.com'>"Google"</a>
#

sth like this ๐Ÿ˜„

peak plover
tender narwhal
#

lovely. thank you!

proven crystal
#

@peak plover i kno there is this module with the advanced fatigue system. but somehow it must be possible to a) set indvidual units performance factor (because there is a slider in the units) and b) how to i make someone suddenly exhausted through a script?

peak plover
#

Yes

proven crystal
#

in vanilla i can use loadCoef or setfatigue, but that doesnt seem to do the job with ace running

peak plover
#
player setVariable ["ace_advanced_fatigue_performanceFactor",1];
player setVariable ["ace_advanced_fatigue_anFatigue",1];
tender narwhal
#

hmm

peak plover
#

@proven crystal Try these, performance defaults 1 and anFatigue defaults 0

proven crystal
#

a cool

tender narwhal
#
_clickableLink = parseText "<a href='http://arma3.com'>A3</a>";

I inserted this code into my welcome.sqf and it looks somthing like this right now:

sleep 15;
"Welcome!" hintC [
    "Line A",
    "Line B",
    "Line C",
    "Line D",
    _clickableLink = parseText "<a href='http://arma3.com'>A3</a>";
];
hintC_arr_EH = findDisplay 72 displayAddEventHandler ["unload", {
    0 = _this spawn {
        _this select 0 displayRemoveEventHandler ["unload", hintC_arr_EH];
        hintSilent "";
    };
}];

I'm clueless as it seems right now ๐Ÿ˜ญ

proven crystal
#

can i find a documentation on those somewhere? have failed to find stuff on ace apart from the wiki

#

what do you mean with default? means fatigue 1 = exhausted?

peak plover
#

I think so, yeah. There is no dcumetation about this. ๐Ÿ˜ฆ

#
sleep 15;
"Welcome!" hintC [
    "Line A",
    "Line B",
    "Line C",
    "Line D",
    parseText "<a href='http://arma3.com'>A3</a>"
];
hintC_arr_EH = findDisplay 72 displayAddEventHandler ["unload", {
    0 = _this spawn {
        _this select 0 displayRemoveEventHandler ["unload", hintC_arr_EH];
        hintSilent "";
    };
}];
#

@tender narwhal try this

#

You are supposed to define _clicable earlier

#

And then call it

#

or ask for it

#
_clickable = praseText "<a href='http://myMalitiousLink.com'>Not Malicious</a>"

"Welcome!" hintC [_clickable];
proven crystal
#

hehe. sneeky one you

peak plover
#

line 43 and 51

#

Seems like instead of player setVariable

#

You just run ace_advanced_fatigue_anFatigue = 1; locally

tender narwhal
#

Great thanks!, @peak plover

little eagle
#

@peak plover 300 lines what?

#

There is no size limit, but you cannot transfer certain data types. E.g. TEXT

peak plover
#

I think that might be it than. My array contains all sorts of things

#

It's an array about all my AIs and their intentions

#

,gear and whereabouts

proven crystal
#

its weird, if i use ace_advanced_fatigue_anFatigue = 100; it fills up the entire bar. if i use any other value, nothing happens

#

i tried 0.1 and so on

#

but also 1, 5, 50

#

nothing happens

peak plover
#

Wierd, Never really tried it

#

Your end goal is to get the unit fatigued, right?

turbid thunder
#

@peak plover wouldnt it be easier to have information about their intentions saved with the unit itself?

peak plover
#

But when I cache them, I delete them

#

I used to have it saved on the unit itself

proven crystal
#

ace_advanced_fatigue_anFatigue is strange. i think it does something to the speed of fatigue regeneration, but depending on how fatigued you already are... i cant make sense out of it

#

other than that i found out that i do not exhaust when running beackwards

#

can you guys confirm that running backwards does not cost stamoina?

turbid thunder
#

I only noticed that running sideways does

#

because running sideways give a speed player of 0.1 to -0.1 even less actually

proven crystal
#

than backward running probably is also negative speed

turbid thunder
#

it has

#

obviously but one would think that the ACE team accounted for that

proven crystal
#

interesting

#

but my acrual problem is i cant mess with fatigue

#

ace_advanced_fatigue_anFatigue = 100; regenerates fatigue to 100%

#

but no other number seems to have any effect

#

wtf?

#

oh mighty oracle of Arma community.... bringeth the answer!

turbid thunder
#

@tough abyss Well I'm not smart enough to do all the calculations nessecarry to calculate the speed of the unit using velocity

#

So yeah the simple way is gonna have to do it for me :/

proven crystal
#

you just gotta visualise the force arrows in your mind mason

#

you are a german. behave like one. its basic engineering and efficiency scienceis moving sideways then the best way to avoid ai fire, because they fuck up calculations?

turbid thunder
#

no, sideways isnt speed == 0

#

but its a very very small number

#

One that doesnt make any sense with the actual speed of the character. That fact was the reason that in a hunter tvt mission in Arma 2, the hunter could move while staying invisible by moving sideways :X

proven crystal
#

ace_advanced_fatigue_anFatigue seems tocount down when you are exhausted. But it does apparently not affect fatigue directly

#

Normal fatigue automatically resets to 60

#

I dont get how this works

rotund cypress
#

Is there a possibility to add CTRG Unit Insignia in MP on clothes like on the SP missions?

tough abyss
#

is it possible to set the player velocity so i can be arma flash?

turbid thunder
#

@rotund cypress What do you mean by that? I don't get why being in MP would restrict the insigna

rotund cypress
#

I mean, to attach it to the clothes

#

For people who arent in a unit

#

Is there like a command for it or something?

turbid thunder
#

Uniforms have two insigna spots, one for the squad.xml and one for what you set in editor

#

there is

rotund cypress
#

What is the command?

turbid thunder
#

You can also define custom insignas in the description.ext to use with this aswell

rotund cypress
#

Aaah ok niice

turbid thunder
#

Though it should be noted that the unit insignia isnt on the same spot as the logo of the squad.xml

tough abyss
#

to become flash do sqf (findDisplay 46) displayAddEventHandler ['KeyDown', '_obj = player; _vel = velocity _obj; _obj setVelocity [ (_vel select 0) * 1.015, (_vel select 1) * 1.015, (_vel select 2) ];']

turbid thunder
#

player setAnimSpeedCoef 1000

#

be careful though as you can die very easily when you fall down

plucky beacon
#

need extra grippy boots

#

also what key would be the flash button

tough abyss
#

well any key @plucky beacon

#

if you want a specifical key script it use whatever KeyDown outputs in )this

plucky beacon
#

so no matter what you do it's going to go fast xD

tough abyss
#

yep ๐Ÿ˜„

plucky beacon
#

plays eurobeat

vague hull
#

I just had a nice find, yet I cant confim this one:
When a unit dies, the dropped weapon is triggering the Put EH

plucky beacon
#

WHAaaaAAAT?

#

Did we just find a way to delete dropped weapons?

vague hull
#

I will test it some more later this evening

#

Actually just right now ๐Ÿ˜…

plucky beacon
#

Lol

vague hull
#

it does

#

when the weapon is dropped, the eh triggers

#

I think I just resolved something really important for some people xD

turbid thunder
#

"WeaponHolderSimulated" and "GroundWeaponHolder" are the "vehicles" that contain dropped weapons

plucky beacon
#

Can you delete the weapon holder?

turbid thunder
#

the simulated one is for weapons dropped by a soldier that died while groundweaponholder is when you drop smth out of your inventory

#

ofc

plucky beacon
#

When it's dropped using the handler

turbid thunder
#

groundholders behave like weapon crates

vague hull
#

I will tzry it real quick sec

#

ye deleting works directly from EH

#

lul

#

how did we not come up with this in years?

#

@meager granite might be in your field of intrest

plucky beacon
#

Are you using cba handler extension?

vague hull
#

not really, just the normal Put EH

#

any problem on your end?

meager granite
#

Very interesting, I'll be sure to test it

#

Atm I have to do each frame check until WeaponHolderSimulated is found

turbid thunder
#

An each frame check for ground weapons? Isnt that a lil overkill?

vague hull
#

We might aswell get KK to know it so it gets an remark in the wiki (since it appears to be rather important)

meager granite
#

it is frame precise and happens only after death, so no

little eagle
#

init eventhandler on the ground weapon holder

vague hull
#

for the init thing yes, the put eh doenst need an addon tho

#

๐Ÿ˜…

tough abyss
#

the put eh you say?

vague hull
#

yes

peak plover
#

What does this achieve ?

vague hull
#

no more weapons glitching away on death (especially for custom revive systems)
actual control over game created simulated wholders (for cleanup)
no more butthurt just for finding a weapon that should be there anyways

#

most usful for persistency missions (where corpses stay for longer then 30 secs)

peak plover
#

Weapons glitching away on death, what does this mean?

vague hull
#

die on a steep terrain -> weapon rolls away and despawns (cleanup)

rotund cypress
#

Is there any way to restrict users from using unitinsignia or clearing them out? (squad.xml)

spring ravine
turbid thunder
#

@rotund cypress No. If someone is in a unit and therefor carries the logo then there is nothing you can do about it, atleast not that I would know if. You can try for yourself though via https://community.bistudio.com/wiki/setObjectTextureGlobal . If anything, this is the command to go for provided that the texture you need to change is actually changable via this command (I have the experience that this isn't always the case). Hope that helps ya

tough abyss
#

even with setObjectTextureGlobal i dont think it affects unit logos

turbid thunder
#

I don't think that too which is why I told him that it doesn't work but nonetheless I provided him with the command that would be used in case the texture was changable midgame

forest jasper
#

anyone know how to get control id of gps

#

i know that only map is ((findDisplay 12) displayCtrl 51)

#

what about gps i'm about to draw icon on it

turbid thunder
#

May I ask what you are trying to achieve exactly?

tough abyss
#

@turbid thunder "trying to draw an icon on it"

turbid thunder
#

@tough abyss That's as logical as an answer as me telling I have a problem with my code and when people ask what I'm trying to achieve with it I state "I'm trying to execute that code"

tough abyss
#

No really lol. Draw 2d he wants to know the display Id of a gps

forest jasper
#

okay i will find it

plucky beacon
#

name is literally leet

barren magnet
#

@lavish ocean btw would it be possible to get an createSimpleObjectLocal command?

peak plover
#

Would it be possible to create simple objects of vehicles and then create an exact replica normal object and delete the simple object when the player gets really close, like 5 meteres.

#

Do simple objects yield enough performance that this would be worth it?

vague hull
#

Just use the dynamic simulation monitor in the upcoming patch

polar folio
#

i wonder. createvehiclelocal creates it 100% local while simple object causes "minimal" network traffic. what are the benefits of each of them? what to use when? been thinking about doing cosmetic clutter stuff in urban areas with local objects.

little eagle
#

createVehicleLocal creates a local object and is mainly used with stuff like #soundsource or #lightsource while createSimpleObject creates a simple object which can be just a model without config.

#

If you'd create buildings via createVehicleLocal and the client disconnects, the object is transferred to the server. It's not usable for the same purpose.

plucky beacon
#

What about creating spooky ghosts that only one player can sees

polar folio
#

hm. that last bit makes it suck

#

i like spooky ghosts though

plucky beacon
#

"look at that guy standing there" "what guy?" "Over there"

#

strings

#

"he's gone!"

polar folio
#

back in arma 2 me and my buddy did that to "simulate" and lsd trip...

plucky beacon
#

Lol

polar folio
#

had goats spawning right your face adn stuff

plucky beacon
#

Spooky

glass zinc
#

is there any way to stop the player from using command action 6 ordering his AI to open his inventory or using his open subordinate inventory command?
Either I want to make the actions disappear from the menu or make the window close before it can be used.
Any Ideas?
Would removeAction work? or no because it is a default command?
Im looking for a way to "Lock" the AI inventory so the player is unable to access it/remove items.

little eagle
#

I don't think you can remove actions from there. All hard coded and no scripting API.

rotund cypress
#

I found cfgMarkers. I assume I can put that in my desc.ext and use custom markers and add them with setMarkerType command?

little eagle
#

No. It only reads them from addon config and not from mission config afaik.

rotund cypress
#

Alright

#

๐Ÿ˜ฆ

#

Is there any way to add custom marker icons to map?

tough abyss
#

Si

#

I don't know how but exile does it

#

So look into that

little eagle
#

Exile is a mod and you can just create new CfgMarker entries in addon space.

#

The question was if it works with mission config and I really doubt it does.

tough abyss
#

Oh ^

#

You could use a paa and draw it over the map. Not sure how effective that would be though

little eagle
#

Once again BI has provided us with a great tool unintentionally.

#
parseSimpleArray format ["[%1]", str _value] select 0
#

This can deserialize numbers and strings too.

#

It's basically a parseAny when used with this contrived looking syntax.

#
_fnc_parseAny = {
    parseSimpleArray format ["[%1]", _this] select 0
};

str -1 call _fnc_parseAny // -1
str "teststring" call _fnc_parseAny // "teststring"
str [-1,"testarray"] call _fnc_parseAny // [-1,"testarray"]
oak marten
tough abyss
#

parseSimpleArray also is faster

little eagle
#

than what

little eagle
#

Yeah. Just use the debug console.

chilly wigeon
#

I don't know that having solid perf is OCD, seems more like common sense to me

peak plover
#

Well. Let's say you are playing at 90 FPS

#

That will mean 1 frame takes 11 ms to process

#

if you are playing at 30 fps 1 frame takes 33 ms to process

#

If you add a script to either of them that takes a full ms

#

90 goes down to ~82 and 30 goes down to ~29

#

Better compairision. 60 FPS goes down to about 56-57 FPS

night frigate
#

That's a very practical and useful way to look at it. Very good explanation

peak plover
#

144 FPS goes down to about 126, if you add 1 MS

#

Well, yeah. The higher the FPS, the easier it is to lose it.

jade abyss
#

So its good, that noone has > 30FPS online (Yes, that was intended to be a joke...)

plucky beacon
#

Is there some way to preload an area or something to help the performance when teleporting to somwhere farther

peak plover
plucky beacon
#

perfect

#

the only other stuttering is from a change in player loadout

peak plover
#

Hold down CTRL+R when in arsenal

plucky beacon
#

use config?

peak plover
#

๐Ÿ™‰

plucky beacon
#

wait

#

wat

#

no there isn't any arsenal

peak plover
#

Fun Fact: CTRL+R in arseanal destroys everyones FPS ๐Ÿ˜ƒ

plucky beacon
#

I don't even know what it does, but kinda irrelavent when this mission doesn't have arsenal

peak plover
#

It randomizes your loadout

#

Resulting in a new set of equipment like every frame

plucky beacon
#

I guess I could load dummies with the possible loadouts so the models are in memory

peak plover
#

Since you can hold it

plucky beacon
#

then hide them in a block or something

#

loadouts are strict so they're not picking anything

#

and the mission starts immediately after teleport

#

I don't have the luxury of having things load while they do something else

#

I think I'll preload the loadouts on dummy models

#

it'll basically do the same thing

#

like manequins

tough abyss
#

is there any opportunity to disable bargates completly without looping the close animation? would be a small but nice feature if there isn't ๐Ÿ˜ƒ

digital pulsar
#

Try disabling simulation or turning it into a simple object

#

It will affect damage model and how AI reacts to it

tough abyss
#

disabling simulation doesn't work and turning it into SO/vehicle vice versa everytime the bargate needs to be opened isn't a good solution as SO's have a sync-delay of ca. 20-30 sec, so there might be a visible problem :/

#

atm we're using a variable which returns true or false and the server loops the animation based on this variable

#

as clients interact with it, yes

#

no we're using the ATM as an ticketdispenser xD

#

yes and it will be closed after the vehicle has driven through

#

no as people can open the bargate everytime, so it needs to be "hold down" 24/7

#

it isn't disabled, it gets opened thru ATM, and closed afterwards

#

as the atm script sets the variable of the bargate to false, then the server realises okay, close it

#

There is no problem ๐Ÿ˜„ it's just a question of simplicity - as with a simple disable script you wouldnt have to use a loop

#

yeah, you can't remove the "open gate" action as it's part of the game i guess. So this action is always usable and therefore the bargate needs to be "Hold down"

#

yeah got it ๐Ÿ˜„

#

its a simple custom variable and yes they are named

tough abyss
#

๐Ÿ‘Œ thanks

little eagle
#

Why would you test your code if you can just put a spawn before it -Quiksilver

meager granite
#

BIS_fnc_inString in 2017

#

Unless it was changed to be wrapper to find string

distant egret
#

Anyone got any idea why my vehicle stops at its first waypoint? using the CBA_Patrol function, no errors.
Using same function for infantry and they keep on moving.

weak obsidian
#

I'm having a bit of trouble with BIS_fnc_findSafePos, it always returns 2D coordinates, but I need the Z axis as well , how can I convert the Position2D to a Position3D ?

#

(I want to createVehiclee a smoke grenade at that pos)

distant egret
#

You can't AFAIK

#

but you can use set to set 2nd array pos to a height.

#

or use pushback

weak obsidian
#

Ok so "manually" add a Z coordinate to the array? But how to find terrain height from 2D pos? ๐Ÿ˜•

distant egret
#

well you can setPosATL for the creating of the grenade?

#

so the height would be from terrain level.

weak obsidian
#

Ok I thought SetPosATL only takes Position3D coordinates

#

I'll give it a go, thanks

distant egret
#

well what you do is first add the Z-axes and then setposATL

weak obsidian
#

Aaah so - I just make up a z-axis like _pos pushback 10; and then next step createvehicle and then vehicle setposATL _pos

distant egret
#

yep

weak obsidian
#

Ok will do, thanks, I got irritated by the Position2D return value ๐Ÿ˜ƒ

#

works! thx

distant egret
#

@little eagle you know of any errors for the CBA_taskPatrol function in the last version? Or did you guys change the params?

#

getting this issue,

params [
["_group",grpNull,[grpNull,objN>
13:12:02   Error position: <params [
["_group",grpNull,[grpNull,objN>
13:12:02   Error 2 elements provided, 3 expected
13:12:02 File x\cba\addons\ai\fnc_taskPatrol.sqf, line 5```
little eagle
#

What version?

distant egret
#

v3.2.1.170227