#arma3_scripting

1 messages · Page 590 of 1

tough abyss
#

Anyone know how to add inventory space to an object in configs? Just modelled an ammo can and I'd like to be able to store stuff in it.

winter rose
tough abyss
#

oh alright thanks

tough abyss
#

How do I make a trigger timers or command like for example when I want make the car go from A to B but when I’m start the game the will not move yet it will follow my command to move PLEASE SOMEONE ONE TEACH ME

smoky verge
#

@tough abyss no crossposting

#

anyone knows if its possible to have an unitcapture script on a vehicle that is using unitplay?

fair drum
#

@smoky verge so like you have a heli flying your recorded pathway and you want to record some shooting off of it or something?

tough abyss
#

Please read my problem again

fair drum
#

show me what you have done so far noodmaster, give some examples. don't just blanket ask

smoky verge
#

I did read your problem again and I did in 3 channels already

#

@fair drum
basically I have an heli doing a prerecorded path to an LZ
the helicopter reaches the roof and hovers for a long time waiting for people to get in and then leaves
to avoid a situation where players are already in but the heli is still waiting I was hoping to record the moment when it takes off and play it when everyone is in so to create a seamless transition

tough abyss
#

@fair drum I’m haven’t done anything bc I don’t know how to do it that why I’m asking

smoky verge
#

so basically my question is
would the unitcapture still record a plane that is currently on uniplay?

tough abyss
fair drum
#

@smoky verge what i would do is set a waypoint for getIn on the squad, and load on the chopper. then have a shorter recording to where it gets to its pad and stops playing. then set a second trigger with a second recording and sync that to the getIn waypoint completion

#

might have to tweak the waypoint completion radius a bit to get it right

smoky verge
#

the squad is made of players misread
also the heli is hovering not landing
so if I were to give control back to AI it would immediately move away from the collisionLOD

fair drum
#

i was just gonna say you might have to disableAI pathing. and yes its okay that the squad is all players.

smoky verge
#

thanks I'll make some attempts

fair drum
#

ive done something similar using a boat that dropped off, they did the mission, came back and got it, and it scooted away

#

doing the same method

#

@tough abyss the vehicle that you are trying to move, the AI driving it, is it in your squad? you don't want it in your squad

tough abyss
#

I’m play single player so what do you mean in my squad

fair drum
#

@tough abyss so i watched that video and he's explaining it in the sense of of a flyby. however, you are trying to get into the said vehicle and then have it move you around. you are going to need a waypoint at the pickup location using load. You would then have to have your player have a waypoint get in and you would have to sync the load from the vehicle crew to the get in of the player. then when those 2 conditions are met, it will carry on to the next waypoint

tough abyss
#

I just want do the trigger timer like exactly the video does but I replace heli by car

#

I hoe you understand what I meant

fair drum
#

i sent you a dm

#

of a quick example

short vine
#

Is there a way to spawn a complex effect via sqf?
Only way im seeing is setParticleClass which just sets a particle effect from CfgCloudlets
Trying to use createVehicle has 0 effect it seems.

warm hedge
#

Particle is always your friend

#

See other particle commands, are not so hard

short vine
#

Im not understanding if that answers my question. I have looked and as far as I can tell there is no way to spawn a complex effect. Am I wrong? I have looked at setParticleClass which differs from a complex effect.

warm hedge
#

Define “complex effect”?

warm hedge
#

Ah that one

short vine
#

Yes, i have some i built out which im wanting to spawn dynamically in runtime.

warm hedge
#

I don't see any big difference between particle effect as far as I read in the terms of possible effects

#

You ever tried any of particle related commands other than setParticleClass?

short vine
warm hedge
#

Yes, some of Simple Expression-related things can't use in script commands AFAIK

short vine
#

PArticle commands im aware of are setParticleCircle, setParticleClass, setParticleFire, setParticleParams, setParticleRandom

warm hedge
#

You're true

short vine
#

So its looking like a no on complex particle spawns via sqf :/

warm hedge
#

Well, if that is the question (maybe I misread something), that's a no, sadly

#

You could to emulate it but this will become complexer

short vine
#

As in spawn multiple particle to emulate the complex effect?

warm hedge
#

Maybe

short vine
#

Yeah, this makes me sad but alright. My script just got more annoying XD

gentle plaza
#

anyone familiar with the conditions for addAction? I cant seem to figure out how to write my target == caller...... trying to have an addaction appear for only a specific player

#

the addaction is on a vehicle

#

"_target == _this" // I thought I would change target to objects name and caller to be the units specific name but not working

warm hedge
#

_target == _this means only visible when your player is the vehicle itself, thus never shown. Supposesqf _this in [unit1,unit2,unit3]or so?

gentle plaza
#

Ok, I know this is wrong but // "nameofobjectw/theaddaction" == "nameofspecialplayer" // I was trying to have the addaction appear on the "nameofobjectw/theaddaction" only for "nameofspecialplayer"

warm hedge
gentle plaza
#

lol I thought if you saw my homework you could see what im doing wrong

warm hedge
#
_this in [unit1,unit2,unit3]```?
gentle plaza
#

this addAction ["dislpay distance","dd.sqf",nil,-10,true,true,"","_this in [unit1]",3,false];

warm hedge
#

While unit1, unit2, unit3 are your units supposed to use the action

gentle plaza
#

Well that totally worked @warm hedge thank you for you patience

#

I thought I had to use and == statement in the condition, what exactly does "in" do in this

warm hedge
#

If unit1 is the only guy, == will do also

gentle plaza
#

cheers, im sure this wont be the last you see of me 🙂

warm hedge
#

As long as you're here 🙂

waxen cosmos
#

@winter rose Sorry Lou, was on my phone in bed and fell asleep - I was trying to create a random spawn selector for initplayerlocal. Once a location has been chosen it is removed from the array. Which I believe has been successful, now to identify how to do this to the AI on server start. (Essentially it is a deathmatch type game which rolls round but I am trying to learn MP scripting as I do this)

opaque snow
#

Is there any way to load a script from anywhere else than the mission file?

modern adder
#

Yeah

#

Just put the PBO prefix before the path to the script

#

If you wanna load it from a mod

opaque snow
#

well its my own script.
So i can take my script and pack it as pbo and then do like _handle = [] execVM "POD_Rang\hello.sqf";

PBO will be in @POD_Rang\addons\POD_Rang.pbo

#

i will put _handle = [] execVM "POD_Rang\hello.sqf";
in onPlayerRespawn.sqf

modern adder
#

No need for the square brackets

#

But yeah sounds good mate

#

Does anybody know how I could check if a unit is unconscious while playing with ACE?

#

Will lifeState work as intended?

opaque snow
#

Okay, it doesnt work. script is not found

brave jungle
#

@modern adder If its still the same as before Unit getVariable ["ACE_isUnconscious", false];

modern adder
#

Ok, cheers

#

Try putting a slash in front of the PBO prefix

opaque snow
#

So have my "mod": @POD_Rang
Addons
POD_Rang.sqf

In the mission file i call:
_handle = execVM "POD_Rang\POD_Rang.sqf";

modern adder
#

Also, have you actually set the pbo prefix in the addon builder?

opaque snow
#

Okay

brave jungle
#

Is it a mission or a mod mik?

#

slightly different

#

oh I can't read

#

mb

opaque snow
#

Its a mod i try to call through the mission

brave jungle
#

Oh

#

okay

#

so it works as normal

opaque snow
#

Okay i see i gotta set an Addon prefix in addon builder

brave jungle
#

\myAddon\myPath\file.sqf

modern adder
#

Yep, took me ages to figure that out haha

brave jungle
#

Actually, you don't need to it'll work as long as the source and destination are setup correctly and if you're signing it with a key, the path to the priv key exists

#

But its good practise to add a prefix yes

#

If it still wont work, see if un-binarizing it works

opaque snow
#

Well doesnt return an error message now, though doesnt add the custom insignia as i want it to.

waxen tendon
#

how to reliably sleep 1?

#

the timing seems to change with load

winter rose
#

I think uiSleep @waxen tendon

viral basin
#

Hey, is it possible to create "POLYLINE" markers? setMarkerShape has listed this option but i was unable to create one 😅

still forum
#

@waxen tendon you can't. There is no reliability in scheduled scripts

#

@viral basin afaik not yet

viral basin
#

oh okay 🙂

finite sail
#

am I allowed to post links to a BI forum thread here so that I can get more answers?

opaque snow
#

Is here someone experienced who would be able to take a look at my PBO and scripts and see where everything goes wrong?

brave jungle
#
///stuff above here
{//Not original placement but to make this block logical.
  _textabovehead = _curPlayer getVariable ["VKN_Title_Above", " "]; //Gets value which works just fine
  addMissionEventHandler
  [
   "Draw3D",
   {
     alphaText = linearConversion [2, 8, player distance _curPlayer, 1, 0, true];
     drawIcon3D ["", [0.85, 0.85, 0, alphaText], ASLToAGL getPosASL _curPlayer, 0, 0, 0, str _textabovehead, 1, 0.05];
   }
  ];

} forEach allPlayers;

error I get is |#|drawIcon3D ["" Type any expected string

#

Any ideas?

#

Okay re-read drawIcon3D its needs string in text not structured text, for the time being using str and no says 0 elements passed, 3 required

#

I'm gussing the variables aren't passing right?

still forum
#

It complains about nil

#

_curPlayer and _textabovehead are nil

#

Why do you add so many draw handlers

#

why don't you just add one and do the forEach inside of the handler?

#

also _curPlayer is also defined outside of the eventhandler, the player from the forEach is in _x

brave jungle
#

I only want names above players heads 😅
_curPlayer is defined as _x above for to add it when I put the solo {
So in short, theres a much better way to do this then

still forum
#

just put the forEach inside the eventhandler

brave jungle
#

Okay

#

All seems to be fine

#

ty

brave jungle
#

For scripts, whats the variable that contains the players colour scheme?

hollow thistle
#
IGUI_TEXT_RGB_R
IGUI_TEXT_RGB_G
IGUI_TEXT_RGB_B
IGUI_BCG_RGB_R
IGUI_BCG_RGB_G
IGUI_BCG_RGB_B

in profileNamespace.

warm hedge
#

BIS_fnc_displayColorGet does also

brave jungle
#

Thanks

narrow pollen
still forum
#

they need to be equal

#

1,2 is not equal 2,1

narrow pollen
#

thanks

thorn saffron
#

How can I properly test MP scripts in dedicated environment? I did follow the wiki and launched the dedicated LAN server and then launched arma and properly connected to it.
I tested my script on local dedicated and it worked, but on real dedicated it did not. How can I debug that? Is there any way to get the server to confirm it's running the scripts I want without digging into the rtp?
Alternatively, how do I test scripts on my own without bothering friends that have dedicated servers running?

still forum
#

s there any way to get the server to confirm it's running the scripts I want without digging into the rtp?
Add diag_log's and check the rpt

#

Alternatively, how do I test scripts on my own without bothering friends that have dedicated servers running?
I run arma on my laptop to join my server

thorn saffron
#

without digging into the rtp

#

Also, I only have my PC

still forum
#

run a virtual machine for a second client

#

you can run the server with localhost=true in config

#

then you can run arma client twice and connect to the same server locally

#

You are asking how to debug issues, without wanting to debug..
Well.. just don't debug at all and give up then.

round scroll
#

how do I find all the classes defined in class wheels of a plane?

#

e.g. wheel_1, wheel_2, wheel_3 or wheel_front, wheel_left, wheel_right or however the wheels may be named

#

this gets me the wheels class: private _wheels = configFile >> "CfgVehicles" >> typeOf _obj >> "Wheels";

#

call BIS_fnc_getCfgSubClasses; might be it?

grim coyote
#
"true" configClasses (configFile >> "CfgVehicles" >> typeOf _obj>> "Hitpoints");```
#

then you can parse that array based on "wheel"

round scroll
#

thanks, that works!

grim coyote
#

you can also try selectionNames

misty salmon
#

Hello everyone, is there a way to pick up uniforms from another faction?

grim coyote
#

Well, kind of... You can set the player as civilian and then use SQF [player] joinSilent (createGroup "side")

misty salmon
#

Well, kind of... You can set the player as civilian and then use SQF [player] joinSilent (createGroup "side")
@grim coyote does it work on MP?

dusk shadow
#

Hey fellas, my mind is currently drawing up blanks for this:
Given 2 points in the world, how do you retrieve the required position and zoom level (to be used in the likes of mapAnimAdd) so both points are in view?

#

Getting the center position is simple enough but the zoom level slight more complicated (I think)

grim coyote
#

yeah, it works in mp

#

You just have to execute this locally on each civ player client

misty salmon
#

You just have to execute this locally on each civ player client
@grim coyote perfect, it could be on initPlayerLocal

grim coyote
#

Should work 👍

fervent kettle
#

is there any way i can set up a reactivatable trigger f.e. Activation -> waits x seconds -> after x seconds the trigger can be activated again -> waits x seconds...

spiral fractal
naive needle
#

is it possible scriptwise to forbid ai to open doors ?

jade abyss
#

@naive needle Limit your questions to 1 channel.

supple matrix
#

@naive needle If you mean in general i have no idea.
If you mean specific door, then i am not sure if it actually prevents AI from using the door, but maybe worth a try:
building setVariable ["bis_disabled_Door_1", 1, true];
make sure you change the number in bis_disabled_Door_1 according to which door it is supposed to be.

naive needle
#

thanks

#

I will give it a try

#

@supple matrix its working so far ,but that means players cannot open the door as well. I'm currently working on zombies and I want to remove the behaviour to open doors

supple matrix
#

ahh, good to know it acutally stops the AI :)
...isn't the opening of doors an action you could remove from the CfgMoves the zombies use?

naive needle
#

dosent it just remove the animation of it ?

#

I can try it out

supple matrix
#

i dont know 😦 it was just a quick idea

naive needle
#

Its might be in one of the fsm's which are controlling the ai

supple matrix
#

Another idea - if using the "bis_disabled_door_#" is not too inconvenient (i guess you have to do that to every door in every building, which may suck), then to allow players to use the door, maybe you could add some event handler to players to watch for some event related to when they try opening the door (no idea right now what it should be, maybe watch for an animation if there is one?) and then you could unlock the door (and maybe open in same time).

naive needle
#

thanks, but it will notbe the solution for me

supple matrix
#

...and i just remembered - wasn't there a "bug" when snakes and other ambient life creatures were able to open doors?
Was it ever fixed? if yes, maybe you should have a look at how it was fixed - maybe it was really just about removing some action from the creature's config.

naive needle
#

I'll check ,thanks !

naive needle
#

Does Dynamic Simulation globaly activate simulation of an object for every player on the server if a player is nearby or only for the player who is next to the object ?

fair drum
#

So I want to create a anti air "map boundary" where if the player leaves the AO, the anti air will target them and shoot them down. I wrote this so far but I don't really know how to target the player that left the AO in a multiplayer setting.
Could I get a work check?

//set aa1 to anti air asset
//disableAI targeting at start 
aa1 disableAI "target";
aa1 disableAI "autotarget";

//place the following in a trigger area for when player exits the AO 
aa1 enableAI "target";
aa1 enableAI "autotarget";
if (canFire aa1) then
    {
        aa1 doTarget player;
        aa1 doFire player;
    } else 
        {
            aa1 disableAI "target";
            aa1 disableAI "autotarget";
        };
#

wondering if it would just be better to just enable the AI and leave it at that, but I would like to target them quickly and shoot instead of having the AI search first.

oblique lagoon
#
I'm working on some script but it seems there's no global broadcasted variable which stores the location varible where mission is going.
What I've found is when EA create the mission, they use array of locations and when they finish creating the missions they discard the first index of that array while using that location as local variable.
However I have to use that location variable so I made global variable which get the local variable before it discard the first index of locations array and used publicVariable command. 
It looked alright for hosted game and dedicated game(when dedicated sever was at same PC) but when I uploaded it on server and opened server, I only got empty location variable.
Is there any problem with publicVariable broadcasting location to JIP players? Or should I use missionNamespace setVariable command? Thanks for reading :)...```
#

else, is there any global variable which stores the center point(ok even ambiguous) of the missions?

fair drum
#

I want to do it eventually for MP.

#

I tried messing around with nearestEnemy but it looks like nearestEnemy only works on those that are revealed to the unit. So then I looked at reveal and was messing around with nearTargets but then that gives me a huge array that I can't input into reveal... So not sure where to go at figuring out what target actually crossed that barrier and targeting them.

frozen canopy
#

hey, if an object I want to get the worldtoscreen of (https://community.bistudio.com/wiki/worldToScreen) and it's off-screen, the array is null. How do i prevent the game from throwing a scripting error? isnull/isnil didn't work in my implementation.

warm hedge
#

Use count

frozen canopy
#

will test it right away 🙂

#

@warm hedge working like a charm. much appreciated.

fervent kettle
fervent kettle
#

i think enableSimulationGlobal did the trick, didnt test on server yet

winter rose
#

There was, but not anymore

#

my bad, it didn't exist. you could set it with setVehicleInit and re-run them with processInitCommands

#

I think

if you can parse mission.sqm, you maybe could find them

#

but ideally, don't use init fields or rely on them

knotty mantle
#

Hey guys is something like this:
_testarray = [1,2,3,4,5,6];
_a = 3;

switch (_a) do {
{
case _x: {hint str (_testarray select (_forEachIndex + 1);
}foreach _testarray
};

not allowed or am i doing something wrong here?

still forum
#

lol wow.

winter rose
#

(@knotty mantle ```sqf)
you can't should not forEach in the switch

still forum
#

That.. should be allowed.. but is rather stupid

#

you can't forEach in the switch
You can

#

what you are doing is
hint str (_testArray select ((_testArray find _x) +1))

#

that switch and foreach is just stupid.. but.. should work if you want to do stupid garbage

#

You have a missing }

#

and a missing )

knotty mantle
#

ah right. Thanks 🙂

winter rose
#

@knotty mantle just to know, what are you trying to achieve?

knotty mantle
#

i just did a way to faster export loadouts and be able to import them again in the next mission. Saving just one string for all players instead of one per player.

tough abyss
#

Guise, is it possible to change side relations over the course of mission? setFriend article does not recommend that. setRating and just re-spawning the same unit with a different side workarounds aren't really applicable to my situation. Am I out of luck?

winter rose
#

setFriend works

tough abyss
#

Neat, thanks!

winter rose
#

Changing value during mission can cause unexpected errors in AI behavior
it was true in ArmA (such as units taking ages to see you as an enemy, or having to run away to come back, etc)
but I used it recently and it (ouch) works

steel fox
#

Any way to prevent AI in a group to all fire at the same target? My Static AA weapons are currently lobbing a missile each at the same helicopter whilst there are 4 in the Sky. wasting tons of ammo.

brave jungle
#

disableAI

#

then enable it when you need to

winter rose
#

setPos it after - it's createVehicle that is "inaccurate"

finite sail
#

"CAN_COLLIDE"

#

the last param in createvehicle

winter rose
#

^ yep (other syntax)

quartz pebble
#

If I create an object, then assign a number of handlers to it. Should I clean handlers if I delete the object?

warm hedge
#

What handler?

quartz pebble
#

any kinds of handlers. fired, MPKilled

warm hedge
#

If an EH is assigned to an object, the EH will be removed when the object is removed

quartz pebble
#

That sounds logical, but who knows that arma.. Especially if the server leaks memory

winter rose
#

I hope you removeWeapon and removeUniform before deleteVehicle'ing a soldier then 😄

sage cloud
#

Hi I need some help for script for my mission : (oh and sorry for my bad english)

So i have some sound in my mission folders (with the description.ext) ready to listen in game
I would make something like :
-If 0 players / not all (no ia) are not in trigger the ia nearby to the circle say one sound and if sound is end is game over
But
-If all players are in the trigger the ia say another sound (and make some gesture movement for the ia) and when the ia finished to speak the players can go out of the trigger and do anyone they want (i don't whant when players go out of the trigger the ia start to replays sound)

i make that :

_playerCountT = 0; 
 
{ 
    if ((side _x) isEqualTo blufor) then { 
        _playerCount = _playerCount + 1; 
    }; 
} forEach allPlayers; 
 
{ 
    if (side _x isEqualTo blufor) then { 
        _playerCountT = _playerCount + 1; 
    }; 
} forEach thisList; 
 
if (_playerCount isEqualTo _playerCountT) then { 
    playSound "okStart" 
} else { 
    playSound "noStart" 
};```

but is not verry working :
the noStart (when 0 players/notall are in trigger) the sond are loop and when im in the ring he dosen't change to "okStart"

tanks for help and i'm verry sorry for m'y bad english
hidden bronze
#

Is their a way to make a vehicles health go as low as 1% but never hit 0%. The purpose it so the vehicles does not explode and an engineer can come in and repair the vehicle back to 100% health.

unreal scroll
hidden bronze
#

ok thanks and what is the best way to learn how to use scripting because idk how to.

winter rose
#

@hidden bronze ↑

hidden bronze
#

ok thanks

#

ill try my best

hazy trail
#

Does anyone have experience with the boat rack, speedboats and the destroyers? I can deploy a speedboat, but not recover it. When testing on dry land, I can Zeus up a rack and a speedboat and recover and deploy to my heart's content - unless I move both rack and speedboat in one operation. Then the recover action vanishes. I'm finding the whole thing rather frustrating.

#

Strike that second part. I can't duplicate losing the recover action when moving objects around in Zeus (so far).

fair drum
#

how could I make the following:

//Conditional
({alive _x} count units group) < 3
//On Activation
{
_x setCaptive true;
_x action ["Surrender", _x]
} forEach units group;

into something that accepts the percentage of units in a group rather than an int?

hazy trail
#

The boat rack issue seems to be that the two emptyDetector objects that it uses to spot boats on either side aren't updated after the rack is created (rotation and movement don't change their positions). They also aren't deleteted when the rack is deleted. Does anyone know if I could be interfering with the rack's normal behavior through scripts? No mods are loaded.

#

({alive _x} count units group) < (count units group * 0.12)
for 12 percent

fair drum
#

ok ty

hazy trail
#

Tested the boat rack in an empty mission. Same issues. Placing a rack in the editor allows for position and rotation, but creating a rack during a session with a rotation will leave the triggers at the wrong locations. Deleting the rack leaves the triggers behind. Bug report time.

hazy trail
prime trout
#

Hey, does anyone know how to place objects in the eden editor that would usually spawn in via a script once you are in game?

tough abyss
#

Could you elaborate a bit? What do you want to achieve?

prime trout
#

So pretty much we have a "Training" server we use but to save on performance we put all ranges in to scripts. Which then only spawn in via a GUI option. But now I wanna change it back to where they are already on the map.

#

Is there a way I can spawn them while in 3DEN Editor and save them to the map

#

Because that would be much easier than re-doing all the ranges haha

robust hollow
prime trout
#

Thank you

#

Will have a look

echo cloud
#

I am trying to create a Zeus module that will reduce respawnDelay but nothing I do seems to work

#

I have the delay set to 99999 in the desc.ext and I have a module with the following:

#

[{0=0},5,"Running Respawn"] remoteExecCall ["BIS_fnc_setRespawnDelay",0];

#

But it doesn't set the respawnDelay

#

I need some ideas and help to make it work

#

Alternatively, is there a way to make a module to run a respawn?

robust hollow
#

0=0 you mean 0 == 0, which is better known as true

#

no need to compare values if they are always the same

spiral fractal
#

if I have nested foreach, I cant use the first loop's _x by its magic name inside the 2nd loop right?

#

idk if it a bug or I dont understand something in VcomAI functions/fn_SniperEngage.sqf ln 53

spiral fractal
#

ah I am using the 3.3.3 develop branch

#

yes, I added private variable outside this loop and use it instead of the first _x

#

this file is full of errors. then line 83 has error

#

I just tried to patch it quick because I dont have time to fix the code

#

clearBackpackCargoGlobal can be used on player backpack?

#

no I just added it to my mission that I am working on

#

its possible to use it as script, I forgot where was this guide about it

#

afaik you have to add code from the files there like init, description etc to your code and edit file path in Vcom

#

its seems to work because my AI companion became much smarter 😄

#

clearBackpackCargoGlobal can be used on player backpack?

#

I want to remove all items from player but leave the uniform and backpack just empty it

#

clearAllItemsFromBackpack wiki page dont say what execution and arguments it takes..

#

ok, Thank you!

#

when I pass array to the addToRemainsCollector if I later add items to this array it will also be collected?

still forum
#

clearAllItemsFromBackpack wiki page dont say what execution and arguments it takes..
But.. it does tell you that the argument is an object.. and the example says "player"..

#

clearBackpackCargoGlobal can be used on player backpack?
That wouldn't make sense, you can't have backpacks inside your backpack

#

if I later add items to this array it will also be collected?
no

winter rose
#

That wouldn't make sense, you can't have backpacks inside your backpack
can't you have empty ones? 🤔

spiral fractal
#

But.. it does tell you that the argument is an object.. and the example says "player"..
I can learn from it if its EG or EL?

winter rose
#

clearBackpackCargoGlobal removes backpacks from the vehicle, so it is not the proper command for you

spiral fractal
#

clearAllItemsFromBackpack

winter rose
#

yep

spiral fractal
#

is it EL or EG?

winter rose
#

given the wiki is not filled, if you MP test I can fill it

#

you can however use clearItemCargoGlobal and backpackContainer

spiral fractal
#

is it possible to remove the gear action from dead body?

winter rose
#

no, engine-managed

#

but you can override the gear action with EH

spiral fractal
#

can I make it simple object?

winter rose
#

can I make it simple object?
if you want T-posing soldiers, sure

warm hedge
#

Simple Object can't rtm animated so...

spiral fractal
#

can I see the code of addToRemainsCollector in functions viewer? I cant find it there...

still forum
#

Its a command, not a function. so no

spiral fractal
#

😐 can I make my own commands?

warm hedge
#

No

#

Unless you're a Bohemian

still forum
#

Yes, with Intercept

#

😄

spiral fractal
#

when I pass global variable (A = true;) to function, inside it I have while loop that check if value is true, I use params private _ao = _this select 0;, will it store ref to A? so if I change A value it will stop the loop while {_ao} do {?

still forum
#

will it store ref to A
no

#

Well yes..

#

But no for what you're thinking

#

it will reference the same value

#

I use params private _ao = _this select 0;
That's not params, thats select.
params is params.

spiral fractal
brave jungle
#

thats a great emoji

#

I bet its so useful here

spiral fractal
#

yes its like it was made especially for me

brave jungle
#

haha

spiral fractal
#

how can I pass global variable to while loop inside function so it will check it on each iteration?

still forum
#

just use the global variable

#

Do you want to have a function be able to handle multiple global variables?

spiral fractal
#

yes

still forum
#

you could pass the condition as argument.

{A} call {
params ["_condition"];

while _condition do {}:
}
warm hedge
#

Does {A} work here? [A]?

still forum
#

what?

spiral fractal
#

{A} ? its not [A]?

warm hedge
#

I mean, this argument looks illegal

still forum
#

I don't get what you mean

#

its not illegal, why would it be?

spiral fractal
#

{A}

warm hedge
#

Ah sorry, I got what that code means

#

You're true

spiral fractal
#

I never saw it, what is it?

still forum
#

you never saw it?

#

you never saw

call {
hint "hello"
}

or

if (...) then {
hint "hello"
}

?

warm hedge
#
1 params ["_a"];
_a //This is 1```
spiral fractal
#

what {A} mean before the call

brave jungle
#

I think he means he didn't know { } could be used instead of [ ]

spiral fractal
#

yes

warm hedge
#

What I said is what he meant

still forum
#

he didn't know { } could be used instead of [ ]
Well they are both completely different things

brave jungle
#

Yeah my point is I think he needed some explanation on it

spiral fractal
#

what is happening?

brave jungle
#

the wiki has it cube 😉

warm hedge
#
{0} params ["_a"];
5 params ["_b"];
player params ["_c"];
[_a,_b,_c]; //[{0},5,B Alpha 1-1:1]```
#

You got it?

still forum
#
while {A} do {};

is equal to

_conditionFunction = {A}
while _conditionFunction do {};

is equal to

{A} call {
while _this do {}:
}

is equal to

{A} call {
params ["_conditionFunction"];

while _conditionFunction {}:
}
spiral fractal
#

is it cryptography?

brave jungle
#

It allows you to put code in place

still forum
#

Its basic SQF..

brave jungle
#

so instead of having { condition } you can put in whatever the passed thing is

#

I'd give the wiki page another read if you still don't get it

warm hedge
#

params article has this sentence:

argument: Anything - A usual array of params is expected. If a non-array argument is passed, it will be converted to 1 element array

queen cargo
#

To make this Quick:
Every "control structure" in SQF is operator driven.
{...} just creates a code value and passes it to (eg.) the <LEFT> call <RIGHT> operators righthand side, with left being what the operator uses as arguments for when it calls the code value you passed
TL;DR:

  • {...} is a value-type
  • call operator lefthand accept any value-type
  • call operator righthand accepts only code value type
  • <ANY> call <CODE>
spiral fractal
#

I use C# so this looks really strange to me

jade abyss
#

Yeah, completely different.

#

No Native OO btw

queen cargo
#

it is fairly simple
there is no control structure in SQF and all is implemented by operators

#

call, then, else, ... all are operators

#

not control structures

spark rose
#

Good morning all. So I have a simple .sqf which causes an enemy to pursue the player. [] spawn { while { sleep 10; true } do { response_team addWaypoint [position player_1, 10]; } };

#

the only problem is it results in the AI rarely catching the player because they are always a step behind, simply following old waypoints based on previous player position

#

any ideas for making it smarter?

warm hedge
#

Change a waypoint's place instead of adding them?

exotic flax
#

include setCurrentWaypoint after adding it, so it will ignore old ones

#

or remove old ones with deleteWaypoint 🤔

#

or simply replace the waypoint if the group should only have one:

[] spawn {
   while { sleep 10; true } do {
      // notive the 3rd param, which will override the 0th waypoint
      response_team addWaypoint [position player_1, 10, 0];
   };
};
winter rose
#

ooor move

spark rose
#

@exotic flax ahhhh. i should've thought of that before!

winter rose
#

or there is BIS_fnc_stalk

spark rose
#

@winter rose BIS_fnc_stalk? What is this sorcery?

winter rose
#

(link without description! 😱)
also, it should stop once there are no more living members

spark rose
#

okay, NOW i feel dumb

winter rose
#

why though

warm hedge
#

Once upon a time everyone was

winter rose
#

being stupid != being uninformed 😉

warm hedge
#

Maybe 👆

spark rose
#

@winter rose So i tried BIS_fnc_stalk but they only came to the initial position. ```sqf
_stalking = [response_team, testgroup] spawn BIS_fnc_stalk;
while {sleep 5; true} do {
"Response_mark" setMarkerPos getpos responder_1;
}

#

i added the marker so i could see their movement on the map

#

seems default is to follow, so i'm not sure whats wrong

exotic flax
#

could you check response_team getVariable ["BIS_Stalk",2];?
It should have the following results:
0 = not stalking at the moment
1 = currently stalking a group
2 = something is broken
nil = group is dead

spark rose
#

ok

#

strange. says 1, but not going anywhere!

winter rose
#

mods? difficult environment?

spark rose
#

I'm not sure which. I think I may just try "move"

spiral fractal
#

try the example #4 maybe it will work if you set all parameters, I think I used that and it updated the waypoint

spark rose
#

ok

#

@spiral fractal winning! entering all parameters made it work like a charm

#

additionally, for knowledge, a 30 second update is more than enough. doing 10 or 5 causes the responders to move very slowly

winter rose
#

Ah yes
And more and more with increasing distance

spiral fractal
#

BIS_fnc_stalk and BIS_fnc_spawnEnemy need edit I guess, you can take the source code for it and edit to make it work as you need.
idk why it works when more parameters set 🤔

spark rose
#

possible to have more than 1 instance of BIS_fnc_stalk going at once?

spiral fractal
#

I think you can run only 1 stalk function for every stalker group

spark rose
#

makes sense

#

do you know how group position is calculated?

#

is it from group leader?

spiral fractal
#

yes _wp = _stalkerGroup addWaypoint [(leader _stalkedGroup),_radius];

spiral fractal
#

is there any function like BIS_fnc_findSafePos that can find positions invisible to player? like behind buildings etc? I want to spawn AI enemies

winter rose
#

you could couple this with lineIntersects, but I don't remember seeing a "shelf" one

#

checkVisibility maybe?

unreal scroll
#

It is better to use checkvisibility I believe. And make sure you've done a proper exit from a loop - like if iterations count > 100

#

I would do something like that:

  • get an array of, say, 1000 point on a cyrcle R>=spawn distance from a player.
  • start to check it one by one
  • if checkVisibility < 0.1, put this position to temporary array.
  • chek the next point, and if it is not visible too - add it to temporary array.
  • find out the circle segment large enough, that is not visible - i.e., 40 point = 15 degrees.
  • get the center of arc, and find the point on the line between player and this point, then spawn the unit.
    I think it is better than just selecting random positions, hoping it will not be visible by player - you can get an infinite loop.
spiral fractal
#

Thank you! I will try to implement it

unreal scroll
#

I don't remember if there a good function for selecting positions by radius and angle by default, but you can look at the SHK pos, if you didn't see it yet. It is very useful and comprehensive function library.

spiral fractal
#

found it, its from 2014 hope it will not be too outdated, also I think it might be overkill for my mission, will check the code tomorrow

austere silo
#

hello fellow comunity

#

i have a question: is there a script to freeze the AI?

#

in a MP mission

winter rose
#

enableSimulation(Global) @austere silo

austere silo
#

thank you very much Mr. Montana

heavy basin
#

Hello is there anyone can help about starting a new life server ? We have a script pack and a server but when we start the server there is some problems ?

fast harness
#

Hey guys, is there a way to check if an event already attached to a unit?

still forum
#

eventhandler you mean?

fast harness
#

yep

still forum
#

add a new one, and check the ID that you get back

fast harness
#

hmm.. so I need a "registry"

still forum
#

that'll atleast tell you if there once was one attached, not sure if it tells you whether its still there

fast harness
#

The plan is to attach an event to every new unit spawn (AI / Players) The units spawn dynamic and this stage I have no control over the createUnit

still forum
#

setVariable onto the unit. "eventhandlerIsAttached"

fast harness
#

Oh.. yes... of course

#

Thanks,.. sometimes I felt brain afk 😄

surreal peak
#

What would a good way to stop animals from walking through walls? Trying to develop a solution which works

young current
#

what kind of walls?

#

stuff you place in game?

#

elaborate the situation

surreal peak
#

I have animal (dog) he ignores walls

jade abyss
#

Probably placed down in MP, walls were not syncronized with the Client probably

surreal peak
#

in single player as well

#

animals just decide to run through walls

jade abyss
#

🤔

#

Interdimensional* Aliens then.

surreal peak
#

they sorta phase through them

#

was wondering if there is a command for detecting if a wall is infront of them

young current
#

not really no

#

is it a modded dog?

surreal peak
#

nope

#

just vanilla

young current
#

are they walls from a mod?

#

anything modded happening?

surreal peak
#

_dog = createAgent ["Fin_random_F", getPosATL player, [], 5, "NONE"];

#

I was testing on altis

#

its the last thing I need to fix for my attack dog script

#

since my friend is using them for a COD zombies thing and it is a tiny bit unfair for the players

#

when the "hellhound" just waltzes through the walls and bits their balls off

young current
#

probably issue with the simpler Agent simulation

surreal peak
#

welp, off to the land of testing weeeeeeeeeeeeeeeeeeee

exotic flax
#

lineIntersects only checks for a direct line of sight, it won't prevent bugged out AI warping through objects 😉

jade abyss
#

pathfinding is the thing you need to edit, but... erm... no.

surreal peak
#

how could I go about grabbing whatever AI the basegame units use, and shoving it in a dogs brain?

#

and would that be scriptable instead of modding

young current
#

I dont think that can be achieved with scripting

winter rose
#

maaaybe calculatePath, but it would be a pain

tough abyss
#

I have a Unitcapture set up for a chopper and I want to know if I can trigger V1 (chopper’s name) engineON true; using waypoints or something because the spinning blades are pretty annoying

winter rose
#

Sure

molten roost
#

is BIS_fnc_EXP_camp_playSubtitles buggy?

warm hedge
#

In what terms?

molten roost
#

im consistently having issues with it where the text goes away after half a second, and sometimes the next line will be totally skipped and not show at all

warm hedge
#

And how do you even use it?

molten roost
#
    ["Warhorse","Headquarters this is Warhorse, we are getting close to the distress call now.", 0],
    ["Headquarters","Warhorse, Do you see anything yet?", 5],
    ["Warhorse","Negative, but we can hear the siren and screams of civilians. Enroute ASAP.", 8],
    ["Headquarters","Copy Warhorse, report back once you get figure out the situation.", 16]
] spawn BIS_fnc_EXP_camp_playSubtitles;``` this is what ive got
#

in init.sqf

warm hedge
#

I don't see any problem here, just tested

molten roost
#

Ah, custom audio playing off elsewhere is interfering with it because of the title

#

Thanks for checking

winter rose
#

before blaming (here) the function, please test in an empty VR mission 😅

thin current
#

Lou, if I wanted to make a mission end when all players of a side are dead (in this example, Blufor and Indie) where and what would I have to place? I have found videos on how to make a mission end if all players are dead, or if a specific target dies, but I can't find a video/forum post regarding a specific team. (Its a Team Deathmatch)

brave jungle
#

Literally the first post has 3 different solutions

#

to end the mission use endMission "end1";

thin current
#

Ah, I didn't google that. I was googling something different. I am very new to scripting so I am unfamiliar with what specifics to use, sorry.

#

Thank you though.

brave jungle
#

np

thin current
#

So I found something that made more sense to me. Some mentioned creating a zone around the area, and set it to trigger "end1" or "end2" based on if there is no blufor/opfor present.

#

I am just now figuring out how to link the end1 and end2 triggers to the zone.

brave jungle
#

Use endMission

#

in activation

#

its so much easier

#

less trigger use

#

then set the condition

#

Or hell even just put blufor not present

#

on activation

#

endmission "end1";

thin current
#

Curious mind if I PM you?

brave jungle
#

Go for it

modern adder
#

Hi guys, would you know why this line throws generic error in expression when executed in a scheduled environment, but not in an unscheduled environment?

if (_oPlayer distance _x <= 500) then ```
It's inside a forEach loop
```sqf
forEach allPlayers - entities "HeadlessClient_F";```
#

_oPlayer is the value of sqf player

winter rose
#

because unscheduled environment can not throw exceptions 😄

modern adder
#

Ohh

#

I see

winter rose
#

fix the error!

modern adder
#

Well, now the question is why it throws a generic error in expression 😛

#

I don't think it's a type issue, as distance returns a number

still forum
#

_oPlayer undefined?

modern adder
#

No

still forum
#

maybe error is on a nearby line, but not on that exact line

modern adder
#
{
private _iPl>
13:36:04   Error Generic error in expression```
#

I believe that's the error

winter rose
#

your code so we don't play the guess game 😄

modern adder
#

Fairly sure it's that if statement

#

OK, give me a minute

#

That's the entire function

#

Input should be correct, as that's definitely a player object

#

As in, the argument supplied

still forum
#

as that's definitely a player object
🍿

winter rose
#

btw, shouldn't it be

forEach allPlayers - entities "HeadlessClient_F"forEach (allPlayers - entities "HeadlessClient_F")
```?
still forum
#

if (isNil{_oPlayer getVariable "XIM_bIterating"})
I'd prefer
if !(_oPlayer getVariable ["XIM_bIterating", false])

#

Ah

#

Are you running that on server? that script?

modern adder
#

On a player host, yes

still forum
#

Ah meh.
Because on a dedicated server player doesn't return a player, but it should on player host

#

Typo if (!(_aPlayerMachineIDs findIf {_x = _iRecentMachineID}))

modern adder
#

I'm not using player

still forum
#

Maybe just add logging and check what values your variables actually have

#

instead of assuming what they should be

modern adder
#

I'm using the debug engine

winter rose
#

btw, _oPlayer distance _x and checking on all the players… he won't be far from himself

modern adder
#

I know

#

That's intended

still forum
#

I'm using the debug engine
Then it should tell you the variable values, what are they?

modern adder
#

Debug engine isn't giving me the variable values though

still forum
#

huh 🙃

modern adder
#

Only gives them through the vscode extension right?

still forum
#

no

#

it also dumps them into RPT

modern adder
#

I haven't seen anything that I assume would be the variable values

#

Let me send the RPT

still forum
#

if (!(_aPlayerMachineIDs findIf {_x = _iRecentMachineID})) also doesn't need to be a findIf, just need a find.
Actually, just need a in

#

Actually that can never work at all

#

findIf doesn't return a boolean, you cannot ! that

modern adder
#

I thought it does?

still forum
modern adder
#

Already read that

winter rose
#

return value: number

#

-1 if not found, else the found index

modern adder
#

I know that

#

But it says it returns true in that image

#

Which one is correct?

winter rose
#
if (!(_aPlayerMachineIDs findIf {_x  = _iRecentMachineID}))```

what you are doing ↑ here is using ! on a number

#

the image compares it to -1

modern adder
#

Ok, I get that

#

Right, so the findif section on the biki for arrays is wrong

winter rose
#

really? where?

modern adder
#

returns true

#

returns false

winter rose
#

> -1

modern adder
#

ohhh

#

I misunderstood

#

Bloody three characters haha

winter rose
#

the wiki is fine 👀 😄

modern adder
#

Ok, so I'll fix that and see if that solves the issue

winter rose
modern adder
#

lol

#

Ok, so I fixed some stuff, but same issue 😛

#

Let me put the RPT in a pastebin

#
if !(_oPlayer getVariable ["XIM_bIterating", false])``` throws a generic error
#

original works though

still forum
#

points towards an issue with _oPlayer

modern adder
#

But why does the other work though?

still forum
#

didn't throw error if it was undefined inside the isNil, isNil is gone now undefined throws errors

modern adder
#

Ohh

#

Well I'll check that

#

There's the RPT

winter rose
#

diag_log the _oPlayer value

modern adder
#

Ok, I'd prefer to get the debug engine working though

winter rose
#

yep, it's a Number

modern adder
#

What is?

still forum
#

Error getvariable: Type Number, expected Namespace,Object,Group,Display (dialog),Control,Team member,Task,Location

winter rose
#

line 50:

14:45:13 Error getvariable: Type Number, expected Namespace,Object,Group,Display (dialog),Control,Team member,Task,Location

#

😄

modern adder
#

XIM_bIterating is?

still forum
#

Also yo udon't have debug engine enabled, only itntercept

#

no

#

_oPlayer is

winter rose
#

what you do getVariable on, _oPlayer

#

stahp ninja'ing meh!1

modern adder
#

Yeah

#

Launcher says the engine is loaded

#

Perhaps WINE is interfering with it?

#

Oh well

#

Time to figure out why _oPlayer is a number hahah

still forum
#

Wine??

modern adder
#

I'm using linux

still forum
#

lool. oof

#

probably then 😄

modern adder
#

Thought so

#

Means I can't use the extension either 😛

still forum
#

might fix someday 🙃
but I don't really want to set up a test environment in wine oof

modern adder
#

It's not easy that's for sure haha

#

Can't use ACRE either as windows system calls aren't properly implemented in proton yet :(

still forum
#

TFAR works tho 😉

#

And intercept uses the same system call stuff as acre

modern adder
#

Oh

#

Oh dear

#

Yeah, I know TFAR works, but me and the lads had issues with it breaking mid mission haha

#

Ok, I found the value

#

It's two

#

Which means it's replacing the player object with the client's machine ID somewhere

#

epic style

winter rose
#

somewhere

#

had you used params with filter params, you would have seen it immediately 😉

modern adder
#

Filter params?

winter rose
#
params ["_oPlayer", objNull, [objNull]];

I recommend doing so for every entry point

#

this ↑ checks that _oPlayer is actually an object

modern adder
#

Ah, okay

winter rose
#

and if not provided, it defaults to objNull.

modern adder
#

Thanks

spiral fractal
#

when I use spectator from console I can see dead enemies that were "removed" by remainsCollector, is it ok or I made some error and have memory leak?

modern adder
#

I got it

#

Argh

#

onPlayerConnected returns a machine ID

#

That's why

#

I was calling that function with _owner in onPlayerConnected

still forum
spiral fractal
#

how can I get access to the remainsCollector array?

#

or know if object was collected?

still forum
winter rose
#

isNull ?

spiral fractal
#

I think the bodies go under map but not removed in my mission

winter rose
#

check isNull after 5s

spiral fractal
#

but I have random collection time

winter rose
#

what do you want to know, and why?

spiral fractal
#

and I allow couple bodies

#

when I go to spectator from console I see long list of enemies and most of them have skull icon and they not appear on map

#

is it "memory leak"?

winter rose
#

close/reopen? IDK much about the spectator thing

spiral fractal
#

also everytime I play the mission to debug it I end up playing it and waste time :|, also I still forget the then in if meowsweats
I will try to delete bodies without remainsCollector and see what happens

spiral fractal
#

hmm I had addToRemainsCollector [_unit]; now when I removed this line and add each spawned unit to global array instead and then do arr = arr - [objNull]; its seems to work without "memory leaks"

spiral fractal
#

is it possible to remove all ACE interactions from unit? there is ace_common_fnc_claim but I dont think its the right function to use

exotic flax
#

If you want to remove them from all units/objects, you can probably override the configs and global variables used by ACE.
For single units, you probably can't unless you abuse something like _unit setVariable ["ace_common_isHandcuffed", true, true];, which should disable all/most interactions.

spiral fractal
#

ace_interact_menu_fnc_removeActionFromObject will not work?

exotic flax
#

that only removes the interactions from an object (eg. Carry Box)

#

I guess the big question is; why would you want to remove interactions from ACE?

hollow thistle
#

claim is easiest way to block interaction with some object.

#

if you want to remove only some types of actions you can't do that without config edits.

spiral fractal
#

I want to remove all interaction on enemy, I use claim now, but I thought there may be better way to do it...

hollow thistle
#

making the object claimed by itself is recommended solution and there's no better way atm.

spiral fractal
#

hmm, well then I will use it I guess 🙂

spiral fractal
#

is there way to get the number of rounds in magazine? I use getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines"), then I select 1st element in the array and I want to get the number of bullets in that magazine

winter rose
#

number of rounds total and current rounds

spiral fractal
#

I just found this page, but I want to check magazine that is not in player inventory

winter rose
#

then yes, config

#

CfgMagazines

spiral fractal
#

I am very bad at cfg, (not that I am good at anything else) but idk anything about it, I saw the CfgMagazines page but I dont know how to use it meowsweats

winter rose
#

configFile >> "CfgMagazines" >> _magClassIguess >> ?

exotic flax
#

getNumber (configFile >> "CfgMagazines" >> _magazine >> "count")

spiral fractal
#

YES!

#

Thank you!

exotic flax
#

and in case you want to know info about the currently loaded magazine: currentMagazine

spiral fractal
#

yes I saw that command, but I am making ammo pickups and I want to check if player can take it or not

ionic anchor
#

Is it possible to script full screen night vision when spectating a unit in first person using EGSpectator, always thought its not possible by game limitations

winter rose
#

camUseNVG exists (or something close)

#

@ionic anchor ↑

daring pawn
#
Killzone_Kid
This command will return time since last client restart as float. However because of Number format used in Arma, the more time has past since restart the less precise the returned value will be.

This comment in the diag_tickTime wiki page. How long of a time before the float is innacurate? I'd imagine its many many hours? If its under 6 its a problem if its over then i'm not phased.
https://community.bistudio.com/wiki/diag_tickTime

still forum
#

1e7

ionic anchor
#

cheers @winter rose

daring pawn
#

So does that end up being about 2777 hours if i'm right? That seems incredibly high. I imagine thats the absolute maximum limit, but at what point is it innacurate as described? assuming 1e7 being the maximum float

still forum
#

no maximum

#

there is no "maximum float" before infinity

#

thats the specialty of floating point

#

its just not exact anymore

#

maybe it was 1e6

#

no, 7 digits

daring pawn
#

Yea ofcourse, so basically once we start hitting 7 digits, diag_ticktime becomes innacurate? which is still incredibly high

still forum
#

that is

#

precision to the second exact

#

sub-second starts degrading before that

daring pawn
#

So, basically, I get precision to the second for around 27 hours, i'd likely get sub second degradation reasonably at about 3 hours? Is that what i'm gathering? Wildly guessing the degredation occurs a digit earlier?

still forum
#

Wildly guessing the degredation occurs a digit earlier?
no thats not hot floating point numbers work

#

what is your definition of being accurate?

#

floating point isn't even "accurate" at 0.003

daring pawn
#

Oh look there's probably a better way to do what i want to achieve.

Basically I want to use diag_tickTime to stop the handleDamage eventhandler from sending the damage twice when damage occurs. For example if you're shot in the head, that happens twice because it happens in such a short space of time. So, it sends, lets say 3 damage (what you get from a sniper headshot within 100m) twice to my script. Basically just have

    _TickCheck = player getVariable ["EAMS_LatestDamageTick",diag_tickTime];
    if ((diag_tickTime - _TickCheck) > 0.01) then {
        player setVariable ["EAMS_LatestDamageTick",diag_tickTime];
        //systemChat format ["%1 to %2 at %3",_damage,_hitPoint,diag_tickTime];
    } else {
        systemChat format ["SKIPPED %1 to %2 at %3",_damage,_hitPoint,diag_tickTime];
};

Thats what i've got at the minute for testing how it's all working and what it's "ignoring"

If there's a better way i'd do that instead, but this seems to do the job. Basically just don't want say, 3 hours into a mission for it to start doing both again because of the innacuracy mentioned

still forum
#

just use frame number

#

diag_frameNo

#

that is a number, so exact to 1e7

daring pawn
#

Would that not still have some discrepency if someone had better or worse frame rate or am I also misunderstanding how that diag works?

still forum
#

you can probably calculate with 60 fps

#

if damage accidentally triggers twice

#

it will do so within same frame

daring pawn
#

But if someones frames are worse or much much better than that, it won't necesarrily happen in the same frame? I was thinking in that case just a ~2 frame window to allow for that?

still forum
#

completely forgot that I wanted to fix that double firing

daring pawn
#

^ that'd be amazing aha

still forum
#

it won't necesarrily happen in the same frame?
Quite sure it will

#

but sure you could do two frame window

#

but at that point, I'd also check the damage bodypart if you get that in handledamage

#

because a bullet might go through your arm into your torso

#

at that point you might receive damage twice

daring pawn
#

The other thing is. If you get shot in the Arm for example, the bodypart that takes the damage first, isn't necesarrily what ends up firing first

#

The image above shows that. The arm, with the most damage, is what is shot first.

#

The other damage is passthrough

still forum
#

¯_(ツ)_/¯

daring pawn
#

Fair point 😆 Its why i'm basically just getting the highest damage and using it. Well, plan on doing that, haven't as yet. I don't think its actually a bug per say, its probably just the eventhandler and how it reports.

#

Thank you however, I'll use FrameNo instead if its going to be more reliable for longer times

spiral fractal
#

can I use exitWith inside HandleDamage event code? ... exitWith {0};?

still forum
#

you can certainly do
call {

.. exitwith...
}

winter rose
#

it doesn't work as intended @spiral fractal
from a KK's wiki note

spiral fractal
#

so I cant use exitWIth* inside event handlers

  • regular exitWith
winter rose
#

nope.

still forum
#

well you can

#

I posted how

winter rose
#

^

#

not directly hmyep

spiral fractal
#

I am not that good with SQF...

still forum
#

instead of
...code...
do
call {
...code...
}

#

then you can use exitWith in code

spiral fractal
#

this is madness thonk

winter rose
#

this absolutely needs a fix!!1! 😄

player addEventHandler ["HandleDamage", {
  call {
    if (alive player) exitWith { 0 };
    1;
  };
}];
still forum
#

#wontfix

winter rose
#

BI doesn't care about its customers @#%$!1!!

rough heart
#

Blame dedmen 🤓

spiral fractal
#

😦 inside HandleDamage I have: if !(isPlayer _instigator) then {_damage = damage _unit;}; _damage; why its not working?

still forum
#

where is _damage defined?

#

show full code

spiral fractal
#

its copy paste from wiki and this is the code I added inside

still forum
#

😢

spiral fractal
#

_damage is from params

still forum
#

what is your definition of not working?

#

you want to prevent blue on blue?

spiral fractal
#

yes, in my case green on green

still forum
#

maybe instigator isn't what you expect

spiral fractal
#

those mad AI lads kill each other like crazy

#

when I tested it was ok

still forum
#

oh ah that non player, not player 🙃

#

are you sure returning damage _unit is correct? instead of returning 0?

#

I dunno

spiral fractal
#

found this code: if (side (_this select 3) == side (_this select 0)) then {false}; also not working

#

I got this feeling that I will spend the night trying to figure it out meowsweats

still forum
#

Well I'll spend the night sleeping, bye 😄

spiral fractal
#

bye

#

maybe ACE has something to do with it?

winter rose
#

Dedmen sleeping already… the end is near

#

maybe ACE has something to do with it?
. . . yeaaaaaah it would be nice to mention that first @spiral fractal! as ACE changes the system damage _a lot _

spiral fractal
#

ACE should be added to the game... or the game should be added to ACE...

#

this code seems to work:

_damage = 0;
if (isPlayer _instigator) then {
   _damage = _unit call ace_medical_fnc_handleDamage;
};
_damage
vast briar
#

Heey, does anyone here have a vehicle pannel hud script I could use in Exile? Thanks 🙂

winter rose
#

…the car script?

vast briar
#

The one that shows, fuel, speed, damaged modules, etc..

spiral fractal
#

maybe exile hides hud

#

it is visible in other arma missions

vast briar
#

yes, the exile mod straight up disable's arma's default hud

spiral fractal
#

it has custom hud

vast briar
#

So, I was told to either straight up make a custom mod for the vanilla hud, or build it with scripts xD

spiral fractal
#

try to use the showHud command, or check description.ext, they probably disabled it there so this command will not work

#

also they probably made something else instead

vast briar
#

My understanding of it is, the Exile mod disable's it, not with a config, but the mod itself replaces it for its own custom one.

#

This is the only hud options it's gives in the description.ext

#

"showHUD[] =
{
true, // Scripted HUD (same as showHUD command)
true, // Vehicle + soldier info
true, // Vehicle radar
true, // Vehicle compass
true, // Tank direction indicator
false, // Commanding menu
false, // Group Bar
true, // HUD Weapon Cursors
true // Vehicle Panel (Required for GPS)
};
"

#

So, what are the functions to check for ammo, mags, fire rate, etc... So I might aswell try and make a custom HUD my way with scripts xD

exotic flax
vast briar
#

Anyone willing to give me a hand maybe?! xD
I'm kinda new on this xD

spiral fractal
#

custom hud is probably not the best way to start

exotic flax
#

making a custom HUD takes more than just calling some functions, so be prepared for that

spiral fractal
#

btw is it me or setting showHUD = false; increase fps?

#

exile is open source?

exotic flax
vast briar
#

Not too shure @spiral fractal , the mod isn't but when setting up a server, you can custom overwrite anything

spiral fractal
vast briar
#

yeah, my idea was making something like that.

#

But also for guns 😛

spiral fractal
#

when I add ACE interaction menu item, is it possible to use _this inside the title? I want to set the title to "Take ___" and get the object name

simple notch
#

How do you know what you are suppose to put into different event scripts ?

winter rose
#

it… depends on what you want?
we have a wiki that lists all the available commands

simple notch
#

idk I just feel like im stuck understanding what you need to do in each .sqf

#

can you link me in the wiki the list of commands?

#

Does it explain what needs to happen in every event script?

exotic flax
#

no; it just tells when it runs and which parameters are available

#

because how is the engine able to know what you want to do with it? 🤔

simple notch
#

Yeah I guess i'm just overthinking it

cunning crown
#

Does it explain what needs to happen in every event script?
Do whatever you want in them, event scripts are triggered on events, it just execute the code inside them when the event happens, nothing more

simple notch
#

I guess i'm just overthinking it

#

Can I ask for some ideas for simple scripts?

exotic flax
#

"Hello World!" is probably the simplest 🤣
Other than that, if you think you're missing something in-game try to figure out if it can be scripted and if yes; try to build it

spiral fractal
#

now that is well designed "inheritance":
Man > Animal > Animal_Base_F > Dog_Base_F

#

Motorcycle > Bicycle

winter rose
spiral fractal
#

how the "take" action works when I pick weapon from the ground?is there source code?

exotic flax
#

if Take EH is triggered, you get access to the params provided and you can do with it what you want

spiral fractal
#

I disabled the HUD so now I dont have this action, I want to use ace instead

exotic flax
#

I believe the scroll wheel actions are still available even not showing a HUD, and otherwise SPACE will still work...

spiral fractal
#

I tried and I was unable to pick weapon

exotic flax
#

and you're sure it was a weapon, and not a prop?

#

and does it work when you still have a HUD?

spiral fractal
#

I killed AI and tried to pick the weapon

round scroll
#

I've got a request for the Nimitz to support animateSource for tailhook deployment of a plane when landing on the carrier. Now the F/A-18E/F does not support animateSource and probably quite a few other carrier based planes neither. Is there a smart way to figure out if a plane supports animateSource for 'tailhook' animation or not? Maybe checking config AnimationSources in for 'isClass tailhook'? Any other ideas?

lone zenith
#

Hey folks, there's the function getMissionLayerEntities and get3DENLayerEntities. They return the object given the layer- is there a function that does the inverse? I want to find the Layer that an object is in without scrubbing through every single layer. Thanks!

still forum
#

not aware of that being a thing

winter wraith
#

Hello. I need some help. In my template mission I'v create 3 ammobox. Where there will be different content in each box. In one of the ammoboxes i'v written in the init line:
"[""inf"",this] call Supplies.sqf";
Then in the misison folder i'v made a supplies.sqf where i'v added all the content of all 3 ammocreates in. Before the content of one of the create i'v written
case "inf":
So I'm hoping that it will execute the commands under case "inf"; however this seams not to be the case. Anyone would know what to do?

still forum
winter wraith
#

Possible to elaborate @still forum, my scripting skills in arma are very limited.

winter rose
#

see the examples:```sqf
switch (_providedString) do
{
case "string1": {
// do stuff 1
};
case "string2": {
// do stuff 2
};
};

lone zenith
#

not aware of that being a thing
@still forum
darn was hoping to mitigate lag 😦

unique sundial
#

store layer on the object when placed?

winter wraith
#

@winter rose aha. I am missing the
switch (_providedString) do.
and i assume I must also add something in the script to understand its "_providedstring"?

winter rose
#

"[""inf"",this] call Supplies.sqf";
this ↑ won't work

either use execVM for a file, or call for Code
(https://community.bistudio.com/wiki/execVM)
(https://community.bistudio.com/wiki/call)
(https://community.bistudio.com/wiki/Code)

in supplies.sqf:

// defines the parameters, their default value and their accepted types
params [
  ["_type", "", [""]],
  ["_unit", objNull, [objNull]]
];

switch (_type) do
{
  case "inf1": {
    _unit setDamage 0;
  };

  case "inf2": {
    _unit setDamage 0.5;
  };

  case "inf3": {
    _unit setDamage 1;
  };
};

(https://community.bistudio.com/wiki/params) @winter wraith

and to execute it:```sqf
["inf1", _myUnit] execVM "supplies.sqf";

**Don't** put that in the init field.
lone zenith
#

Do you mean setVariable the layerName on the object? @unique sundial Would defeat the purpose of the code if I did that 😦 - I think I'll just search every layer. Now that I'm looking into that though, I'm not seeing a way to do that. No reliable way to find the layerID or the highest layerID, right?

still forum
#

add3DENLayer would give you the highest ID, I assume they just count up from 0 as usual

#

which ofc doesn't work if in mission

winter wraith
#

Cheers for your time so far.
I'm afraid I coulnd't get it to work. I added two ], one on each line in params to prevent error ingame. The executable, why do I have to include _myunit. I thought that was inrelevant. Also why can i not use the init field?

#

I don't understand the params, even after reading the wiki. I am simply out my league here. So I just trust they are correct and needed.

spiral fractal
#

what you want to do?

#

canAdd command checks player gear weight?

velvet merlin
#

is there a way to get a decal terrain object? (has no class and no named property class) cursorObject nor neareastObject lists it

winter wraith
#

hey @spiral fractal, no I want to have 3 gearboxes in my tamplate with a standard loadout. Instead of creating 3 sqf files I want it all in one so it easier to edit later if the loadout change. So my issue is to have the correct command line in the gearbox init. In the SQF file i'v sorted all the commands for gear and that stuff. But I dont understand how to use the switch command correctly. If you look at what Lou Montana typed above, who helped me. I dont get that to work and I also dont understand by my lack of knowledge about how the params work.

winter rose
#

@velvet merlin any example?

velvet merlin
#

its sidewalks and kraters

#

got them via nearestTerrainObjects [player, [], 5];

winter rose
#

okido!

winter wraith
#

Nvm solved it: In init i added:
["infordinance", this] execVM "supplies.sqf";
in sqf I edit
params [
["_type", "", [""]],
["_unit", objNull, [objNull]]
];
thank you @winter rose

winter rose
#

with pleasure @winter wraith; SQF is a painful mistress but she's worth it on the long run (…I hope?)

crisp cairn
#

I have been looking at the createVehicle information on the WIKI and whenever I create something to the position of player it appears all around them. I am wanting something to spawn at their feet. Can someone point me in the right direction?

warm hedge
#

Spawning something right exact place? Use "CAN_COLLIDE"

crisp cairn
#

ye I just re-read example 9 on there thanks for the help!

supple matrix
#

@warm hedge regarding that texture path problem...
Maybe first get the extension from current texture path (as it should always contain the extension),
then take that many chars from the end of the other texture path, and compare those two strings.
If the "extensions" are equal, you compre the rest of the texture paths.
If the "extensions" are not equal, you can compare the current texture path without extension with the other texture path.

winter rose
warm hedge
#

As I mentioned supported extension is limited so maybe like:

private _objTex = "a3\bruh\swag_ca.paa";
private _cfgTex = getText (configFile >> "CfgVehicles" >> "bruh" >> "texture"); //just an eg
private _ext = "";
{
    if ((_objTex select [count _tex-count _x]) == _x) exitWith {_ext = _x};
} forEach [".paa",".pac",".jpg"]; //more exts should be here
(_objTex == _cfgTex or _objTex == (_cfgTex + _ext))```
#

Hehe, it's free to discuss about solutions!

hallow mortar
#

What's the trick to attaching something to a turret so it rotates properly?

#

I have something attached to a turret memory point, and while its position is changing as you would expect when I move the turret, its orientation is fixed

warm hedge
#

That's how attachTo works. You can do draw3D and some setVectorDirAndUp

hallow mortar
#

That doesn't seem like a practical solution

warm hedge
#

I think so either. Sadly this is current attachTo

winter rose
#

your object os attached to the object (which does not rotate) and not to the turret, yeah
Maybe you can attach to the selection, but you will still have to rotate it accordingly iirc

hallow mortar
#

I sort of expected that the memory point would have rotation as well as position, but obviously not

simple notch
#

How would I fill in the params for this?

#

onPlayerKilled.sqf
Executed when player is killed in singleplayer or in multiplayer mission.

params [
"_oldUnit",
"_killer",
"_respawn",
"_respawnDelay"
];

#

thats copied from the website but how am I suppose to display the killer and stuff

hallow mortar
#

How do you want to display the killer? In a message to all players, in a hint...?

#

That params line is what goes at the top of your onPlayerKilled.sqf script file. It defines all those local variables, which contain the information passed down from the game when the script is executed, so you can use them in the rest of the script.

simple notch
#

Well for example I would want a box at the bottom to say who he was killed by and it disappears after they respawn

#

how would I do that?

reef edge
#

Hello, does anyone know the proper way to create the client video settings dialog (RscDisplayOptionsVideo)? Need to open the display to read client settings from it.

errant herald
#

can someone help me with writing a script. I'd want an item to equal damage 1 when picked up and put in inventory and back to 0 when dropped

hallow mortar
#

@simple notch If you want to create a box at the bottom you'd probably want one of these things: https://community.bistudio.com/wiki/Arma:_GUI_Configuration which I don't personally know how to use.
Within those, at some point you get to the bit where you define the text to display, and inside that you'd use format and reference one of the variables defined in the params, which will then automatically display whichever information it is

#

I can tell you how to make it appear in the text chat (for the killed player only):

// in onPlayerKilled.sqf
params ["_oldUnit","_killer","_respawn","_respawnDelay"];

systemChat format ["You were killed by %1 and will respawn in %2",_killer,_respawnDelay];```
#

It's worth noting that death messages is a parameter in the multiplayer difficulty settings. You can replicate it with scripting, but if you have control over your server's configuration, you don't need to.

errant herald
#

what seems to be the issue with this script

_player = _this;

while{alive _player} do { 
    if ("red_radioshack_base" in backpack player) then {
    _player setHit ["radioshack",0];
    
    } else {
    _player setHit ["radioshack",1];
    };
    sleep 0.1;
};
    
    ```
#

im trying to make the item "radioshack" equal to damage 1 when its in the backpack slot

#

this is the error in arsenal^

warm hedge
#

How do you call it? And seems error says everything to fix your problem: use select to define _player

errant herald
#

im calling it via an eventhandler

warm hedge
#

Then just do select it, don't know what EH but every EH does have _this as an array

errant herald
#

do i have to use an event handler to call the script?

warm hedge
#

It's your call, I know nothing about your script and goal

errant herald
#

I'm trying to create a long range radio. I want it to look like two different models when being worn and when it is on the ground.

#

When it is worn on the player, I want it to look like a backpack. And when it's on the ground, I want it to look like something else.

#

I was thinking a hide/unhide animation with damage source would work.

warm hedge
#

Backpack does have nothing to do with it, and your script you wrote tries to do something to player not backpack

#

Maybe changing matetial? Dunno...

errant herald
#

well the TFR radio is attached to the backpack

warm hedge
#

What is "well"? I get nothing... I know there's some Modded LRRs but I believe backpacks have no damage to take

errant herald
#

i see

#

thanks for ur help

warm hedge
#

Also you can't use while inside EH directly

hallow mortar
#

Giving a backpack a different appearance when it's on the ground is, at a general appraisal, wildly impractical if possible at all

#

I strongly suggest that it's not worth it

gentle plaza
hallow mortar
#

Disable base channels for everyone and create custom channels for specific people?

#

You can't really pick and choose who gets side chat because its whole purpose is to talk to the entire side. If you want a limited net, you should create one for that purpose

gentle plaza
#

I see. Thank you for the explanation @hallow mortar. I will use radioChannelCreate and list the unit names I want to have access to this custom channel.

hallow mortar
#

Be advised that that alone will not allow the channel access to be transferred (e.g. if the RTO dies, their channel access dies with them). It is possible to create a system where channel access is tied to possession of an object such as a radio bag, probably using bis_fnc_hasItem but that wasn't my project so I don't have an exact blueprint

gentle plaza
#

deeper down the rabbit hole I go then thanks

hallow mortar
#

Shouldn't be too complex, you just want a loop that frequently checks players to see if they have whatever thing it is (might not need fnc_hasItem if it's a backpack actually) and adds or removes their access accordingly

#

while, forEach, if, backpack _x == and sleep are key components but I don't wanna think too hard about it atm

gentle plaza
#

Love the idea, dont think im there yet. Is it wise to have something like that running throughout a mission performance wise?

hallow mortar
#

If you use a sleep so it runs once a second or whatever it should be fine.

#

Someone else might be able to help you in more detail but it's like 4am in the core EU TZs so yknow

gentle plaza
#

Thanks for your guidance, very insightful. My knowledge of scripting isnt there yet to implement your suggestion. I may try and just cheese it with command channel and just call my group leaders rto's or something.

hallow mortar
#

If I remember in the morning I will try to construct something more useful, if no one else sorts you out first

gentle plaza
#

I am using this script in an init.sqf radioChannelCreate [[0.96, 0.34, 0.13, 0.8], "Long Range Net", "%UNIT_NAME", [rto]]; // to apply a custom channel to only the RTO. Now if I chose a different role, still works as intended (not giving radio ch permissions) but I get an error message " Undefined variable in expersion: rto" What am I doing wrong here?

warm hedge
#

Undefined variable in expersion: rto means rto is undefined. Also see the pin to format the code

#

Now if I chose a different role, still works as intended (not giving radio ch permissions)
I can't understand this sentence

gentle plaza
#
radioChannelCreate [[0.96, 0.34, 0.13, 0.8], "Long Range Net", "%UNIT_NAME", [rto]]; 
``` Sorry for not formatting.  My intention is to give "Long Range Net" only to the "rto", when I select say "medic", the role does not have the "Long Range Net" channel which is what I want, but I get the error message for rto being undefined.
warm hedge
#

How rto's defined?

gentle plaza
#

it is the variable name of a player

warm hedge
#

And what do you mean

select say "medic"
?

gentle plaza
#

spawning in as any role besides the role with the variable name rto

warm hedge
#

I don't get it. What exactly did you do to “select the role”?

gentle plaza
#

In other words, when players join the mission, on the role selection there are your standards roles, Platoon leader, medic, Riflemen ext. One of the roles, the radio telephone operator, has the variable name rto.

warm hedge
#

I mean what code did you do? Or anything other?

gentle plaza
#

I apologize this is so difficult for me. I dont understand what your asking by what code I used 😦

#

I think I understand my problem. When I load the mission with AI to fill the empty slots I dont get the error message. But if I am the only player and I choose a role besides the rto role, and there is no ai to fill that role, only then do I get the error message.

#

So I suppose rto is undefined in the expression if there is no player or ai filling that role/slot

warm hedge
#

So you meant to select the role in mutiplayer lobby, and get into the mission right?

gentle plaza
#

yes, should have said multiplayer lobby

warm hedge
#

Your mission should have AI mates or not?

gentle plaza
#

it should not

#

So i wont get the error message if the role is filled, but I want every squad to have an rto role, so if say I only have enough players to fill 2 squads and the 3rd squad is empty including the third sqauds rto role I will still get the error message

warm hedge
#

If your mission is JIP-compatible, this won't solve it

gentle plaza
#

it is JIP compatible

#

@eager pier thanks for that

warm hedge
#

Don't create it, just add the player to the channel

gentle plaza
#

Ok so I still need to create the channel, somehow find out what its index is returning and use that number to radioChannelAdd

warm hedge
#

Probably save the index and share with publicVariable

gentle plaza
#

Thank you both for your help, Im obviously not knowledgeable enough yet to implement what I thought was such a basic feature. Even if I learn indexing/public variables I still have to tackle what to do on respawns. Think I will search for a simpler solution. Also heard there are problems with voice on the custom channels, would break my heart to spend another day getting this working and then find out the custom channels suck for voice.

gentle plaza
#
if ( isServer ) then {
    private _channelName = "Air Traffic";
    private _channelID = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], _channelName, "%UNIT_NAME", []];
    if (_channelID == 0) exitWith {diag_log format ["Custom channel '%1' creation failed!", _channelName]};

    missionNamespace setvariable ["airTrafficChannel",_channelID];
};
``` This is what I used in my init.sqf```sqf
_pilots = ["uns_men_VC_Mainforce_RTO","B_helipilot_F"]; 
_iampilot = ({typeOf player == _x} count _pilots) > 0; 
if (_iampilot) then {
    _airTrafficChannel = missionnamespace getvariable "airTrafficChannel";
    _airTrafficChannel radioChannelAdd [player];
};
``` this is what I used in my OnPlayerRespawn.sqf     not sure if these will both work with JIP but its what I was looking for, assigns channels via unit config names
gentle plaza
#

word thank you

vague geode
#

Is there a way to incorporate a delay into the code executed by an event handler?

warm hedge
#

Use spawn

vague geode
#

@warm hedge Can you tell me exactly how do use it? I tried it before without the desired effect.

warm hedge
#
addEventHandler ["Something",{
  _this spawn {
    /*
      Your code
    */
  };
}];```This is enough
vague geode
#

@warm hedge And how do I incorporate a delay?

warm hedge
#

Just sleep?

vague geode
#

@warm hedge That didn't work...

warm hedge
#

Huh

#

How'd you do that?

vague geode
#

@warm hedge sleep 30;

warm hedge
#

I'm not asking it; I'm asking the entire

celest flicker
#

My guys

#

I came back

#

With yet another inquiry

#

That boggles the mind

#

How doest thou make thine entity detectable on the mine detector yet its not a mine

#

Nah but really no shitpostery now, is there a script that makes an object detectable on the mine detector radar?

warm hedge
#

No

celest flicker
#

Well that's bad

#

I was planning on making a nice encounter about a bus full of people and from that bus theres a ping from the mine detector

#

And that would have led to the players doing some interrogation

#

Well what do i do when all passengers get out?

#

Delete the mine?

#

Passengers

#

And when the players go to check for mines?

#

The guy goes boom

#

Cause they got too close

#

Hmm

#

Arent AT mines really big and visible?

#

What do you mean by attach?

vague geode
#

@warm hedge It works now. Thank you.

#

Does the reload command reload weapons instantly or similar to reloading on an ammo truck?

old oak
#

Anyone have a good way to make a SAR practice script (random aircraft crash)

smoky verge
#

been using the following lines after a fire eventHandler so that when a shot is fired it teleports to a predefined position, direction and rotation

_projectile setVectorUp [356.394, 341.78, 35.881];
_projectile setPos(getPos h1);
_projectile setDir(getDir h1);

but when I do the projectile does move to that positon but still uses the direction and vertical rotation of the turret I fire it with
am I doing something wrong?
tried with setVectorDirandUp but got the same result

young current
#

you need to set its velocity

warm hedge
#

👆 Also setPos, setDir do overwrite your vectorUp, so setVectorUp or setVectorDirAndUp must be executed after, don't know if it does matter

smoky verge
#

oh right the velocity
let me see

#

used the rotation of h1 in the velocity parameters but now it seems to follow a slightly off velocity than intended

#

also no vertical rotation

young current
#

you could try setVectorDirAndUp

smoky verge
#
this addEventHandler ["Fired", { 
 params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
_projectile setVelocity(velocity h1);
_projectile setPos(getPos h1);
_projectile setDir(getDir h1);
_projectile setVectorUp [356.394, 341.78, 35.881];

}];```
warm hedge
#

setPos overwrites your velocity

vale urchin
#

can anyone help me with the Loiter radios

smoky verge
#

tried both before and after velocity but now the bullet doesn't even appear

warm hedge
#

@vale urchin “Can anyone help me” without introducing your problem is really a bad idea, nobody could help you

smoky verge
#

ok returned to the no vertical rotation

spark rose
#
airconvoy_task setTaskState "Succeeded"; 
airconvoy_big_task setTaskState "Succeeded";
#

using this i get the error "generic error in expression"

#

this is the syntax on the wiki - guessing its wrong?

warm hedge
#

What's airconvoy_task and airconvoy_big_task? I suppose these aren't tasks

spark rose
#

they're the variable name for the tasks.

warm hedge
#

Just give me how did you define them

smoky verge
#

oh I think I misunderstood the concept of Dir and UP

spark rose
#

i used modules

warm hedge
#

And?

spark rose
#

i placed two task modules on the map. One is airconvoy_big_task, which is the parent task. The child task is airconvoy_task. airconvoy_big_task is visible at mission start, and airconvoy_task is available once player goes to the location airconvoy_big_task indicates

warm hedge
#

So, airconvoy_task and airconvoy_big_task are variable name of modules? That are Objects not Tasks

spark rose
#

Ahh. I see said the blind man.

#

However I have also tried using "task ID". I suppose that is not the task either?

warm hedge
#

Hang on... I'm not kinda familiar with those modules

spark rose
#

i'll give it a try

#

@warm hedge That worked using taskID as a stand-in for taskName. Thank you.

#

I'm thinking we need to have a Arma3 wiki clean-up project

warm hedge
spark rose
#

Yeah, i will definitely be posting some things i've learned in the Notes, at minimum

obtuse crypt
#

Guys i am using this code in players init to spawn players in parachutes, but it spawns as many chutes for each player on map, do you know how can i solvde it :

chute = "Steerable_Parachute_F" createVehicle [0,0,0];
chute setPos [getPos this select 0, getPos this select 1, 200];
this moveIndriver chute;
I tried with variable name instead of this, but it didnt helped.

winter rose
#
chute = "Steerable_Parachute_F" createVehicle [0,0,0]; 
chute setPos [getPos this select 0, getPos this select 1, 200]; 
 this moveIndriver chute;

@obtuse crypt this is why you should not use init fields, as without proper and heavy controls they multiply by the number of units

#

are you familiar with scripting?

obtuse crypt
#

Not that much

winter rose
#

try```sqf
{
private _parachute = "Steerable_Parachute_F" createVehicle [0,0,0];
private _pos = getPosATL _x;
_pos set [2, 200];
_parachute setPos _pos;
_x moveIndriver _parachute;
} forEach [ unit1, unit2, etc ];

obtuse crypt
#

Will do right now

obtuse crypt
#

@winter rose it works in sp, but not on dedi from some reason

#

Maybe if some of players wich variablename is listed is not spawning it breaks?

smoky verge
#

tried to use setWeaponReloadingTime on a turret but didn't work
this setWeaponReloadingTime [gunner (vehicle frank), currentMuzzle (gunner (vehicle frank)), 0.1];

obtuse crypt
#

@winter rose i have tried with init, it work but spawns para for each player, and from iniserver it does not work at all

vague geode
#

Any idea what this means and how to fix it?

19:16:21 Server: Object 2:6233 not found (message Type_160)```
Found it in my server log.
slim verge
#

struggling to get dead ai crew out of heli.
Scenario, ai crew flying huron with prisoner players in
Helo gets hit
atm setting damage 1 to ai crew
Heli crashes
cannot action eject, or setpos them out of the heli.
Heli not locked;
At the moment this isn't a locality issue as testing on my local machine in mp mode
If i don't kill them or mainly the driver heli then the gear comes down and lands normally, even if i set him unconscious
Wiki does mention that i should be able to setpos them out, but isnt working
Code is running setpos command is correct
Any ideas ?

hallow mortar
#

Is there any particular reason you need to move them out? If they're dead either way it doesn't make much difference, right?

slim verge
#

wrong i need to make their inventory available to the players (Escape mission)

hallow mortar
#

Can you just add stuff to the inventory of the helicopter or on the ground nearby?

slim verge
#

and if it blows up

hallow mortar
#

If it blows up it will probably kill the players

slim verge
#

nope the heli eventually blows up, it isnt very realistic to have a prisoner escort with weapons in the chiopper invenmtory, there are 2 pilots and 2 military police, these objects need to be pilfered to grab their gear

#

nope it wont they are sethit eh

#

The issue is getting dead ai out of a helo

hallow mortar
#

The "chopper inventory" is an entirely abstract concept and it's perfectly legitimate to claim that it also represents the inventory of the dead crew.

I am looking for other ways of getting them out, but I am also looking for alternate ways to approach the problem in case it turns out to be easier.

slim verge
#

i can work aroiund by deleting the crew and recreating them but thatas a bit of a hack

hallow mortar
#

If you just need those bodies out and the subsequent status of the seat doesn't matter, you could try creating an invisible VR man and moving them into the seat. That should force out whoever's in there.

slim verge
#

ah maybe that would work thanks

knotty mantle
#

Is there a way of copying a string to a client clipboard?

#

On a dedicated MP server

#

Or basically make that string somehow available to copy it

winter rose
still forum
#

On a dedicated MP server
no

#

well ace has a extension for it

knotty mantle
#

Yeah i am currently looking through the fnc_buttonexport.sqf to see how it was done in ace arsenal.

#

But i am make very little progress on how to use it in a script

slim verge
#

@knotty mantle what are you trying to do, make a url in the briefing ? or pass a url maybe ?

knotty mantle
#

I put a string together containing all unit loadouts and want to export that to import it again next mission.

hallow mortar
#

Dump it to diag_log

#

(once)

knotty mantle
#

Is diag_log still restricted to 1044 characters? Cause that might not be enough with ~20 players

hallow mortar
#

I've no idea

#

This seems like something you could save on the server somewhere and retrieve later, rather than going through the clipboard