#arma3_scripting
1 messages Β· Page 254 of 1
π
who knows what quantum cpuΒ΄s will do...
how about neural and nanotech... if i told you how far advanced they are already you wouldnt believe me
lol... i want a locomotion solution!
monorail π
do you own a VR headset?
no
#arma3_scripting tho
the biggest problem with motion(keyboard/mouse/joy) is that the inner ear does not compute when you in the physical word is stationary but your eyes are telling you otherwise
my bad, sorry
i just get excited about the future π
yea man same here, im testing this mission so gaps in my replies FYI
well... ill end the discussion... as adenteh said, this is the scripting channel π
yea heΒ΄s right but its not derailing too much it was just a bit of chat no alarms
π
ok now its not working again scratches head so is anyone familiar with Vehicle Respawn module expression to set new vehicle name. Any idears?
why arent editor placed vehicle names persistent.. idk
@blissful wind It's bohemia your talking about...
@shut prairie whats wrong with BI?
anyways...i could swear this expression was working not long ago
what are you trying to do exactly?
according to https://www.reddit.com/r/armadev/comments/2t9im5/multiplayer_vehicle_respawn_module_expression/ the expression only runs server side
like i said, the new vehicle that spawns then do so with the name i chose or with the old vehicle name
_this select 0 setVehicleVarName "" - not working
and
_this select 0 setVehicleVar.... (vehicleVarName (_this select 1))
not working
setVehicleVarName only has local effects, you'll need to run it on all clients
and since (apparently) the expression only runs server side you'll have to use remoteExec or something similar
hm... seems more complicated than needs to be, thanks for the lights i ll try it again
are you testing in the editor or on a server?
LAN
sooo you started arma3server.exe?
its just me
did you start a server with arma3server.exe or TADST or whatever or did you start it from the editor?
I guess you're hosting with A3 > MP > host lan then
thats what i said yes
in that case the host is the server AND client
yup
it worked somehow
then stopped working
and now hasnt been working at all
"my code doesnΒ΄t work i dunno why, my code works i dunno why"
old joke
you start with vehicle1, it dies and it spawns vehicle2 and then you want to reset it to vehicle1. Correct?
vehicle1 name is mynameis1, so when vehicle1 dies and vehicle2 respawns, grab and/or change vehicle1 name and set it has vehicle2 name
so that assigned evenhadlers to vehicle1 work ok with vehicle2
yeah I don't think that's going to work, it's probably better to reasign the EHs
i swear i did this already a lot of times and sometimes it works and sometimes doesnt and i cant really remember exactly how to hack it all the time
it's a bad idea
because vehicle1 is already taken by the engine when you want to reasign vehicle2 to vehicle1
yeah nvm.. misunderstood the vehicleVarName thing.. it's not an actual variable.. π
yea its a grab
well, no clue then. π
thanks for your input anyways
if I am making a dialog and I want it to show a players profile face is there a way to do that?
I can't see a way without using a camera on the player
Or a camera on an AI with the same face
Unless there is some pictures somewhere in the files..
if i use a camera on the player would I be able to make it like a transparent backround and just purely show the unit?
There is probably a way since you are shown a preview of what the character looks like when you are editing your profile.
that is exactly what I want lol
@halcyon crypt and now its working and i didnt even change anything, just went through it again
I don't think you could use a camera with a transparent background, but you could make a flat background
hey guys i'm making a map with a lot of mountains and am considering making a ropeway with gondola
i seen somebody make a mod with working trains
how possible would it be to make working ropeway?
one of these type deals
i'll be making the models
Where is a good place to downlaod missions files to learn SQF?
SQF? Safe Quality Foods right ? π
Status Quo Function
π
π
hm, could it be, that drawIcon3D has a prob with Images inside the mission?
It definitely is possible, perhaps try one of the methods mentioned here http://killzonekid.com/arma-scripting-tutorials-mission-root/
drawIcon3D ["\a3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\SI_candeploy_stand_ca.paa", [0.1,0.8,0.1,_Transp], (_Unit modelToWorld [0, 0, 2.25]), 1, 1, 0, _Name, 2, _FontSize, "RobotoCondensed", "center", false];
works.
Copying the same file to: MissionFile\imgs
drawIcon3D ["imgs\SI_candeploy_stand_ca.paa", [0.1,0.8,0.1,_Transp], (_Unit modelToWorld [0, 0, 2.25]), 1, 1, 0, _Name, 2, _FontSize, "RobotoCondensed", "center", false];
Does not work.
BUT the file is beeing loaded by Interfaces/Displays
Just read what you wrote Penny... -.-
Object attached to players are still causing me a head ache because they are colliding with other players in MP and killing them. Tried to disable simulation of those objects, but attachTo forces simulation. Any new ideas?
setmass
Either that or disableCollisionWith, which is a pain in the ass
Just use setMass with an incredibly low mass, and the killing should stop
I'll try setting the mass to something as small as possible and see if this still happens. Thanks!
Works like a charm in SP, have to check in MP to make sure
I just tried those MISSION_ROOT tricks from KK mentioned by Pw above, works, very cool
oh wow. People found a use case for parsingNamespace after all. I guess I lost my bet
What is it?
EDIT6: So far, this is my favourite. MISSION_ROOT can be defined in description.ext. missionConfigFile just doesnβt work this early, but __FILE__ does!
//description.ext
__EXEC (MISSION_ROOT = __FILE__ select [0, count __FILE__ - 15])
//from any script
_root = parsingNamespace getVariable "MISSION_ROOT";
http://killzonekid.com/arma-scripting-tutorials-mission-root/
from above
guys does anyone know the altis life discord? its an emergency
got an error ive never encountered before and i need an a3l scripter
i looked everywhere
Ah, nice
huh? It said "you are invited", I pressed "join" and now I'm on the AL discord
altisliferpg.com is not the right one?
i suppose it is but everythings locked
last one i was in had like 200 people in it
but anyways.. can anyone help me here?
idk maybe
@hidden void https://discordapp.com/invite/eRD3E
I've been looking around but not finding anything but is there a code to make AI wonder around.
you can setup waypoints with SQF or use commands like moveTo/doMove
Alright thanks
if you pass in a radius to the create waypoint command it will generate a random waypoint with in that radius
_group addWaypoint [position _unit,_radius];
call that however many times for the amount of waypoints you want in that radius
for [{_i=0},{(_i < _wpcount)},{_i = _i + 1}] do {
_group addWaypoint [position _unit,_radius];
};
if you make the last waypoint a CYCLE they will continue around for ever
@tough abyss
Position being the X & Y axis?
How would the code look like for a single AI http://i.imgur.com/LyfW4kl.jpg @vale hull
for [{_i=0},{(_i < 10)},{_i = _i + 1}] do {
(group this) addWaypoint [position this,500];
};
position _unit < gets the position of a unit
Ok so my test AI runs instead of walks. Any code to slow them down?
you know you can place these waypoints with the editor?
and things like speed
but to do it with script you can use these inside that for loop
setwaypointcombatmode and setwaypointspeed in particular
I've done set waypoints but I am aiming for random to throw off my group running different operations.
you'll probably want to add a 'cycle' waypoint at the end too
wp1 setWaypointBehaviour "SAFE";
wp1 setWaypointSpeed "LIMITED";
for [{_i=0},{(_i < 10)},{_i = _i + 1}] do {
(group this) addWaypoint [position this,50];
};
wp2 = (group this) addWaypoint [waypointposition wp1,0];
wp2 setWaypointType "CYCLE";```
nps, should walk with that one too unless they get into combat or spooked if they are civs
Yea I'm currently mapping and scripting civs to just wonder the town. I already have a patrol script set. Just couldn't seem to find the right script for civs.
Vehicles - due to technical limitations, the unconscious state in vehicles is not supported. Players die immediately
lul, moving dead bodies out of vehicles is indeed too advanced feature for Arma 3
just for Arma ? lol
π
whast the problem with z ? the multiply ?
yea i was going there
or grab the result of the z multiplication and then subtract it
stupid Random delay of setPos/setDir on MP... i believe... i'll become insane with that...
Hu?
Is player modelToWorld [0,10,0] not enough?
_Pos = player modelToWorld [0,5,0];
hint str _Pos;
Wouldn't it be better to use lineIntersectSurface? if smth < 5m -> DoYouStuff
Or lemme ask this: What are you trying to achieve?
wouldnt that only work if the player is looking straight ahead?
i mean if you dont use the z value
bah, not looking, i mean the barrel, you know
lmao
modelToWorld operates in the AGL system, so the ground is always at 0
estel made it less shitty though
you should've seen it before lineIntersectsSurfaces existed
yikes
in VR or is that related to a slope again?
_p0 = AGLToASL (player modelToWorldVisual (player selectionPosition 'righthand'));
and then convert back via ASLToAGL before using drawIcon3D
weaponDirection is ASL (or rather, not modified by terrain)
And if you scale that with vectorMultiply
you obviously don't account for the bend reference system that is AGL
When in doubt, convert everything to ASL..
CBA_fnc_kill = {
params ["_unit", "_killer"];
private _projectile = "B_556x45_Ball" createVehicleLocal [0,0,0];
_projectile setShotParents [_killer, _killer];
_projectile setPosASL AGLToASL (_unit modelToWorld (_unit selectionPosition "head"));
_projectile setVelocity [0,0,100];
};
hype for 1.64 this week
Added: It is now possible to set a custom speed for the animate and animateSource script commands
sounds interesting - what are practical uses for that?
windmills / windturbines perhaps, basing the speed on the wind?
probably not but still π
TakeOnMars VR maybe
Maybe you can instantly open doors with charges now instead of having to wait for the slow ass animation
Only seems to work for objects created with createSimpleObject, and will only work for certain selections.
no
Does it understand that call compile str if true actually works though?
Can I use this server-side to create a marker with the text "PANCAKE CITY"?
test = createMarker ["marker1", [2106.9,7898.49]];
test setMarkerShape "ELLIPSE";
"marker1" setMarkerSize [300, 300];
"marker1" setMarkerBrush "SOLID";
"marker1" setMarkerColor "ColorRed";
"marker1" setMarkerAlpha 0.3;
"marker1" setMarkerText "PANCAKE CITY";
Or do I need to do something more?
When a script is entered in the init box in the editor on an object, where is that executed? Just on the local client?
should work.
don't name it something generic as marker1. At least give it a tag. Otherwise it might collide with an already existing marker
Can i just play the sound of an Arma 3 explosion?
yes
@little eagle any ideas on my question?
Eith play3dSound?
yes ^
@lime tangle no. Just weird that you use test and then "marker1"
It's playSound3D though
not play3dSound
but same diff
commy do you happen to know where that tutorial is about installing the arma modding setup? you know when you end up with P: drive and a3/ folders etc -- i'm doing a big OS reinstall here
the BI tool creates the P drive
there is this:
http://ace3mod.com/wiki/development/setting-up-the-development-environment.html
but that probably won't help you
I'll read it anyway, probably valuable info, thanks
ok so Syndikat is supposedly GUER but the trigger activation has to be set EAST π
@little eagle thanks a lot for the help.
yw
@little eagle > Maybe you can instantly open doors with charges now instead of having to wait for the slow ass animation
You've been able to do this for quite some time https://www.youtube.com/watch?v=u7YwHxUPQzo
but those are custom buildings... with adjusted model.cfg... of course you can do it with those. but not the stock content
Yes you can, I used that building because it was made for my mod by em. But the system works perfectly on stock buildings as well
How does one instantly open the door though
On stock buildings that is
Let me take a look, I wrote it a year ago.
Speed up time first π ?
no can do in MP
speed: Boolean or Number - When true animation is instant. Since Arma 3 v1.65.138459 Number > 0 is treated as config speed value multiplier
" Since Arma 3 v1.65.138459 Number"
I knew you weren't able to alter speeds before, but instant was always possible
well not always
but you know what I mean
how?
by setting it to true, the code shown in that video has been functional for at least 6 months
the third parameter is not in 1.62
_target animate[_anim, 1, true];
yes it is
try it now if you don't believe me
that's the code I used for it at least 6 months ago
I'm on dev atm
Never heard of the thrid parameter prior to 1.64 : /
did they lie to me?
dunno, it was a neccessity for the breaching system though as you could imagine.
Having the door slowly open just defeated the purpose entirely
instant: Bool - true: animated instantly and without sound, false: normal animation (since Arma 3 v1.47)
ohh
1.46. I must've missed it back then
wiki history ftw
Probably why when I tried to find a decent breaching system none existing a while back
around 1.50
yeah
That's why I wrote that one
It's not perfect but it's pretty solid for my uses
I reallllly wish we could remove/blow hte doors off though
That would be incredible
Or better yet get a destroyed door model
they'd have to redo all the house models. not gonna happen
Yea I know, unfortunately.
I know in DayZ they changed how the doors themselves worked entirely so hopefully something will be doable there.
But who the fuck knows how enScript is gonna turn out
I don't think another script language helps when the engine and the models don't support it
If I understood them correctly they redid them in the engine a while back
Around a year ago
To allow for locking and them being their own objects and not just part of the buildings
In DayZ that is of course
locking is cute when you can vault right through the doors
Lol right, I haven't actually tried it in DayZ but I'm sure the same issues apply there.
idk dayz. too few ifv and tanks there
Yea, I enjoy playing it every now and then but it's definitely limited without all the extras from ArmA even once the mod tools are available. I've mainly been watching progress on the engine itself since they've claimed they'll be using it for ArmA 4, but even with that who knows if that'll play out.
I will say I am enjoying the renderer though, getting 150fps on full servers in cities with maxed settings(minus AA) is certainly a nice change of pace.
But only time will tell how the engine pans out and if we get it for ArmA 4 and I can't even imagine how far out ArmA 4 would be either way.
Is onRespawnMenu being executed in uiNamespace a bug or intended?
Would there be a way to script some kind of answering machine? For example a player types !rules, and a script will answer using any chat channel or even a hint to display text?
!g execute scripts via chat
okay... lets try again
!google execute scripts via chat
π¦ no bots snif snif
@tough abyss http://www.armaholic.com/page.php?id=26377 there
Does anybody have something ready - or can point me in the direction - regarding a musicplayer/script/trigger when player(s) are in certain verhicles? i.e player(s) enter a halicopter and a tune plays. I've seen alot or radioplayer or menubound/triggerd play scripts, but haven't really found that one thing...
ah awesome, thanks @blissful wind
script that check if player has entered a vehicle and playSound?
Yes, and preferably also stops it when player(s) are no more in said vehicle(s).
vehicle created in editor or script ?
editor
name your vehicle, add an eventhandler and bam π
But, does that play locally or for everybody
well, it's for shits and giggles; our team/group flies out to objectives as an airdrop. They want to play Somebody To Love or Valkery, albeit not tooo loud π
You're always welcome to partèyh - when this works and is in place, hahaha
i saw your video on the looking for squad or whatever it was... thanks for the invite but i ll pass... too much noise and im always grumpy lol
Ghehe, that's cool, love it or hate it... now just that script to get set
sure man we cant all like the same flavors
how would I go about making a custom loading screen? Sort of like the way that Exile does it where the whole screen is taken up by an image.
I'm fairly certain that's an addon deal.
Not 100% sure though, since I've never seen it done in vanilla arma 3.
I'm almost positive you need an addon to do it, just no clue how :/
Can i lock a house doors even for AI?
Hey ppl any1 with knwowledge of HeadlessClients in here?
yes
Look in #headless_client @shy bear :v
already done that no response..
Asking in other channels will not get it answered any faster. What it will do is annoy other users.
^
Evening all, how do I get a function to execute or change the state of something in another scope, e.g. with an interaction which sets a procedurally generated task. I tried outputting the task name as a string into the closure of the function
{[toString[_demoTask], "SUCCEEDED",true] spawn BIS_fnc_taskSetState;},
However it still has the scope problem, is there a way to do a callback in ArmA 3?
pass _demoTask as argument in addAction
there is a parameter for that
whatever you pass will be _this select 3 in the statement scope
Hmm tried this an it is complaining about type {[_this select 3, "SUCCEEDED",true] spawn BIS_fnc_taskSetState;},
Gonna try _this select 3[0]
_this select 3[0] does not look like SQF
Hmm that doesn't work either
what does it complain about exactly?
That select 3 is an array and not a string
full addAction code?
I am guessing I need to access the first element in that array as I am only passing one argument, not sure what the syntax for a 2d array is though :/
Would be nice if Arma had hashmaps π
Thanks @little eagle , it is working beautfully now. Mind if I credit you in my Mod?
But I haven't done anything yet.
Yes, you have helped me greatly in writing these functions π
Sure. Thanks. yw
Anyone have any recommendations on a good intro script for a mission?
What do you mean 'intro script'
As in a way to start the mission with cinematic feel. I am experimenting with fnc_type_text etc
Oh. Here's a script I use in my missions.
I have done some very neat things with it.
wow thats cool thanks!
You're welcome.
Slightly off topic but have you made any campaigns? I am trying to figure out how to get my missions to work in side a campaign folder.
Is this the best way to check if an object is a vehicle or not?
_this isKindOf "Tank";
so I have this camSetTarget _unit and instead of putting it on myself when I die I would like it to set the target as the person who killed me, how would I do that?
camSetTarget _killer;?
thanks, ill try
is there a way to have structuredtext showing an image in the back and a text overlaying it?
2 seperate controls maybe over each other? @vague hull
Trying to avoid that :S
I don't think you can since the image path is the text field for images
I may be wrong though
I am trying to make something like the mpinterrupt menu
And its really stressy handling always two controls when only the button is what I care about
one control, one texture
yeah.. but I need to move both just like when the optionsbutton is clicked
maybe put them into a third control? A controls group? You can move that and both child controls will move, yet you can give each individual a different texture
what was the magic sqf cmd combo to filter specific weapons from the config space - say all launchers?
_allLaunchers = '(configName _x) isKindOf ["Launcher",configFile/"CfgWeapons"]' configClasses (configFile/"CfgWeapons");
_allLaunchers = '(configName _x) isKindOf ["Launcher", configFile >> "CfgWeapons"]' configClasses (configFile >> "CfgWeapons");
You'll get the paths with this though, and the bases
Can anybody help me with this? I've set respawndelay to 10 seconds. Player respawn_west is a marker, and set in the mission; when people join the game, or die, they see the black screen /w a timer but cant join. Apparently under the timer theres an invisible button, but i cant for the love of god find anything to make it visivle
if i dont add that people instant respawn to the respawn_west marker...
@clear tendon I want to help you but its a bit confusing what youΒ΄re saying, can we get a screenshot maybe?
@blissful wind would need to do that at home in a few hours, but do you know the coundown timer you see when you die - if set?
@clear tendon sure man, its confusing you say people join but then cant join
ah, let me rephrase
people can connect, they join in the game, wait to respawn, the countdown timer shows --:--:-- but nothing happens, untill you look for a button, that's about 1-2 below that counter... which you cant see.. π @blissful wind
areyou using the respawn templates MenuPosition or MenuInventory ?
None set, read it default if not, correct?
so they should respawn instantly after the timer
Yes, they should... but dont untill you hit that button they cant see
the timer shows like at the bottom of the screen.. there isnt much space for anything else
@little eagle to use playSound3D with this sound \a3\Sounds_F\environment\ambient\quakes\earthquake1 i need to add some extension? The sound is in that list: https://community.bistudio.com/wiki/Arma_3:_SoundFiles.
@clear tendon a screenshot would help, so when you can...
Here https://community.bistudio.com/wiki/playSound3D it says it need a extension, but the sound list give many sounds path with no extension.
I tried \a3\Sounds_F\environment\ambient\quakes\earthquake1 and don't noticed any sound.
add .wss π
@blissful wind i will
@tough abyss I think no extension means that it falls back to .wss
what is important is that you either do or do not use the leading slash in the path
I can't remember which, but one way means "search mission folder" while the other means "search addons folder"
Did the update to str escaping happen in 1.64?
Yeah its in changelog, should be easy to test out
let's see what this breaks
any suggestions how to visualize and output info best about damage event for vehicle test mission?
health bars. if you mean for every hitpoint, then multiple health bars
and they should change from green to red
it's simple and effective I think
well how useful is that? like to get the damage state of the target vehicle is useful, however besides that i would think one wants more specific info
what else is there?
like what components were damage in what order and how grave (in %) - same for crew, direct vs indirect, deflection event, impact angle, project speed and energy at impact
probably stats of affected components (from config and penetration material)
for insurance purposes ofc π
probably stats of affected components (from config and penetration material)
pointless. the biggest impact comes from the denisity of the hitpoints in the hit-points LOD. No way to get that with scripting
Yeh, the str update borked all the life servers @little eagle
Won't take much for them to fix it, plus its a good change
Will allow to properly parse a str _array that contains user input, useful for sending info to extensions etc
Am kinda surprised it actually broke something to be honest. Be interesting to see the code it broke, unless you were manually parsing strings to escape quotes
of course it breaks stuff
you changed the behaviour of a low level command completely
that always breaks stuff
That lowlevel engine function was broken to begin with ;)
Anyway lifeserver issue is an sqf function to parse a string, before it was sent to extension
was it broken though? or was a single "" inside a string meant to be a single escaped quote mark.
Tonic had old sqf function to parse a string and replace " with ' before it send a raw sql query to extension to run.
Would this affect A3Wasteland?
Maybe
Nah wasteland will be fine
We'll hear about it if it does
Thanks - A3Wasteland is looking okay.
oh god. setUnitLoadout is fucked
Elaborate?
they switched ammo count and mag count
π
so now instead of 7 mags with 30 rounds it gives 30 mags
but not with 7 rounds
because apparently it ignores the ammo parameter if the mag count is > 1
My Arma 3 is updating!!!
120 fps on a 3DFX Voodoo 2 mb! Wooooo! Kinding π
Yeap they changed the syntax for set/load commands, did have a nice warning on the biki. Been waiting on this update before i touched it
I will take a look.
@tough abyss what set function had changed syntax?
setUnitLoadout
Thankyou!
Looks like remoteexec with -2 or a local object, doesnt call the function :(, used to.
in SP?
in MP
-2 should execute it on every dedicated client
Yeah i know only testing with local server & 1 client connected atm.
PVEH ftw
man you are calm. BI breaks so many things this update and you just "code around it"
nm i fucked up
phew
Hai! I noticed "getDir _road" allways return 0 after using it in tons of situations... It's right?
For example, to place a vehicle near a road, along it, i get the road orientation with getDir _road.
seems like a bug. or roads are just not supported by the command
What about https://community.bistudio.com/wiki/vectorDir ?
@little eagle thankyou i will try that.
i can set the vehicle vector dir acordingly to the road vector dir.
lol, vectorDir returns... [0,1,0].
[0,1,0] is 0.
i want to place sandbags on the roads on the obvious position they should be, but can't
It's an automatic process, so i need to calc road direction.
hmm
I will need to find the connected roads and make a vector from one to another.
Thats!
But this is not ok for crossroads.
Roads with 3 or more connections.
And i place Towers on the crossroads.
But can't calc better tower direction.
let's see....
_objectOnRoad setDir ([getPosASL _road,getPosASL ((roadsConnectedTo _road) select 0)] call BIS_fnc_dirTo);
@blissful wind it'll come tomorrow (the screenshot)
new question: how can i limit usuage of a synced module, by certain players? I.e i have 4 units (player1, 2, 3, 4) and those are allowed to use it, and not the rest...
make a reserved slot script, name your player slots and use them in said script
could use UID, mine uses squadXML tags
i've got four players: pilot_1, 2, 3, 4 --> only those should be allowede to use the module
then you just restrict the player slots pilot_1,2,3,4 to player UIDs? Or do you want other players to get in the pilot slot too but not use the module
Anybody who takes one of the pilot slots can use it, the rest cant
what module are we talking about here?
thirdparty, sadly; spyder addon: vehicle spawner
normally the spyder addon needs to be synced to an object, but that doesn't limit anybody to use it
are you even >7 yo?
in the main menu, single player, tutorial
or even watch a youtube video on it
then GTFO
@tough abyss back to the subject. normally the spyder addon needs to be synced to an object, but that doesn't limit anybody to use it
hm that's a tough one then
the addon has an init field though
@brave fog if you're not gonna help please shut it. @lavish ocean can you keep an eye on this one?
hm hm doubt that's gonna help us
do you have a link to an armaholic page?
@brave fog please stay out of this
alright @clear tendon this guy's gonna help you out
well, please do tell
wtf what?
Yeah, totally helping @tough abyss
@brave fog module needs sunch to an object, but i want it to be limited to set players to use it, instead of everybody
I'll PM you, I've had enough of this twat
Just right click his name and block him so he can troll himself.
thank you @willow basin
I asked Dwarden if he could get Southern off this discord server permanently
We'll see what happens π
@clear tendon Problem solved?
still working on it
yoo hoo FM I need help
I was referring to Ban Hammer type help.
oh heh
Loads of people out there better at scripting than me.
I have learned the basics of scripting now but i'm not even sure if the thing I want to do is a scripting thing or a config/modding thing
so I'm floundering around a bit
do you do any config stuff?
No, these days I just keep order. Too busy with RL stuff to do Arma work.
ok
How can I check to see if the NVG slot is empty on a player?
I want to remove NVGs if a player tries to pick them up.
hmd _unit == ""
can you script weapons on vehicles? like if I wanted to strap a pair of 50 cals onto the seadoo?
commy2 can you get me an invite to chat on the ace3public slack server?
when i press get invite nothing happens -- and I have no 'domain name' to enter
do i use email address?
Yes, your email address
got it thanks Pw
for the record whats NOT in 1.64:
b:CONTROL ctrlsetdisabledcolor ARRAY
b:OBJECT setunitloadout CONFIG
b:SCALAR tofixed SCALAR
b:STRING callextension ARRAY
n:isremoteexecuted
u:getunitloadout CONFIG
KK updated the str documentation https://community.bistudio.com/wiki/str
@open vigil this guy SouthernLaw was trolling and spamming the chat as you can read a bit back but @clear tendon and I got the script working
I took care of it
is there a way to have infantry use vehicle weapons in A3?
setUnitRecoilCoefficient should this command be ran on local or server
local effects
is there some trick to get the render to texture resolution higher than 512x512 without messing the picture up? (Also what is better for quality lesser or more mipmaps and what is the aspect? o.O)
Thanx allready :)
Maybe the answer to this should also be added to:
https://community.bistudio.com/wiki/Procedural_Textures
ok I think I figured out the aspect ratio
afair no
Rendering context "main" created successfully, memory taken = 294901760
17.862: -------------------------------------------------------
17.862: Aperture surface format R32_FLOAT
17.865: -------------------------------------------------------
17.865: Creating rendering context "r2t"
17.865: Creation parameters:
17.865: _width = 512
17.865: _height = 512
from diagnostic.exe debug.log
seems to be hardcoded
512x512 is the hard coded maximum iirc
Is there any other way to do the same thing?
I am trying to render a character in a dialog
Thx for the answer first of all, I just thought I was to stupid to get it to work properly ^^
u:useaiopermapobstructiontest BOOL
did BI leak this into 1.64 by mistake?
forceFollowRoad
setConvoySeparation
getMissionLayers
getMissionLayerEntities
other new undocumented stuff
getMissionLayers might be a 3DEN command, returning the layers available on the left side pane
getMissionLayerEntities probably returns all entities connected to one of those layers
Kinda useful actually, i had a moment in the past where I could've used that nicely
Hi guys. How can I set a global variable that I can use in all my sqf scripts?
is it like this? global ["_myGlobalVariable1"] ?
MyGlobalVar = any. @nocturne basalt
thanks
I thought I had to tell the script that the variable is global
this means that its only local and only accesable inside the sqf script right?
_myvariable = _this select 0;
?
@austere granite good call - yet none of these cmds are used in BI scripts or missions
ok spoke too fast - found one:
private _linkedLayersString = _objective getVariable ["LinkedLayers", "[]"];
private _linkedLayers = call compile _linkedLayersString;
{
{
_clutter append _x;
}
forEach (getMissionLayerEntities _x);
}
forEach _linkedLayers;
.\a3\modules_f_mp_mark\Objectives\functions\fn_moduleHvtObjective.sqf
@nocturne basalt
If the variable begins with a leading underscore it's a local variable. And those are only available inside the script and only inside the scope they are defined and all child scopes.
If the variable begins with a letter from the alphabet, it will be a global variable and available in all scripts (but only in the current namespace they where defined).
ok thanks
is there a way to rotate a dialog control? I would like to display an arrow image and rotate it according to relative direction
ctrlSetAngle
thanks, Senfo!
Np
Hint: ctrlSetAngle only rotates the IMG, not the Ctrl itself.
I get strange 'ghosts' from the image, using this approach as on the bi wiki, any ideas? http://pastebin.com/eqarN1J1
Hey,
Getting
19:41:33 "extDB2: Error with Database Connection"
With altis life, any idea?
(Note: I have added new columns and stuff to the db, and added PMC "East" to it aswell)
extDB2 has its only log file, it will have more detailed info about the error.
Also you should try ask in altis life discord for support i.e http://www.altisliferpg.com/ link for discord at the bottom
Yeah they got the domain back and the community is redoing stuff.
Including discord & github repo, you are best off asking there for support>
Also the discord link works fine
Oh, damn
They bought a new domain like armaliferpg.com or something
A couple weeks ago, so
@tough abyss
I LOVE how descriptive your logs are.
[16:53:12:356391 --4:00] [Thread 12088] extDB2: Database Type: MySQL
[16:53:12:362706 --4:00] [Thread 12088] extDB2: Database Session Pool Started
[16:53:12:420296 --4:00] [Thread 12088] extDB2: SQL_RAW_V2: Initialized: ADD_QUOTES True
[16:59:10:202128 --4:00] [Thread 12088] extDB2: Stopping ...
Default extension only logs on errors, debug extension logs erros & all inputs/outputs to extension
So if you are still getting database errors, it will be sqf error or you are looking at wrong logfile.
Regardless you should go to altis life for support.
Uhm, problem with that
Idk what forums i should use
The one they recreated the original forums
or the one that's "official"
@tough abyss extdb_debug isn't posting logs
Well you messed up, you just switch out the extDB2 dll with the debug one
Anyway i don't provide support for extDB2 anymore, i closed the repo months ago and rewrote the extension.
Plus i really don't wanna be spamming this channel with non sqf chat.
Issue is 99.9% going to SQF error or you didn't look at the correct logfile.
If there is no log file then the extension didn't run at all.
1)Missing requirement (should be impossible since you had normal one running)
2)User Error
Anyway you really should go to altis forums/discord (say hello and wait for someone to give you access to the different channels) and just ask for help.
goodluck
@tough abyss The extension did run. the server rpt shows @extDB2_DEBUG is being ran
That shows the addon was loaded, nothing todo if the extension ran or not
Is there any way I can mimic the CAS gun run support module via scripting?
o.O my callExtension script suddenly stopped working π I remember that "str" has been changed, does this maybe also affect "format" ?
Ah, nevermind. BattlEye decided to block the access to my DLLs again -.-'
Disregard that last post, I got it.
surely someone else has already made PiP drone displays working? hellllpp http://puu.sh/rlM2d/4373b43a2e.jpg .. 10 seconds later.. of course: http://killzonekid.com/arma-scripting-tutorials-uav-r2t-and-pip/
Oh, now I have a question.
_grenadierArray = ["SQL1"];
sleep 1;
_grenadeposition = getPos (_grenadierArray select 6);
hint str _grenadeposition;
"Error, Zero divsor" in Line 3
Is it because I'm selecting 6 from an array
nothing's returning for the 6.
ah, probably because i ripped it out of an eventhandler
What's the best way to sleep within an eventhandler?
hint str count _grenadierArray;
Because I know sleep doesn't work
[] spawn { ..all that code }; inside the event handler
if that event handler is gonna run a lot, that will be bad to do..
Ah, thanks. And it won't be, only about, uh, six times at the max.
ok. pass any variables into the new scope of the spawn, thru that empty [] array
{
if ((_this select 5) == "UGL_FlareCIR_F") then
{
[] spawn {
_grenadierArray = ["SQL1"];
sleep 1;
_grenadeposition = getPos (_grenadierArray select 6);
hint str _grenadeposition;
};
};
}];
Whups, I see where I bollocksd that up
if that unit is named sql1 in the editor like that, then you can refer to him as that: getPos sql1;
well, i want to get the position of the IR grenade he fired
oh gotcha
and i'm actually not quite sure where i messed up that code now
getPos (_this select 6); projectile: Object - Object of the projectile that was shot out
That doesn't work.
It doesn't take the local or global variable of 'this'.
Syntax highlighter doesn't highlight it like a variable either.
oh, cause you have to pass that whole _this into the spawn
_this spawn { all that };
it's a special instance of scope getting changed, dumping all your local variables I think
ahh!
eureka
that's actually still not highlighting the variable but i'll try it anyways
_this select 6
not this select 6?
yep
Oh. Hey. It worked
gr8
Thanks, Syntax highlighter. Β―_(γ)_/Β―
And thank you, opec!
np
scroll up and help me get PiP tv displays on remote uav designators working π
I wish I could π
Oh, another quick question -- What's the best way to add height to a returned coordinate array?
_high = [_pos select 0, _pos select 1, (_pos select 2) + 999 ];
Thanks!
@tough abyss https://youtu.be/vOdsKS8DhR4 Got it all worked out. I'll make a lot more improvements (I already adjusted the timing of the chat and actual splash so it's more realistic) and I'll end up making it good and proper, but thanks again for your help.
_mypos = (getpos _unit) vectoradd [0,0,200];
how to visualize a point of impact well? like some particle cloud or something else? sample code/script would be much appreciated πΌ
is it possible to animate certain effects?
for example these:
class Exhausts {
class Exhaust1 {
position = "exhaust_l";
direction = "exhaust_l_dir";
effect = "ExhaustsEffectPlane";
};
class Exhaust2 {
position = "exhaust_r";
direction = "exhaust_r_dir";
effect = "ExhaustsEffectPlane";
};
};
class WingVortices {
class WingTipLeft {
effectName = "WingVortices";
position = "body_vapour_L_E";
};
class WingTipRight {
effectName = "WingVortices";
position = "body_vapour_R_E";
};
};
the wingvorticies won't follow my wings when they fold back.... If it's not possible, can I hide them, and unhide another memoryPoint for the effect instead? or maybe switch to another memoryPoint when a certain animation is activated?
@nocturne basalt, could you format your code? It looks much nicer (and is more legible) that way. https://support.discordapp.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline-
3 tildes on each end `` `
@nocturne basalt can you add the memory points to the skeleton? not sure
put them in selections in the skeleton
Tildes are ~
Backticks are ` π
can you do it with publicvariableclient? i didn't think you could get other clients owner IDs from a client?
don't know of another way other than remoteexec though
true
with remoteexec you don't need to though
oh ok
@vapid frigate I did try to both add them in the same named selection as the wing that animates, and I did try to add the selection to the skeleton following the wing. It seems these types of effects won't animate like ordinary selections. Thats why I wondered if it's possible to use multiple points and maybe switch between them
@nocturne basalt I'm not sure sorry.. never done it, was just guessing. You might be able to do it with script IF https://community.bistudio.com/wiki/selectionPosition works with animations (using a selection instead of a memory point)
@vapid frigate ok I'll give it a try. thanks π
The documentation of the Audio Engine' overhaul is now available here: https://community.bistudio.com/wiki/Arma_3_Sound
I think there's a mayor bug since the latest stable releases. ``` _buildPos = (position cursorObject);
_buildPos set [2,0];
hint format["%1 isEqualTo %2 = %3",[12097,2330.52,0],_buildPos,[12097,2330.52,0] isEqualTo _buildPos];``` Gives me: http://steamcommunity.com/sharedfiles/filedetails/?id=769242655 -- same with "in"
decimals? π
? you mean the decimals in the array? there shouldn't be any problem... atleast I never had problems before with decimals.
Thing is, if I convert both arrays to string - it works :S but wiki says ANYTHING is valid / accepted.
@willow basin It's normal floating point inaccuracy.
The position isn't exactly [12097,2330.52,0]
I want to set the tirgger activation if a particular object is present in the trigger area?
How can I do this using _trigger setTriggerActivation ["WEST", "EAST D", true] ?
It seems to be only for Side / group
I tried
_trigger setTriggerActivation [hostage, [hostageTask, "COMPLETED",true] spawn BIS_fnc_taskSetState;, true];
@split coral Ah okay thanks. So the output is misleading ^^ That explains why it's sometimes working and sometimes not, so I must either remove all decimals or just convert everything to string π
Yeah. The output is as good as it can be. You just can't really represent it as accurately as isEqualTo uses it.
I need alternatives to vectorAdd for a script.
I want to add values to an array.
_simCAS = [getPos ((_playerpos) vectorAdd [0,500,250]), 0, "B_Plane_CAS_01_F", west] call BIS_fnc_spawnVehicle;
It doesn't like _playerpos OR vehicle player and i'm actually getting annoyed with this
How so
getPos expects an object, not an array
What should I use instead, then?
either:
_playerpos vectorAdd [0,500,250]
[8:37 PM] commy2: getPos expects an object, not an array
or
getPos _player vectorAdd [0,500,250]
being a bitchboi, but you can use player getPos [10, 50] now
I don't think he means the alternative syntax, Adanteh
i know :p
Or do you?
yas, just commenting on that getPos doesn't expect array
_simCAS = [getPos _playerpos vectorAdd [0,500,250], 0, "B_Plane_CAS_01_F", west] call BIS_fnc_spawnVehicle;?
y
what is _playerPos anyway?
could be right, Vauun. Depening on whatever _playerPos is
_playerpos = getPos vehicle player;
I used it earlier to try and use an array instead of an object for the player's position
then leave out the second getPos
Ahh, I see
you are using getPos on what already is a position
this is why reading the error messages is actually important
SQF error messages are usless 90% of the time
uhm, no ^^
Sweet, that worked!
absolute garbage
now I need to set the plane to fly in the proper position towards the grenade π
unless you already know what's going on, they don't help
the best they do is give you the line number...
forget the rest
@little eagle what would be the best command to look at to set a vehicle to face an object no matter the angle?
I'm not quite sure.
Thanks!
get relative dir, rotate by negative of it
Alright, cool
Forgive me for all the questions, but I'm not sure the best way to rotate that by the negative.
Something like (vehicle player) setDir -1*((vehicle player) getRelDir targetObj); should work
please put parenthesis around this.
triggered
thanks
oh
vehicle player setDir (-1*(vehicle player getRelDir targetObj));
I give up
Here, I'll post my entire code real quick.
{
if ((_this select 5) == "UGL_FlareCIR_F") then
{
_this spawn {
sleep 10;
vehicle player groupChat "Coordinates recieved, airstrike inbound!";
playSound "CAS1";
_playerpos = getPos vehicle player;
_grenadeposition = getPos (_this select 6);
sleep 10;
_simCAS = [_playerpos vectorAdd [0,500,250], 0, "B_Plane_CAS_01_F", west] call BIS_fnc_spawnVehicle;
(_simCAS) setDir (-1*(_simCAS getRelDir _grenadeposition));
sleep 10;
vehicle player groupChat "Splash out.";
playSound "CAS2";
_bomb = "ACE_GBU12" createVehicle getPos helipad;
_bomb setPosATL [_grenadeposition select 0, _grenadeposition select 1, (_grenadeposition select 2) + 200 ];
_bomb setVelocity [0,0,-200];
_bomb setVectorDirAndUp [[0,0,-1],[0,1,0]];
sleep 5;
deleteVehicle (_this select 6);
};
};
}];
what is pastebin guys?
It's not that large.
π¬
Relax.
It's throwing errors for me around (_simCAS) setDir (-1*(_simCAS getRelDir _grenadeposition));, which I thought it might
Around?
Oh I see
BIS_fnc_spawnVehicle returns an array
You need to grab the 0th index from it
For the created object
What's the best way to do that?
If you only want to use the object
Yeah, I just need to reference the object
_simCAS = _simCAS select 0;
How did you get that syntax highlighting?
oh, that's super neat. it works for sqf?
got my hopes up!
Just use one of em
My favorite debug message meme is when it tells me that I'm missing a semicolon but I'm really not
Is it because I'm using _simCAS = twice?
nevermidn I was missing a parenthesis
hah
Great scott, I think everything is working 100% now
HAI!
I'm adding a move waypoint to a chopper with an AI pilot but the pilot does not fly to the exactly 2D point of the waypoint (height is irrelevant, but the 2D position is a must).
Any help in doing the AI Chooper exactly to the waypoint position?
_wp = _grp addWaypoint [_pos,0];
_wp setWayPointType "MOVE";
_wp setWayPointcompletionRadius 0;
_wp setWayPointSpeed "FULL";
waitUntil {_heli distance2D _pos < 50};
_grp is the pilot group (the group have only the pilot).
21:20:45 Error in expression <if ((_this select 1) in [0x1C , 0x9C >
21:20:45 Error position: <if ((_this select 1) in [0x1C , 0x9C >
21:20:45 Error Type String, expected Bool
remoteExec hates me
they do
but this is no keydown event
I don't even use if ((_this select 1) in [ anywhere
hmm
hmmm
yeah
0x1C is the enter key
but I haven't touched any key down
@little eagle I found the controls I'm looking for in a3, classes in config.cpp and the .paa files I want to fiddle with. Am I to understand that I can do this thing only with scripting, via ctrlSetTextColor? I won't need to mod/config?
if you can retrieve the controls / displays with pure scripting. no idea if that's possible
I'll work on it for a few days
derp. found it. two global vars / functions collided and pressing enter in the debug console called my wip code which ends in remoteExec
which of course returns a string and not a boolean
Any help?
i think mandoble wrote a script to guide a chopper exactly to pos
how to read mass by debug console ?
i rulez because my 15 lines mod works perfect with 1.64!
(may be because i come from Arma 2 were you just have the functions setPos and getPos and name)
Hey all
I had a look at the BIKI for Tasks, what state should I use to tell the user that the Task has been updated, I have tried resetting the task state to CREATED or ASSIGNED but that doesn't work
[_hostageTask, _extPoint] call BIS_fnc_taskSetDestination;
[_hostageTask, "Evacuate hostage"] spawn BIS_fnc_taskDescription;
[_hostageTask, "CREATED",true] spawn BIS_fnc_taskSetState;
That worked , thanks @halcyon crypt
π
Man I can't wait to publish my Ghost Recon mod, making so much progress thanks to you guys
@shut prairie eh he.
@shut prairie what is you trying to do?
@shut prairie is you creating something in sqf?
Trying to find the equation of a square in polar coordinates.
Why..?
I want to spawn a heli on the borders of the map.
This function will help to select any position on the border based on a angle.
But not needed anymore.
Thanks!
Seem like you're over complicating it greatly. What affect does the angle have?
I mean if you want to use the angle in a 360 sense around the border, trig will be fine
Yes, the angle goes from 0 to 360 for complete square.
But now i'm using a position not in border and i just create the heli at a altitude of 1250 m.
So no one sees its creation.
Sorry for spawn. There is a way to check if a waypoint in completed?
https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3
i think the way to do this is to check for the https://community.bistudio.com/wiki/currentWaypoint
or use https://community.bistudio.com/wiki/setWaypointScript to set GV
@velvet merlin i found that command "setWayPointScript" and used it, but since i'm not sure what is going wrong i was just trying to remove some Ifs of my mind. Thankyou a lot.
The script inside setWayPointScript have an error. This was the problem.
It's sad, if you try to make bots a little more amazing all starts to go wrong. I was able to make heli land and release soldiers and then go away... I was able to make soldiers jump from heli and open their parachutes, but the Heli refuses to go away from the AIs on land.
Its like if the pilot doenst noticed the moveOut commands and still think the AIs are inside the heli.
I also unassigned the heli from the jumping soldiers.
May be a good thing not to try to make something that you can't do in Eden editor... I know nothing about Eden Editor, but i believe you can't make soldiers jump from heli on it.
are they in the same group`?
no
Two groups. One with the pilot, other with the cargo group.
There is other problem, its AI faling in the water. This is why i wanted to move the heli to a exact position.
The waypoints are added on the pilot group (the group have only the pilot, and the pilot is assigned as the heli driver).
hm, why is every Arrayentry (wich is a str) in the .rpt (diag_log) now double stringed?
diag_log ["a"]; // ["a"]
diag_log format["%1",["a"]]; //[""a""]
diag_log str["a"]; //[""a""]
oO Why?
Hi all.
How do I pass a task as an argument to a Trigger e.g.
_triggerEvac = createTrigger ["EmptyDetector", getPos _extractionPoint];
_triggerEvac setTriggerArea [5, 5, 0, false];
_triggerEvac setTriggerActivation [_hostage, "PRESENT", true];
_triggerEvac setTriggerStatements ["this", {[_hostageTask, "COMPLETED", true] spawn BIS_fnc_taskSetState;}, "hint 'Hostage not extracted'"];
It is complaining that _hostageTask is undefined, so how can I get the variable into the trigger scope?
@jade abyss In the last two you are adding more quotations, and the escaping is working
@jade abyss str/format etc now properly escape quotations.
Useful for extensions to parse a str _array
Also you can now call compile the result etc
So now its working as intended?
+it also changes ' to "
Hmm
It is yes. I just tested that, seems so
working as "intended"
We are creating dll extension for our custom game type. But BE blocks loading of extension dll, so it just doesnt work with BE enabled. Is there any possibility to whitelist our extension dll in BE for our server only?
gnah, what disabled the markers right now (since 1.64)?
@jade abyss, [1.64] Disabling drawingInMap server.cfg parameter removes map markers : https://feedback.bistudio.com/T120359
Thx, forgot the name of it.
π
@frank cedar you can email BE to get your extension whitelisted. But if BE Servers are getting DDOS or down for maintance etc, you extension will get blocked by default.
@tough abyss , thanks, will try.
Hey Guys i'm looking to do some code within the vehicle init to disable the Simulation of the vehicle until an exact mission time say mission time 5:30am, car1 simulated at 6:00am
any ideas
On a scale of one to ten
How bad is motion blur post processing on performance?
Its being used on my rush gamemode on the respawn screen and other places and people are getting a sudden FPS drop without any RPT reason all of sudden, fps then remain at that low level until ArmA has been completely restarted
Ive went through alot of the scripts and hardly any resources are being used, 40 players in and there are no problems until 20-30 minutes later the game appears to just drop FPS for no apparent reason
Have you tried replicating it at different levels of players e.g. 5, 10 , 15 players and seeing if the FPS drop happens
Any ideas how to create a trigger that activates when a _hostage object is present inside it?
_triggerEvac setTriggerActivation [_hostage, "PRESENT", true];
This does nothing, no errors reported just doesn't activate
"by" the first parameter has to be any of these STRINGS:
by: String - Who activates trigger. Can be "NONE" or
Side': "EAST", "WEST", "GUER", "CIV", "LOGIC", "ANY"
Radio: "ALPHA", "BRAVO", "CHARLIE", "DELTA", "ECHO", "FOXTROT", "GOLF", "HOTEL", "INDIA", "JULIET"
Object: "STATIC", "VEHICLE", "GROUP", "LEADER", "MEMBER"
Status: "WEST SEIZED", "EAST SEIZED" or "GUER SEIZED"
I guess you can give the hostage's group one of these radio callsigns
or, you use:
https://community.bistudio.com/wiki/setTriggerStatements
and set the condition to:
"(thisTrigger getVariable 'hostage') in thisList"
_trigger setVariable ["hostage", _hostage];
Hmmm, but if there is more than one hostage with the same group. Then it will activate before all the hostages are returned to the evac position?
I'd use my second proposal. setTriggerStatements with the condition. And setVariable the hostage entity on the trigger
How does this look?
_triggerEvac = createTrigger ["EmptyDetector", getMarkerPos _evacPoint];
_triggerEvac setTriggerArea [5, 5, 0, false];
_triggerEvac setVariable ["hostage", _hostage];
_triggerEvac setTriggerStatements ["this","(thisTrigger getVariable 'hostage') in thisList", "hint 'Hostage not extracted'"];
Hi guys, anyone knows if it's possible to have a moving memory point (via animation) in which tehere is currently a rope attached to that point? The fact I'm doing a crane which are using the rope tech but when I attach something in that moving memory point it keeps in the same position even if the memory is actually in other position after the movement :/
looks good, but the message should be 'Hostage is extracted'
nah wait
you put the condition into the wrong position
["(thisTrigger getVariable 'hostage') in thisList", "hint 'Hostage not extracted'",""];
condition - activation - deactivation
@bold timber I think KoffeinFlummi found this before. You attach the rope to a memory point, but if the point is animated, the rope doesn't move. I think this is not possible
@little eagle @daring zinc Oh, that's bad .. I think nice experiments could be done :/
@little eagle still not working
_triggerEvac = createTrigger ["EmptyDetector", getMarkerPos _evacPoint];
_triggerEvac setTriggerArea [5, 5, 0, false];
_triggerEvac setVariable ["hostage", _hostage];
_triggerEvac setTriggerStatements ["(thisTrigger getVariable 'hostage') in thisList","hint 'Hostage safe'", "hint 'Hostage not extracted'"];
I think the game just converts the memory points into a position when you attach, but never updates. Too bad though
hmmm, yea it is still not being activate, I wonder if I need to set a side
Gonna try setting the side of the hostage which is BLUFOR
@little eagle the only think we could do as a workaround is increase/decrease the lengh of a "main" rope, simulating the vertical desplacement of that memory point but this won't work for horizontal movement.. Sad, I will revert to attach/detach tech then π¦
yeah. I tried this:
private _triggerEvac = createTrigger ["EmptyDetector", getPosASL player];
_triggerEvac setTriggerArea [5, 5, 0, false];
_triggerEvac setVariable ["hostage", player];
_triggerEvac setTriggerStatements ["systemChat str [thisTrigger, thisList];(thisTrigger getVariable 'hostage') in thisList","hint 'Hostage safe'", "hint 'Hostage not extracted'"];
But for some reason I'm not in thisList
Here's the full hostage.sqf
When I free a hostage in the interaction I setup a trigger and update the task
_triggerEvac setTriggerActivation ["WEST", "PRESENT", false];
adding this solved it
WEST has to be the hostages side. that will make him show up in thisList which will then make the condition evaluate to true
Yea thats weird, my hostage is a BLUFOR pilot but he is not coming up in thisList
Aha, systemChat str side hostage1 is coming up as CIV
I wonder why my script is doing that
setCaptive ?
Potentially. however shouldn't joinSilent set the unit to my side?
Not if it's a captive I think
just like how your group members can be SIDE_ENEMY if they do team kills
Ok I will turn off captive and see if that works
I personally don't like the trigger framework. This is what I'd use (if I'd make missions):
_hostage = player;
_position = getPos player;
[{
(_this select 0) params ["_hostage", "_pos"];
if (_hostage distanceSqr _pos < 25) then {
hint "success!";
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
}, 5, [_hostage, _position]] call CBA_fnc_addPerFrameHandler;
Wow, thats nice. It means you don't have to worry about SIDE etc
yeah
I will give your code a try π
and it doesn't do the check every 0.5 seconds...
hmmm getting a generic error in expression, maybe I need to use markerPos
Yea I need to use getMarkerPos
Hmm, which is interesting because what happens if someone passes an object instead of a marker. Perhaps I should make my script defensive, is there anyway to detect if its a marker or an object?
you can use this function:
_evacPoint = _evacPoint call CBA_fnc_getPos
and it will convert every possible data type into a PositionAGL
<MARKER, OBJECT, LOCATION, GROUP, TASK or POSITION>
Wow that works amazingly, I need to use CBA for everything
@tame portal did u find out btw, since Iam using them too
not for everything. but sometimes it's useful to know what tools you already have in the closet. Instead of having to invent the wheel again and again.
@tough abyss Ive tried it and at 30 it all seems good, 40 is where it then drops at a random point
It would be really nice if a second person could look over my mission and help me find possible causes
The issue goes even further: Fps stay at 20 even when going back to the main menu, a full restart of arma is required to fix it
This is really killing me, I just can't find the cause :/
Apparently it sometimes fixes itself for no apparent reason
For everyone at the same time (?)
Alright this is getting more and more confusing π
I would start by stripping away scripts, test. If its still there keep stripping out scripts till you dont see FPS drop, then add back in one by one
Send it over, I will have a look when I get a chance
@tame portal Lemme guess, FPS Drop to 3-4-5 FPS? All Buildings/Objects/Trees dissapear?
Nope, the FPS go down to about 20 for most people within minutes
It then stays there and absolutely randomly fixes itself for everyone at the same time
Buildings are being rendered in properly
Arma remains at that slow level though, all the time until it either fixes itself or you restart it
I guess there is a onEachFrame or draw3D or some check running in the Background.
Yes there is, but even with it disabled on a live server the FPS went down :S
You know my code π
No clue then. Last time i looked at your files was.. erm.. about a year ago?
fighting with my own crap atm, sry :/
Its alright
maybe someone else finds a minute
Ive gone over it several times now and I cant find it, its so frustrating π’
number of objects/entities
Clientwise about 600-200
It fluctuates due to
17:30:52 "Rush-Redux-Server-Log: OBJECT 1755515: <no shape> | TYPE #crateronvehicle | ISLOCAL true | POSITION [9701.36,13436.8,1.34665]"
17:30:52 "Rush-Redux-Server-Log: OBJECT 1755451: <no shape> | TYPE #crateronvehicle | ISLOCAL true | POSITION [9708.82,13457.1,0.215489]"
17:30:52 "Rush-Redux-Server-Log: OBJECT 1755476: krater.p3d | TYPE #crater | ISLOCAL true | POSITION [9707.19,13455.6,0.0206318]"
17:30:52 "Rush-Redux-Server-Log: OBJECT 1755491: krater.p3d | TYPE #crater | ISLOCAL true | POSITION [9712.54,13464.6,0.020555]"
17:30:52 "Rush-Redux-Server-Log: OBJECT 1755501: krater.p3d | TYPE #crater | ISLOCAL true | POSITION [9712.55,13464.7,0.0205569]"
17:30:52 "Rush-Redux-Server-Log: OBJECT 1755509: krater.p3d | TYPE #crater | ISLOCAL true | POSITION [9710.79,13462,0.0202551]"
17:30:52 "Rush-Redux-Server-Log: OBJECT 1755510: <no shape> | TYPE #crateronvehicle | ISLOCAL true | POSITION [9708.72,13457.1,0.566976]"
17:30:52 "Rush-Redux-Server-Log: OBJECT 1755511: <no shape> | TYPE #crateronvehicle | ISLOCAL true | POSITION [9708.25,13455.8,0.788838]"
17:30:52 "Rush-Redux-Server-Log: OBJECT 1755534: krater.p3d | TYPE #crater | ISLOCAL true | POSITION [9709.52,13460,0.0201793]"
17:30:52 "Rush-Redux-Server-Log: OBJECT 1755538: krater.p3d | TYPE #crater | ISLOCAL true | POSITION [9710.63,13461.2,0.0202417]"
17:30:52 "Rush-Redux-Server-Log: OBJECT 1748108: krater.p3d | TYPE #crater | ISLOCAL true | POSITION [9708.97,13532.9,-0.00018549]"
I regulary remove them though
When the issue fixed itself the number of objects wasnt any lower than usual though
It even stays if I go into the editor
@velvet merlin
Alright I was in the editor
and it just random fixed itself, went back to 100 FPS, no mission loaded
Ill do that
@velvet merlin for some reason the commands only throw errors for me "Missing ;"
You would need the profiling client of arma3.exe
I said nothing.
Alright lets see what it spits out when the lag appears again
Im playing now until I start getting the lag issue, then Ill capture a frame
any news on it?
Not sure if in the editor waypoints are more easy to use, but i'm finding really hard to use then on SQF.
What i "command" does not happens.
If you do one thing not supposed to do, all go wrong.
Hey all,
So I have a mission with some cool functions to create tasks like hostage rescue, demolitions, search and destroy.
The question I am trying to answer now is, how do I get a list of all these tasks so I can check they are completed and then end the mission?
From what I read on the BIKI tasks are global? So there must be a way to get all active tasks?
You can't use waypoint of index 0 and can't setWaypointScript to waypoint of type != "SCRIPTED".
If you do that... Hell.
Woooohooo! Worked... [Any] City under Siege Mission!
is there a command to return the time of day in real life? not game time or anything like that. I checked all time commands in All Commands, could not find
I want to see something like hint str(current_time);
I believe you need a external "get time" DLL called with callExtension inside Arma 3 to get that info.
@fallen skiff
@vague hull With the performance branch installed the issue didnt happen again
Also, I applied the performance binary to the server aswell and apparently people are not experiencing the frame issues anymore
atleast for now
@lavish ocean https://i.ytimg.com/vi/KSZuyA78EeE/maxresdefault.jpg
Can i use _forEachIndex in "apply" function?
No mention in BI WIKI.
_array2 = _array1 apply {[_x,_forEachIndex]};
donnovan thanks
Only _x is available iirc.
When using a switch statement with side like so, I can't seem to get the cases to work either using literal strings or constants
switch (side _unitKilled) do {
case "WEST":
{
Any ideas?
case west : {} will work
or in doubt switch (true) do {case (side _unitKilled == west}
Hmm it is still going to default
Hmmm, it seems my enemies are marked as CIV
I wonder if because the soldier does not have ammo they are set to CIV?
Thanks @indigo snow , using side seems to be a real minefield at times
has anyone used the PublisherCmd tool?
it seems to be erroring for me at the end
Publishing...
- Started
- CopyingToTempDirectory
- CopyingFile (D:\dev\acre2-omnibus\dist\acre2_workshop_2.2.0.904\@acre2\addons)
- CopyingFile (D:\dev\acre2-omnibus\dist\acre2_workshop_2.2.0.904\@acre2\extras)
- CopyingFile (D:\dev\acre2-omnibus\dist\acre2_workshop_2.2.0.904\@acre2\keys)
- CopyingFile (D:\dev\acre2-omnibus\dist\acre2_workshop_2.2.0.904\@acre2\plugin)
- CopyingFile (D:\dev\acre2-omnibus\dist\acre2_workshop_2.2.0.904\@acre2\acre.dll)
- CopyingFile (D:\dev\acre2-omnibus\dist\acre2_workshop_2.2.0.904\@acre2\ACRE2ArmA.dll)
- CopyingFile (D:\dev\acre2-omnibus\dist\acre2_workshop_2.2.0.904\@acre2\ACRE2Steam.dll)
- CopyingFile (D:\dev\acre2-omnibus\dist\acre2_workshop_2.2.0.904\@acre2\acre_logo_medium_ca.paa)
- CopyingFile (D:\dev\acre2-omnibus\dist\acre2_workshop_2.2.0.904\@acre2\mod.cpp)
Errors occured while publishing:
! Object reference not set to an instance of an object.
that seems to be a generic .NET error
The return code is just 0x0100: Generic publishing error.
Yeah looks like it, probably wouldn't hurt to verify integrity of tool cache on steam. Did you pull that from the publisher log in your AppData folder?
The cmd version doesn't seem to generate logs
verified tool cache and its fine, still the same error
Looks like I'm wrong, it might put the logs in the Arma 3 Tools logs folder
yea those logs look to only be for the GUI version
I can't even get a test addon to publish with the GUI version. I'm getting the same error as someone was asking me about yesterday of
Steam error code: 9
Steam error message: FileNotFound - file was not found
Does publisher let you upload dlls?
yes
It must because ACE has them in their workshop
kk i knew steamcmd does, but i was under impression it didnt