#arma3_scripting
1 messages ยท Page 292 of 1
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++?
C# in my opinion was the closest
Okay, thanks for the answer. I'll look into both!
ah c++ the pain in the butt, but the savior of all
@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
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?
?! 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)
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
Why would someone do that?! oO
With 64 bit around the corner, I think it won't be an issue
+ffs, you create 100000 Vars oO
Why not?
Its like typing:
useless_1 = ceil random 1000000;
useless_2 = ceil random 1000000;
useless_3 = ceil random 1000000;
I will try 100 millions now
Again: Why? oO
Testing the significense of having too many variables defined in the missionNamespace
lulz, okay^^ hf with that
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?
Everythings possible - Arma.
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
I will try with 3 paragraphs of lorem ipsum
Same results as before
I should try with more later 'tho
What exactly are you achieving?
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
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
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?
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?
Is the thirst broadcasted in the script? Probobly in the kss script the variable is not set as public
@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.
the mod itself does hat @surreal kettle im just trying to read the variable
@peak plover the guy say one can use these variables to build extension: https://github.com/Kurt212/KSS/wiki/Scripting-Extensions
and there is KSS_thirst
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];
but that cant be a global one. every player has their own hunger/thirst value
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
i think so too :D thank god its not me this time
to sync a global variable you have to use publicVariable
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
?
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.
yes i saw that loop continuing after i logged out
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.
Well, you should focus on executing the script correctly first imo. That sounds more important, but what do I know.
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
There are many possibilities, but this isn't a good one imo.
through the initserver though should be alright no?
I just explained why it isn't.
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?
Oh, you mean initServer.sqf. That is different.
Sure maybe. As I said, there are many ways.
Learning purposes? ๐
How do I circumvate this?
_list = +myList;
Why
Array references
Does anyone know how to link an explosive to a Dead man's switch via scripts? I use ACE Explosives.
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!
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
You want to link an explosive that is not placed to the Dead Man's Switch?
yeh, like you do usually
You have to place it.
Wha? I'm still puzzled
Do you want the unit to explode when he dies if he has the explosive in his inventory?
@civic maple foreach items player and check an array of explosives
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];
discovered it while wading through ACE code
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.
Yeah, but that "performance drop" only applies when reading any of the two collided variables.
but with 10 million crap variables... There can be a ton of collisions.
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.
are triggers on dedi servers a problem?
No, why?
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
player is null on the dedicated server.
aaah
player is a command that reports the local machines avatar unit.
because that addeventhandler should be applied to every player
forEach won't work either
and be able to be removed
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
yes but it deactives when the safezone.sqf in run
and that change must be applied to every single player on the server
Shrug
que?
Well, that doesn't change anything that I said.
addAction has to be executed on the players machine
That's just how it is.
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 ๐
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.
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.
hm any clues? ๐
I don't know what exactly you're trying to do.
10 mio variables are stored in about 600k buckets. So you can expect every bucket to have atleast 10 keys. == bad
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
Yes, but we use only about 3k I'd guess.
gonna try by incorporating the switch into the eventhandler itself with if-statement
which would've been a lot easier to do
Yeah. Adding and removing eventhandlers or action is not really needed most of the time.
another topic for that script, is there a way to retrieve the name of the player who activated the script?
activated the trigger?
there is no trigger anymore
just an addaction on a laptop
that runs a script setting the true/false of the publicVariable
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];
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
sideChat won't work either on a server. It's another command that only has effects on the machine where it's executed.
All chat commands have "local effects". Even globalChat, even if that sounds unintuitive at first
oh but that script runs locally
But then it makes no sense that you pubVar the variable
because it's in the addaction :/
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.
wouldn't having an invisible unit placed down and using unit sideChat "..."; work?
You could end up with a different value for "safezone" on the machines for the rest of the mission.
:/
Because first you set the variable locally
And then you use publicVariable
And both machines could receive the network message after they send theirs.
so using your piece of code would tackle that?
Especiially when both enter the safezone at the same time.
or not as it runs locally from the addaction?
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.
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?
I dont know. I'm still confused about how what that trigger even does.
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)
But why the addAction thing?
because at first I wanted a manual switch
but now I just threw away that feature ๐
have the server handle variables
Because I said bad things about it?
because you said it would create complications
You could have both systems, but they would be separate for simplicity.
two separate systems defining variables?
Two separate variables.
Both checked with boolean magic.
Is this for vanilla or with mods?
Which ones? Some could help.
alrighty
A trigger and addAction for everyone to toggle of a fired eventhandler that deletes bullets
right?
I think so, the sentence isn't entirely clear to me but I think we are talking about the same thing
in that case yes ๐
About that trigger
does that mean the bullets are deleted when the blue unit is inside it?
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
why "firedman" ?
because assholes can still use vehciles when I use "Fired" ๐
right
@still forum Do they still use that hashmap impl in more recent times?
Don't know. Guess so. Won't check
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
if (nadedInBase) then {disableUserInput true};
those days of accidentally pressing G were a brilliant time
it was such a widespread and comedic phenomenon
am i the only one who bound gear to G in A3?
lol except the part where your guy stands still like a dumbass for 10 secs
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
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.
Good place to start >https://steamcommunity.com/sharedfiles/filedetails/?id=287378519
Hey, atleast we have mods!
thanks
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
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.
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?
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.
or should i somehow remote execute publicVariableServer "KSS_thirst";
just found that command
@proven crystal use remoteexec without any specified unit
You want it to run on all clients at the same time right?
yes it will be running for all clients.
i launch it from the initplayerserver atm
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
Remote exec should run only on one machine, server prefered
Does it work in sp? Mp when you are host?
it doesnt find the variable
the stuff is supposed to run in a loop on every client
Put the first line where you declare _thirst into the debug console and see if it returns something
Wait
the dieag log outputs gave me a 999 so it never reads the variable
Well I gotta go now sry
aight.. thanks anywy
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
IIRC setMass will affect dudes getting tired
Is there any experts on Draw3D in here?
whats fatigue, whats stamina?
@proven crystal https://community.bistudio.com/wiki/setUnitTrait loadCoef is what you are looking for
@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
thanks. looks interesting indeed. can that coefficiet exceed 1?
Yes
Though be careful when going into extreme values
Or else one step depletes all stamina :D
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
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
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?
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
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
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?
Can you do else exitwith ?
nope
:P
dont need to either
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
I wonder how many of those small quality of life commands KK is responsible for.
That endl is beast
WHAAAAAT that's neat
He'd probably get spammed for such minor things
Where is the best places to get information about scripting and making your own custom missions?
Other than that.. ๐
Apart from the wiki
The wiki is the best place.
Okay. So were do you think someone, with no knowledge should start?
The wiki.
lol
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
Respectfully, thats not what I am trying accomplish. ๐ @plucky beacon
@little eagle This is an index of everything (editing wise atleast)?
I think so.
The best pages were posted already.
scripting commands
and
functions
also
and
Yeah, i've been playing and using the wiki for around 5 years. I just want to refresh my memory with the basics ๐
too many smileys
๐
๐ฑ
Since you already know about the wiki and scripting just get into editor and throw stuff down
eden is pretty intuitive
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/
banned
Banned
I reccomend anyone wanting to know how to get started in mission making look at the eden editor
Why?
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
I made a youtube video on sort of the mentality in starting to build missions
link?? I'd love to look at it
I don't like to self promote here but I'll pm you
Okay ๐
Yeah, self promoting is frowned upon. Mainly because it looks like advertising and advertising is spam.
Wow DriftingNitro. I've seen them before. The world is surely small..
Had the feel they are leaned towards zeus
@drowsy axle Just a bit of advice on your website... spellcheck.
I know. It's still in development. ๐ Thanks again, for the feedback.
Welcome
@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
2D editor was nice as well. I think things like furnishing buildings should be done by scripts like in one of the TPW modules
I oughta make more :I
Definately
I prefer well put together video tutorials
These admittadely were not tutorials, so ya
admitted... admited
brb
admittedly
(I hope that didn't sound as if yours weren't well put together) I learn better from videos than text.
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
right, technically you could even ammend the video with updated parts by linking to an unlisted ammendment
That would be handy ๐
what does loadCoef do eactly? doesnt seem to have an effect?
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
You can make your own unit type properties
What's the cfg that has unit traits?
duh
You cheeky
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
To see the effect you must have some equipment
the more weight you are carrying, the more obvious it is
hm i have my gear full loaded. should be able to see something
is stamina not on by default?
hey is it possible to make an arma soundtrack with a online link of a sound ?
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?
You can't.
Thought as much, thans commy
wait
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
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.
Brilliant. Thanks!
I hope it makes sense to you.
@surreal kettle & @little eagle
I'm tired.
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?
Yeah.
Never even crossed my mind. Thank you
@dim owl do you mean run an audiotrack in game by streaming it?
Just rip the track and put it in your mission.
^
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
Some servers allow that. 50kb .ogg files.
ahh that makes sense, cool
both amuse and annoy other players
haaa
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.
Play a sound that sounds like somone shooting at you.
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
As a mission maker you can use bigger sound files.
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)
Its not a big issue if people download a mission with sounds
But that makes the mission file quite big tbh
Audacity - export as ogg at lowest quality - bam you have a small file that sounds good
If you were going for the no-modded side, then mission file would be the best. But i would always recommend mods
Depends
If you are just using a bunch of 1 - 3 sec sounds then it wont be that big
Good point ๐
But if you were to play sounds, like theme tunes etc, then i would recommend mods
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
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
2000kb is exactly 2mb, dude
I try to keep mine vanilla so they are easily usable without external downloads and more suitable for public play.
not "like"
Too late ๐
My horror mission is 13mb apperently. Waaaaat
Holy hell
Still better then the 300Mb Mission a Server once tried to let me load.
Wtf is that file
4.23 is nothing for an audio file.
Ambience
But I usually like to keep filesize below 10mb
4 digits dont scare people as much as 5
Uncompressed audio can be multiple giga bytes per hour.
But Arma only has shitty codecs.
Jup
As expected of a game.
4MB is less than most of my missions files
That's your problem ๐
Key word being "Most"
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];```
'''
{
[[_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
Hahaha, I saw. Still formatting is wrong.
Wait, can you use remoteExec like that? ( remoteExec ["call"];)
[[_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.
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.
But it never is transfered to anyone
Yes currently id doesnt
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
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. ๐
-2 executes it on every machine,except the server. In SP, you are the server.
I will just add a missionNamespace setVariable withing the forEach. Should solve the issue.
But why Twakkie? The variable is useless on the server
Wait.... am I understanding missionNamespace incorrectly
Is that what your referring to?
Each machine has a different mission namespace.
O....
shattered dreams lol
Man, no wonder during server testing wierd things happened....
I thougth MissionNamespace is the shared environment between the server and clients...
Sheesh
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.
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.
The wiki is never honest. Makes you believe in the wildest dreams and it shows when you open scripts from random people.
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.
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
What is that achieving?
hey can i force the audio setting music volume to be activated?
why would you do that?
for making a great intro with arma 3 soundtracks ๐
use something not considered Music then
like playSound or something
this worked with Music turned off iirc
okay. can i use a soundtrack with playsound or how can i use it as sound ?
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
okay thx sir
@pliant stream
That does absolutely nothing to solve the problem.
i thought he wanted all variables in the missionnamespace to be global ๐
But that wouldn't work. Not all of them are supposed to be global.
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)
What's wrong with addRating?
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)
Hmm, there used to be a pardon action for ace. Didn't know they keep putting it at 0
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
[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?
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
Maybe you set this ^
I actually didnt but interesting to know that it exists
Sides are hard coded.
"WEST", "EAST", "GUER", "CIV", "LOGIC", "ENEMY" (eg: renegades), "FRIENDLY", "AMBIENT LIFE", "EMPTY" or "UNKNOWN".
if a unit dies in a vehicle and respawns 'GetOutMan' will not run?
It might if the dead body get's kicked out
But certainly not if the dead body stays in.
Better not risk it, maybe someone disconnects, it will fail to fire
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
I can set units to hostile to all with side enemy ?
the fuck was that macro up there
very good macro))
Thanks Putin.
Haha, if you hover your mouse off him when his eyes are closed, they stay closed ๐
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?
a code snippet of your rsc button config showing the entries you talk about makes it easier :)
animTextureDisabled = "textures\buttonDefault.paa";
animTexturePressed = "textures\buttonDefault.paa";
animTextureNormal = "textures\buttonDefault.paa";
animTextureFocused = "textures\buttonFocused.paa";
animTextureOver = "textures\buttonFocused.paa";```
But if I got you correctly than you have your rscbutton showing the right textute on hover, but not when you dont hover
Yes ^
What does the button look like when just opening the dialog?
Normal Default ArmA Texture
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
Alright, thanks for the help @barren magnet
Do you think the colour can have anything to do with the animtexture? @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 :)
Haha bg was overwriting it
See, arma ...
is there is a command that instructs units to search a house or is that kind of ai behavior to advanced?
There is no such command.
so, AI just wanders about?
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.
so, you would have to designate waypoints for each room of a structure? - Can you identify a certain structure?
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.
hmm right... so you can detect structures from proximity?
oh
"predefined garrison positions"
just gathering global information... i like to script for dayz one day which may be based upon arma... just saying
_allpositions = nearestBuilding player buildingPos -1;
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.
is that a height problem? (dayz may be different)
It's a RV4 problem.
with arma AI cannot go to the next floor can it?
No, they also get stuck in doorways on the basement level.
@tough abyss Isnt DayZ switching to 100% enfusion?
yeah they stopped using sqf the other day apparently
they call it enforce script (tm).
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
๐
Usually works without it
it's one of those common problems, good you found the result
But not with Draw3D
There's only a couple commands where you need the full path. PlaySound or so is one of them too I think
Ye
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
What does that mean?
like to createthe dialog on a different display?
Do I use createDialog instead of createDisplay?
sure, Thanks ๐
This is wier
Also escape still closes it
Also, instead of having a camera, it was all white.
keyDown eventhandele works fine
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,
Thank you for quick answer, I found this and wrote the code, I don't know how to apply this into server
You can't put it on your mission?
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
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
on the description.ext, how should I define the file and call it?
can I just do this?
[] execVM "WelcomeMsg.sqf";
@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;
@peak plover
Thank you! I'll try and let you know the result!
Whats the best method to send an array as publicVariable? toString?
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)
The correct question is:
Whats the best method to send an array across the network?
And the answer is:
Use eithermissionNamespace setVariable publicorpublicVariable
Yes, thats much better refraised. Sorry, English is not my first language and was in a haste. Thanks, will look into it.
So it isn't ours ๐
True, but English is basically dumbed down German, so ...
...sooooo, its easier for us ๐
Hahahaha!!
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
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?
@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 http://i.imgur.com/DITyFNp.jpg
Where do you find those?
Thank you! I'm going to attempt to create a new menu haha (Is that even allowed? :P)
Everything is allowed
No problem, have fun ๐
I'll try to haha
deleteVehicle (alldeadMen select 9) // nothing happens ( the man died in the gunner steat of an offroad )
Anyone run into this issue?
setPos does nothing
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
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?
Make the BRDM move when the IED detonates
yes but sync the BRDM when !alive btr
I cant snc the waypoint with the trigger
I can only set navigation point
Looks like SuicideKing is giving you good advice in Mission Makers. I'd follow his suggestions.
@proven crystal There's a module for that
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
yes he already is, so thank you ๐
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 ๐
lovely. thank you!
@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?
Yes
in vanilla i can use loadCoef or setfatigue, but that doesnt seem to do the job with ace running
player setVariable ["ace_advanced_fatigue_performanceFactor",1];
player setVariable ["ace_advanced_fatigue_anFatigue",1];
hmm
@proven crystal Try these, performance defaults 1 and anFatigue defaults 0
a cool
_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 ๐ญ
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?
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
instead of _clickable =, just parseText "<a href='http://arma3.com'>A3</a>";
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];
hehe. sneeky one you
line 43 and 51
Seems like instead of player setVariable
You just run ace_advanced_fatigue_anFatigue = 1; locally
Great thanks!, @peak plover
@peak plover 300 lines what?
There is no size limit, but you cannot transfer certain data types. E.g. TEXT
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
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 wouldnt it be easier to have information about their intentions saved with the unit itself?
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?
I only noticed that running sideways does
because running sideways give a speed player of 0.1 to -0.1 even less actually
than backward running probably is also negative speed
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!
@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 :/
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?
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
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
Is there a possibility to add CTRG Unit Insignia in MP on clothes like on the SP missions?
is it possible to set the player velocity so i can be arma flash?
@rotund cypress What do you mean by that? I don't get why being in MP would restrict the insigna
I mean, to attach it to the clothes
For people who arent in a unit
Is there like a command for it or something?
Uniforms have two insigna spots, one for the squad.xml and one for what you set in editor
there is
What is the command?
You can also define custom insignas in the description.ext to use with this aswell
Aaah ok niice
Though it should be noted that the unit insignia isnt on the same spot as the logo of the squad.xml
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) ];']
player setAnimSpeedCoef 1000
be careful though as you can die very easily when you fall down
well any key @plucky beacon
if you want a specifical key script it use whatever KeyDown outputs in )this
so no matter what you do it's going to go fast xD
yep ๐
plays eurobeat
I just had a nice find, yet I cant confim this one:
When a unit dies, the dropped weapon is triggering the Put EH
Lol
it does
when the weapon is dropped, the eh triggers
I think I just resolved something really important for some people xD
"WeaponHolderSimulated" and "GroundWeaponHolder" are the "vehicles" that contain dropped weapons
Can you delete the weapon holder?
the simulated one is for weapons dropped by a soldier that died while groundweaponholder is when you drop smth out of your inventory
ofc
When it's dropped using the handler
groundholders behave like weapon crates
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
Are you using cba handler extension?
Very interesting, I'll be sure to test it
Atm I have to do each frame check until WeaponHolderSimulated is found
An each frame check for ground weapons? Isnt that a lil overkill?
We might aswell get KK to know it so it gets an remark in the wiki (since it appears to be rather important)
it is frame precise and happens only after death, so no
init eventhandler on the ground weapon holder
the put eh you say?
yes
What does this achieve ?
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)
Weapons glitching away on death, what does this mean?
die on a steep terrain -> weapon rolls away and despawns (cleanup)
Is there any way to restrict users from using unitinsignia or clearing them out? (squad.xml)
Anyone know if https://community.bistudio.com/wiki/Eden_Editor:_Configuring_Asset_Previews only works for objects that are already configed for the editor?
@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
even with setObjectTextureGlobal i dont think it affects unit logos
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
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
May I ask what you are trying to achieve exactly?
@turbid thunder "trying to draw an icon on it"
@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"
No really lol. Draw 2d he wants to know the display Id of a gps
okay i will find it
name is literally leet
@lavish ocean btw would it be possible to get an createSimpleObjectLocal command?
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?
Just use the dynamic simulation monitor in the upcoming patch
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.
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.
What about creating spooky ghosts that only one player can sees
back in arma 2 me and my buddy did that to "simulate" and lsd trip...
Lol
had goats spawning right your face adn stuff
Spooky
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.
I don't think you can remove actions from there. All hard coded and no scripting API.
I found cfgMarkers. I assume I can put that in my desc.ext and use custom markers and add them with setMarkerType command?
No. It only reads them from addon config and not from mission config afaik.
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.
Oh ^
You could use a paa and draw it over the map. Not sure how effective that would be though
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"]
some one can halp me with this? https://forums.bistudio.com/topic/202462-helpt-to-conditions-in-misson/
parseSimpleArray also is faster
than what
Yeah. Just use the debug console.
I don't know that having solid perf is OCD, seems more like common sense to me
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
That's a very practical and useful way to look at it. Very good explanation
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.
So its good, that noone has > 30FPS online (Yes, that was intended to be a joke...)
Is there some way to preload an area or something to help the performance when teleporting to somwhere farther
Hold down CTRL+R when in arsenal
use config?
๐
Fun Fact: CTRL+R in arseanal destroys everyones FPS ๐
I don't even know what it does, but kinda irrelavent when this mission doesn't have arsenal
I guess I could load dummies with the possible loadouts so the models are in memory
Since you can hold it
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
is there any opportunity to disable bargates completly without looping the close animation? would be a small but nice feature if there isn't ๐
Try disabling simulation or turning it into a simple object
It will affect damage model and how AI reacts to it
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
๐ thanks
Why would you test your code if you can just put a spawn before it -Quiksilver
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.
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)
You can't AFAIK
but you can use set to set 2nd array pos to a height.
or use pushback
Ok so "manually" add a Z coordinate to the array? But how to find terrain height from 2D pos? ๐
well you can setPosATL for the creating of the grenade?
so the height would be from terrain level.
Ok I thought SetPosATL only takes Position3D coordinates
I'll give it a go, thanks
well what you do is first add the Z-axes and then setposATL
Aaah so - I just make up a z-axis like _pos pushback 10; and then next step createvehicle and then vehicle setposATL _pos
yep
Ok will do, thanks, I got irritated by the Position2D return value ๐
works! thx
@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```
What version?
v3.2.1.170227