#arma3_scripting

1 messages · Page 618 of 1

fair drum
#

this worked for today, but let me go and try to rewrite this better which is mainly why I wanted another eye to look at it.

winter rose
#

alsosqf if (voted == "false") then { easyDifficulty = easyDifficulty + 1; publicVariable "easyDifficulty"; player removeAction _actionID; voted = "true"; } else { hint "You already voted"; sleep 5; hint ""; player removeAction _actionID; };
just removeAction at the beginning
you could also remove all actions as soon as voted is set to true

still forum
#

y u no bool

fair drum
#

i kept getting comparative problems when I had as the addActions show condition "voted == true" and got frustrated so I used a string

#

oh wait... i could have just done "voted"

#

im an idiot...

minor osprey
#

Does anyone know how to set up a teleportation system to different points throughout a map? I'm pretty new to scripting in Eden, and am probably in way over my head, but any and all advice and help would be much appreciated

winter rose
#

would you accept if the person could teleport anywhere they want, or only specific points?

minor osprey
#

Only specific points

still forum
#

do you have ACE?

minor osprey
#

Yeah

still forum
wheat geyser
#

@unique sundial Regarding the free camera: Your function "transformVectorDirAndUp" (?) is in fact wrong, because the rotational axis change when the yaw/pitch/roll angles are too far off from the default state (i.e. vectorDir = [0, 1, 0] and vectorUp = [0, 0, 1])

#

Just fyi, transforming a free camera via rotational matrices given by the rotational/positonal/whatever values given by the Display EH "MouseMoving" is still a bad idea, because of propagation/"accumulation" of very weird rounding erros. E.g. I had very weird rounding errors just doing normed Rotations with vectors, even considering the max. floating point precision, so that's sth a dev could look into. (In know in A2 setVector-Commands are heavily prone to "rounding" erros)

cerulean cloak
#

Right, I'm probably being a complete idiot here but for some reason a unit with this in his init ````this disableAI "MOVE";

[this, "PRONE_INJURED_U1", "FULL"] call BIS_fnc_ambientAmin;``` isn't animating and is instead just standing there

winter rose
#

don't disable its movement?

wheat geyser
#

If anyone is intersted: Free Camera Movement is best realized by just using a x-y-plane projection of vectorDir to get the yaw (i.e. just use getDir), adding the desired rotational angle and creating a completely new vectorDir disregarding the z-component entirely. Because in free camera movement roll-ing is omitted, you can easily obtain the current pitch value by acos ((vectorDir spectatorCamera) vectorDotProduct [0, 0, 1]) + your desired pitch rotation, omitting the yaw. Then you just transform both vetors with each other and you're finished, see "BIS_fnc_setObjectRotation" for details.

cerulean cloak
#

I was worried they'd run off if I didn't

little raptor
#

They don't when you use ambient anims

#

You can even add an event handler to be sure

cerulean cloak
#

Removed the part disabling movement AI and they are still just standing there

little raptor
#

You should play the move with some delay

winter rose
#

(and ideally not use init fields if MP)

little raptor
#
this spawn {
sleep 0.1;
[_this, "PRONE_INJURED_U1", "FULL"] call BIS_fnc_ambientAmin;
}
cerulean cloak
#

Thanks, I'll try that now

little raptor
#

@winter rose Aren't init fields executed only once upon mission start and on the server only? So I don't get the problem with the init fields

winter rose
#

nope, they are run for the server and for each and every player connecting

little raptor
#

Oh, that's bad!

winter rose
#

iiindeed (unless you need it ofc)

little raptor
#

So if you do:

if (isServer) then {}

the problem is solved?

winter rose
#

yep

cerulean cloak
#
sleep 0.1;
[_this, "PRONE_INJURED_U1", "FULL"] call BIS_fnc_ambientAmin;
}```

Didn't work and spat out an error about `BIS_fnc_ambientAmin` being an undefined variable. So I tried removing `this spawn` and that didn't fix it either
robust hollow
#

Amin -> Anim

cerulean cloak
#

Fucks sake

#

Thanks for noticing that

#

Facepalm avatar seems very fiting

little raptor
#

@winter rose Another MP question. If I have a unit that has a variable in its local namespace (unit setVariable ["var", var]) and the unit changes locality, I have to recreate the variable right? Or does it get "transferred" upon changing locality?

winter rose
#

it does not get transferred, but you can setVariable with the public option:

unit setVariable ["varName", "varValue", true];```
little raptor
#

I can't, because the variable changes often

robust hollow
#

or with the owner id if you know who the locality is transferring to

little raptor
#

That would consume a lot of network traffic

#

I think there's a local event handler

#

iirc

winter rose
#

(there is)
what is this variable, if I may ask?

little raptor
#

My AI have several controlling parameters, for example, the path

#

There are over 100 tho

winter rose
#

and you are considering HC now, get it

little raptor
#

Some don't change much, some change very frequently

winter rose
#

(or player leader)

little raptor
#

Yeah

#

Anyway, thanks for the help! 🙂

winter rose
#

you could make a function that would make the server "transmit" (remote exec) variables to the machine that asked them

little raptor
#

What if the variable is saved on a machine that disconnects?

#

It gets completely destroyed right?

robust hollow
#

yes

little raptor
#

So I suppose I'd have to "reinitialize" the AI in such situations

winter rose
#

yep - or make it so the server always has a copy

little raptor
#

Like an occasional update. Good idea

swift merlin
#

am I able to limit airspeed of an ai piloted plane? I am doing a paradrop and the pilot always max speeds through the DZ leaving half the ai parachutests to land in the forrest beyond

ripe sapphire
#

It also helps to set allowfleeing 0 for the unit

#

So they dont run away when theyre getting shot

swift merlin
#

can i throw that in the init file or do i need to make a seperate file for it?

#

nvm i got it

#

I do use the allow fleeing command but my plane likes to dive down and to the left for some reason as it starts the paradrop

jaunty ermine
#

what would be the best way to unequip an attached item from someone and have it spawn in the ground container, as if the player were manually doing it?

ripe sapphire
#
_wh = createVehicle ["GroundWeaponHolder_Scripted", position player, [], 0, "CAN_COLLIDE"];
player removePrimaryWeaponItem "optic_Hamr";
_wh addItemCargo ["optic_Hamr", 1];

this one works, however the ground container will still remain even if empty
replace "optic_Hamr" with what you want
https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Items

ripe sapphire
#
primaryWeaponItems player params ["_silencer", "_laser", "_optics", "_bipod"];
hint "Attachment dropped!";
player removePrimaryWeaponItem _optics;
createVehicle ["GroundWeaponHolder_Scripted", position player, [], 0, "CAN_COLLIDE"] addItemCargo [_optics, 1];

this one removes whatever silencer/laser/optics/bipod the current weapon has, just change the orange _optics to what you need

jaunty ermine
#

I've been playing around with that, for some reason if I try and assign the item as a variable it fails

_nvg = hmd player;
_wh = createVehicle ["GroundWeaponHolder_Scripted", position player, [], 0, "CAN_COLLIDE"];
 player unnasignItem _nvg;
_wh addItemCargo [_nvg, 1];```
ripe sapphire
#

what are you trying to achieve?

#

box addItemCargo [item, count] syntax for additemcargo

#

hmd player is not an item

#

example: supplyBox addItemCargo ["optic_ARCO", 10];

#

this adds 10 ARCos to the supply box

#

what are you trying to remove? NVGs or weapon attachments?

jaunty ermine
#

Yeah I get that, but I can't hard code the add item since that reduces the scope, hmd player returns the nvg of the player as a string which seems to be the failing part since hard coding the class name works

#

I was more looking for an alternative to spawning a weapon holder, if that is the best /only option to spawn an object on the ground then I'll just keep debugging

ripe sapphire
#

you have a typo

#
_nvg = hmd player; 
_wh = createVehicle ["GroundWeaponHolder_Scripted", position player, [], 0, "CAN_COLLIDE"]; 
 player unassignItem _nvg; 
_wh addItemCargo [_nvg, 1];
#

works for me

#

and i was wrong about the hmd, yes it does return an item

#

oops sorry

#

wait

jaunty ermine
#

On my phone so not copy pasting, does it have to be the scripted one?

little raptor
#

You have one too! xD

ripe sapphire
#

no i just copied back his script, forgot to edit it lmao

#

there

#

@jaunty ermine your script works, heres the problem player unnasignItem _nvg;

jaunty ermine
#

That's not the part of the script that's broken, on my pc, that's my terrible phone typing

#

Look at it more like pseudo code

ripe sapphire
#

why does it work for me then? 😂

#

i am in game

jaunty ermine
#

Probs because I can't be assed typing out the whole script by memory on my phone

#

Was more after if there was any alternatives to the whole spawning a weapon holder and adding it as cargo

ripe sapphire
#

what is wrong with that tho

#

btw you should also delete the nvg thats in the inventory

jaunty ermine
#

I know

#

Do you want me to type out the whole script?

ripe sapphire
#
_nvg = hmd player; 
_wh = createVehicle ["GroundWeaponHolder_Scripted", position player, [], 0, "CAN_COLLIDE"]; 
player unassignItem _nvg; 
player removeItem _nvg;
_wh addItemCargo [_nvg, 1];

use this, it works

jaunty ermine
#

Cause there is obviously something being lost here

If (! hasInterface) exitwith{} ;
_nvg =hmd player;
player unassignItem _nvg;
If (!( _nvg in (uniformItems player)) && !(_nvg in (vestItems player)) && !(_nvg in (backpackItems player)) ) then {
_wh = createVehicle ["GroundWeaponHolder_Scripted", position player, [], 0, "CAN_COLLIDE"];
_wh addItemCargo [_nvg, 1];
} ;```

Is what I have
robust hollow
#

If (! hasInterface) then {exitwith{}} ;
👇
If (! hasInterface) exitwith {};

jaunty ermine
#

Please excuse any small typos, I am on my phone and the auto formatting is a pain

ripe sapphire
#

hmd : Returns class name of currently used Head Mounted Display. Returns an empty string if the slot is empty.

#

so if the player is not wearing anyhting, it returns an empty string

jaunty ermine
#

Look mate, thanks for trying to help but we're just going in circles

ripe sapphire
#

nvm that, this works:

If (! hasInterface) exitwith{} ;
_nvg =hmd player;
player unassignItem _nvg;
player removeItem _nvg;
If (!( _nvg in (uniformItems player)) && !(_nvg in (vestItems player)) && !(_nvg in (backpackItems player)) ) then {
_wh = createVehicle ["GroundWeaponHolder_Scripted", position player, [], 0, "CAN_COLLIDE"];
_wh addItemCargo [_nvg, 1];
} ;
#

unassignitem just moves the nvg to the inventory

jaunty ermine
#

Yeah

ripe sapphire
#

so condition wasnt triggered

jaunty ermine
#

I'm not trying to spawn it unless it's been removed by that function

#

So of course the condition that is set only to fire if it's not in the inventory isn't firing if it's not removed

finite sail
#

would someone be good enough to confirm that www.hostedredmine isn't working for them?

#

please

#

can't get at my bug/issue tracker 😦

winter rose
#

Error 1001
indeed

finite sail
#

mmm thanks mate

#

hostedredmine were recently acquired by planio, im hoping nothing terrible has happened. I've got 5 years of issue tracking there

digital berry
#

Hi, I'm trying to animate the player with player switchMove "InBaseMoves_repairVehiclePne"but nothing happens on command execution. Even in a plain VR mission with the debug console no animation is played.
Any idears what could be wrong? I also tried playMovebut nothing with that cmd anyways.

warm hedge
#

Some of the animations aren't player compatible

#

AKA only for AIs

digital berry
#

Oh ok, thats good to know. I was wondering why the anim was playing in the animation viewer but not with the command. Guess in the viewer the unit is an AI.
Thank you for the info 🙂

little raptor
#

@digital berry @warm hedge
All animations are compatible with players:

player switchMove "InBaseMoves_repairVehiclePne";
player playMoveNow "InBaseMoves_repairVehiclePne";
warm hedge
#

Hm, didn't know that workaround. Anyways, even if it could played on player unit, looked worse in FPP

little raptor
#

yeah

#

head direction is always toward the "front" of the model

#

unless you change it yourself

#

not pretty

ebon citrus
#

what would be the reverse of objectParent, i.e. to get the children of an object

warm hedge
#

I don't there is

little raptor
#

there isn't any such command afaik

exotic flax
#

get all objects and check if parent is given object?

#

single line script

warm hedge
#

This actually is an idea, but... not ideal

little raptor
#

yeah good workaround

#

but slow

ebon citrus
#

Does not suit the condition

exotic flax
#

which condition?

ebon citrus
#

as i cant get the original object to check if it's the parent. Actually, im not sure if it IS an object

#

ah, the weapon proxy in a unit's hand

little raptor
#

weapon proxies are "objects" afaik

ebon citrus
#

also, i would personally always steer away from iterating through an unknown number of objects

little raptor
#

but they are hidden

ebon citrus
#

mmmh...

#

you see, im trying to get the weapon object in order to get some memory-points from it

little raptor
#

You cant

ebon citrus
#

but it seems i'll need to spawn a copy of the weapon as a simple object and do it that way

little raptor
#

The only way is cursorobject

#

That is also possible

#

But you can't do anything with the original weapon, obviously, because it has it's own orientation and position

exotic flax
#

wait... objectParent is checking if an object is inside a another object (and not class parent).
So... get all objects in object?

ebon citrus
#

@exotic flax that's exactly the problem

#

Im told you CANT get objects inside an object

#

@little raptor yeah no, not my intention to edit the weapon object, just trying to read data from the model that is not in the config

exotic flax
#

items _object

ebon citrus
#

like the positions of memory points and so on

#

Not inventory items

#

But objects

little raptor
#

Those positions are relative tho

ebon citrus
#

items returns stored inventory items

#

everything is relative to something

little raptor
#

If you can't get the original object, I don't see what you want to do with some relative positions

ebon citrus
#

you just need to figure out relative to what

little raptor
#

Exactly

#

You can't get that "what"

ebon citrus
#

you can

#

because in this case, it can be assumed they are relative to the unit*

little raptor
#

They are not

ebon citrus
#

but they are

little raptor
#

They are relative to the weapon

ebon citrus
#

which is relative to the unit

#

so the coordinates inherit that parent-child relationship

little raptor
#

and you don't have the weapon

ebon citrus
#

i dont need it

little raptor
#

a weapon has it's own direction and position

ebon citrus
#

unless it doesnt

little raptor
#

in arma it does

#

you can use weapondirection tho

#

that can help

#

but what about its position

ebon citrus
#

i only need the direction of the unit

little raptor
#

weapons do not have a fixed holding style either

#

You need more

ebon citrus
#

because the weapon tries to aim to the direction the unit is facing (not the eye-direction)

little raptor
#

There is something in arma called aiming dead zone or something

ebon citrus
#

yes yes yes

little raptor
#

Your weapon can move freely in your hands without changing direction

exotic flax
#

what are you trying to do?

ebon citrus
#

but this is all irrelevant for the application

#

im first trying to figure out if i can do it, before i say what im doing

#

Because I want to do it

#

it's a very simple idea, but if someone else can do it already, then i have no motivation to do it

little raptor
#

Let me guess. You want to mount something on the weapon?! 🙂

ebon citrus
#

negative

little raptor
#

Laser pointer?

ebon citrus
#

nope

exotic flax
#

🤷‍♂️ but if we don't know that what you want to do, we can't tell you if it's possible or how to attack the problem... because now I have the feeling you're making it too complicated (for Arma and yourself)

ebon citrus
#

Grez, i know what im doing

#

and i already have my solution

#

i dont know why this conversation is going on anymore

little raptor
#

yeah

ebon citrus
#

but it seems i'll need to spawn a copy of the weapon as a simple object and do it that way
@ebon citrus

little raptor
#

nm

ebon citrus
#

i can get the memory-points i need that way

#

Thank you for your help

little raptor
#

no problem

vague geode
#

Do I have to re-add hold actions after respawn just like I have to with normal actions?

exotic flax
#

yes

#

unless you attach them properly to an object

#

same applies to addAction

west grove
#

hmm is there a way to instantly make helicopter blades stop spinning?

winter rose
#

setDamage

vague geode
#

@winter rose Damnit, I just wanted to answer _helo setDamage 1; but you were a second faster...

west grove
#

i guess hitpoint damage is more effective

#

engineOn false is too slow for me. there is an issue with dynamic simulation - if you leave the simulation range while the helicopter engine is still on, you will hear it everywhere. that's why i'm now trying to find ways to make it stop faster.

winter rose
#

delete then recreate it

little raptor
#

@west grove Yeah set hitpoint damage on the rotors, then repair them

#

Do you guys happen to know which weapon direction is used when you use:

AI weaponDirection ""

?

#

It's a valid expression! 😅

#

I just don't know which weapon is used as defualt by the engine when you give an invalid weapon!

#

I think maybe it returns wherever the "hands" are pointing!

winter rose
#

It's a valid expression! 😅
The "👀" issue is not that, it is more about the don't ping BI staff #rules 👀 @little raptor 😄

little raptor
#

oh

#

removed

#

sorry

#

It was a question that only BI staff knew tho

#

Coz it's "internal"

#

You don't happen to know Lou, do you?

winter rose
#

Nope, but that's because I am not hired yet

#

j/k, but a few tests or even 3D drawing could provide answers

little raptor
#

good point. I'll do that

still forum
#

@little raptor primary weapon

little raptor
#

Thanks

winter rose
#

so tagging Dedmen works… *keeps note*

little raptor
#

He was in the game, so maybe that's why! 😅

little raptor
#

Another question. Do you know why the AI weaponDirection "EGLM" (or any other secondary muzzle) returns [0,0,0]? I mean isn't that technically a "weapon" (because you can selectWeapon it)?

winter rose
#

it is considered a muzzle, I suppose

finite sail
#

yes, probably, @winter rose

little raptor
#

Yeah. Maybe. I thought since you can selectWeapon it it might be a valid weapon

#

I think this used to work

#

Maybe I'm wrong

cobalt leaf
#

Hello, I am having some troubles with a script
First I am a noob at scripting,
I'm on my first mission and i'm trying to make a trigger to turn TRUE when a player stares at a structure in the landscape..
(should I drop my try for the trigger's script here?)

little raptor
#

triggers don't work like that

#

You can check a loop

waitUntil {
  _d = player getRelDir building;
  _d < 75 || _d > 285
}
#

For an FOV of 75 of course

#

If you want, you can narrow it down further:

waitUntil {
  _d = player getRelDir building;
  _d < 15 || _d > 345
}
cobalt leaf
#

Okay, I will try this then

little raptor
#

You should spawn the code

finite sail
#

i do some staring stuff in mission, cursorObject works for me

little raptor
#

And be sure to define what building is

#

That also works

cobalt leaf
#

Yes, I have it's name "Land_TTowerBig_2_F"

little raptor
#
waitUntil {cursorObject == building}
#

That's not a name

finite sail
#

ah, every mission maker blows that up lol

cobalt leaf
#

I need to give a variable name to the building?

little raptor
#

something like that yes

cobalt leaf
#

I cannot do that, since it is structures on the map by default.
No wait, i'll just remove them and replace them with new ones I can name

finite sail
#

you dont need to

#

once youve found the object you want using nearestterrainobjects

#

you can assign it a variable

cobalt leaf
#

Oh alright

little raptor
#

Or even better

#

Find the object ID

#

Use

[0,0,0] nearestObject ID

Instead of [0,0,0], use the object's position, otherwise it will take some time for the engine to find the object.

finite sail
#

ids can change

cobalt leaf
#

the ID is like the think I droped up there ?

little raptor
#

AFAIK not terrain objects

#

No

finite sail
#

yes

little raptor
#

No. Go to the object

#

cursorObject

finite sail
#

the radio tower he wants is a terrainobject

cobalt leaf
#

Yep

little raptor
#

You get something like this:
b3fbdf7580# 2799081: cementworks_01_brick_f.p3d
ID is:
2799081

finite sail
#

with a little scripting trickery, you can even make it work on non terrain objects and non destroyable ones

cobalt leaf
#

Okay i'll try this later

little raptor
#

@still forum Sorry for pinging you.
So I did some tests on this:

AI weaponDirection ""

and apparently it uses the currentWeapon, not primaryWeapon

reef walrus
#

Hola once again everybody,
any chance one of you knows a way to find out whether or not the UAV terminal is currently open?
It's for my Immersive Maps mod - I basically need a way to distinguish between a "regular" opening of the map and an opening of the map through the UAV terminal.

#

Thanks!

little raptor
#

@winter rose Also, regarding my last issue with "EGLM", if you do selectWeapon and then use AI weaponDirection "", it works with them too!

#

@reef walrus I think it's findDisplay 160

finite sail
#

yes, 160

little raptor
#

So simply:

isNull findDisplay 160
#

If it's UAV terminal

#

Display 12 doesn't exit

reef walrus
#

ohhhhh didn't think about that, I'm not too used to the whole UI stuff. Thanks a bunch, guys! ❤️

finite sail
#

UI stuff is blackmagic

#

get someone else to do it for you

little raptor
#

No problem! I liked that mod of yours!

reef walrus
#

Glad to hear that!
And yeah, all I ever did was a crappy viewdistance dialog and I was close to becoming mad in the process haha

finite sail
#

i still use it now @reef walrus

#

wouldnt be any good without it

#

oh no... english double negatives... mission is good with it

still forum
#

@little raptor yep, code says current weapon, comment above code says primary weapon

little raptor
#

Thanks for confirming! 🙂

onyx sonnet
#

How to change direction in an animation

robust brook
#

Never tried it but, try setDir while in animation? @onyx sonnet

#

Don’t quote me on that tho

onyx sonnet
#
marshal1 setDir 0;
marshal1 switchMove "Acts_JetsShooterShootingLaunch_in_m";
``` this just turns to the animation direction idk tho
robust brook
#

well your setting the direction before playing the animation

reef walrus
#

@onyx sonnet the animations don't really turn characters in any direction.
But some animations start with the character not facing its initial direction.
Try -180°, you should see that the direction is switched.

onyx sonnet
#

ah i see

#

thanks

finite sail
#

the problem with that particular anim is that it includes a 90 turn clockwise

#

i predict some trial and error testing

orchid stone
#

I want to create a playable character when a new player connects (with some additional logic) - but I can't find how to create an actual "playable" character. Anyone know of the command/function I seek?

_newplayer ?????????????????????```
robust hollow
#

i think you want createUnit instead of createVehicle, and then selectPlayer after that.

little raptor
#

Yes

orchid stone
#

oh RIP

#

yep

#

tyty

#

mmm... gonna test it... but.... i think I used selectPlayer correctly?

    format["%1 has connected to Project Abaddon...",_name] remoteExec ["systemChat",0];
    private _newplayergroup = createGroup civilian;
    private _newplayer = createUnit [[worldsize,worldsize/2], _newplayergroup];
    setPlayable _newplayer;
    [_newplayer] remoteExec ["selectPlayer",_id];    
};```
winter rose
#

@orchid stone … =

orchid stone
#

i dont know where im missing that yet, but i assuming it will become very apparent soon.

winter rose
#

onPlayerConnected = { no
onPlayerConnected { yes

orchid stone
#

lmfao

#

oh ya

#

i literally just ran back to my computer because i realized what i missed

#

thanks man

little raptor
#

@orchid stone For compatibility reasons, use the stackable version

#

Am I missing something?

orchid stone
#

👍 👍 👍 👍 👍 👍 👍 👍 👍 👍

#

done

robust hollow
#

selectPlayer requires a local argument so you would need to set the player as the owner of the unit/create the unit on the player’s game instead of on the server.

orchid stone
#

got it, adding that too. you guys are super helpful. will post my working code momentarily

#

(hopefully) lol

winter rose
#

it used to change locality by itself, not anymore

cobalt leaf
#

Okay, i'm back. I have the ID of the structures I want to be used.
Where am I supposed to print the waitUntil { _d = player getRelDir building; _d < 75 || _d > 285 } ?

winter rose
#

wat

orchid stone
#

i need to think about that script some more. maybe an EH isn't the way to go, or i should do the evaluation differently. my main issue is, that i need at least one slot available for someone to be able to connect (15 mins of googling found no way around it). So I'm thinking, I just make a maintenance procedure to make sure there are ## of playable characters available, and any cleanup or reset takes place when a player connects/disconnects

reef walrus
#

@orchid stone
the wiki entry to setPlayable states that it "doesn't work as intended"

#

Maybe the command is just faulty.
Some sort of solution could be to just place a lot of units, disable ai and handle the whole assignment procedure after the player has entered the actual game...?

winter rose
#

you cannot setPlayable like e.g "create a server slot" - that's not possible.
but selectPlayer works without that

try creating plenty of playable units and use disableAI = true; in description.ext

little raptor
#

@cobalt leaf Did you want to look at the object directly or simply face the object (even if it's not visible)

#

try creating plenty of playable units and use disableAI = true; in description.ext
Or just disable Simulation
It will be faster (maybe)?

cobalt leaf
#

It's an object located 1 click away that the player has to look at

little raptor
#

But the object should be visible right?

#

If so, use the other script

cobalt leaf
#

Yes, it is visible. It is a radio tower

little raptor
#

I mean the player should see it too right?

#

Not just face it

cobalt leaf
#

mmh what is the difference ?

#

First means the cursor has to be on the objet, and second is the player's front has to be on the objet ?

little raptor
#

If you have something behind your monitor right now, you don't see it but youre facing it

cobalt leaf
#

I see

#

there is a line of sight with the object

little raptor
#

Ok

#

Use the other script

#
waitUntil {cursorObject == building}
cobalt leaf
#

Okay

little raptor
#

What do you want to do tho?

#

What should happen when the player faces the object?

cobalt leaf
#

Tasks is accomplished

little raptor
#

So that will do (hopefully)

cobalt leaf
#

Yup

#

Something else,
I would like the script to be only working if the player is zooming (hold RMB)
I've searched and found displayAddEventHandler, do I need to simply look at the code of hold RMB and put this and waitUntil {cursorObject == building} in an () && () ?

little raptor
#

hold RMB doesn't necessarily mean zooming in

#

Even if it's bound to Hold RMB

#

You can't always zoom in

cobalt leaf
#

In this case, players will be on foot
Plus it's a map for beginner friends, so they probably won't rebind keys, i'm not sure this would be a problem here

little raptor
#

I recommend you use getObjectFOV instead

cobalt leaf
#

Okay

little raptor
#

Not sure if it works for players

#

But I think it does

cobalt leaf
#

Is there a line that gives what action the player is doing (like walking or shooting) instead of giving the key he is pressing ?

little raptor
#

walking: check the current animation being played (animationState)

#

shooting: event handler

cobalt leaf
#

got it

little raptor
#

Or you can also check the speed/velocity

#

Because when the units move they have a non-zero velocity

cobalt leaf
#

I'm not actually trying to know if the player is walking, it was just an exemple

little raptor
#

Ok. Then velocity is better

cobalt leaf
#

I mean, i'm just looking to detect whenever the player is zooming
So, I can check the player's fov for that with the command you gave me

#

After this I will need to detect if he is checking his compas or if he opened his map, so I'm wondering if I can simply detect whenever he presses a key

little raptor
#

Yeah. FOV < 0.75 is zooming

#

The 4th example says zoom.(?!)

winter rose
#

Yep, my bad. I thought it was giving the arc the object represents in the player's fov.

little raptor
#

There's no such command (afaik)

#

@cobalt leaf Avoid keys. Use better conditions

#

compass and map and all stuff like that have some IDD or something that allows you to identify them

cobalt leaf
#

okay

little raptor
#

Map for example, is visibleMap

#

compass: visibleCompass

#

I recommend you try to use event handlers instead of loops if you can.

cobalt leaf
#

Okay , waitUntil {cursorObject == building} works and I can do what I want with it, but it keeps showing an error saying :

Error Generic error in expression```
little raptor
#

question 1

#

Where are you running the script?

#

It has to run in scheduled environment

cobalt leaf
#

In a trigger's condition

#

mmh, how do I do that?

little raptor
#

then spawn it

#
[] spawn {
...
}
astral tendon
#

missionNamespace does not return variables that were made in mid mission? like

missionNamespace getVariable [(str cursorObject), objNull];

returns <NULL-object> for a flag named Flag_7096 that I'm looking at, that flag got its name random generated with

_x setVehicleVarName ("Flag_" + str (floor random 10000));

what's wrong?

cobalt leaf
#

Where do I type the spawn command?

little raptor
#

Where ever you want

#

You put the code inside it

#
[] spawn {
waitUntil {cursorObject == building}
}
#

@astral tendon
vehicle var name is not the same as getVariable

astral tendon
#

yes?

cobalt leaf
#

you mean, in my trigger's condition? Or into the On Activation?

outer fjord
#

Is there any way to actually get amount of fuel from a vehicle into it's proper units? Or is it always just a 0-1 format?

little raptor
#

Units?

#

i dont know

winter rose
#

0-1 only, for correspondence see the config @outer fjord

outer fjord
#

Dang, thank you.

little raptor
#

@astral tendon
Why do you do it that way anyway?

astral tendon
#

@astral tendon
vehicle var name is not the same as getVariable
@little raptor I kown, I need to know why is that missionNamespace getVariable [(str cursorObject), objNull]; is returning <NULL-object> instead of the name

little raptor
#

Just use cursorObject

astral tendon
#

Cant, I need to get the variable of a string.

little raptor
#

I dont get it. You want a string?

astral tendon
#

variable

little raptor
#

object getVariable ["someVar", var]

#

save the variable to the object namespace itself

#

why do you save it to the mission namespace?

astral tendon
#

because I cant save variables to lbData

#

I can only save strings

winter rose
#

and to an object?

little raptor
#

str var

#

gives you the string version of any variable

astral tendon
#

yes, and how to get the variable from the string?

little raptor
#

Explain what you're trying to do

winter rose
#

I think you two are on different things, yeah

little raptor
#

I think you're doing it wrong

#

yeah

astral tendon
#

ok, step by step

#

Im trying to GET a variable FROM string because:
1: lbSetData or any sort of command related to dialog does not allow me to store a variable on any control and they are limit to only strings and indexes and what control is being used
2:As a work around I set a random variable in a script to a flag that is placed on the map with NO NAME on the editor
3:the script did what it was supposed to do and the flag got named Flag_7096
4: missionNamespace getVariable [(str cursorObject), objNull] returns <NULL-object> instead of Flag_7096 as its supposed to do and this is one of the way to get a variable from a trying that I saw on the forums

#

also, cursorObject is returning Flag_7096.

little raptor
#

why do you want to use lbSetData?

#

Use lbAdd

astral tendon
#

still is a string

little raptor
#

I still don't get what you want to do

#

does not allow me to store a variable on any control

Do you want to store variables on controls?

astral tendon
#

yes, with onLBSelChanged

little raptor
#

control setVariable ["something", var]

winter rose
#

…he dieded of happiness

cobalt leaf
#

Update,
I made the script I wanted with your help, about the playing spotting a structure in the distance.
waitUntil {cursorObject == tower} && getObjectFOV player < 0.75

I'm just here for the [] spawn {...} part. I tried putting my code in this, in my trigger's Condition. There are no more errors showing up... but it doesn't seems to work anymore

robust hollow
#

if it is a trigger condition why not just use the condition without waituntil?

#

the trigger cant get the result from the spawn anyway

#

and the waituntil is slightly wrong. both conditions need to be inside it

#

so just put
cursorObject == tower && getObjectFOV player < 0.75
in the trigger condition

cobalt leaf
#

uhm... it does what I want tho

#

ok i'll do that

astral tendon
#

…he dieded of happiness
@winter rose Died of my incompetence, although setVariable does what he said it makes no sense store the variable inside the control since there is just one and not many from the list I had.

cobalt leaf
#

okay, trigger working and no more error

little raptor
#

Put all variables in one array

#

control setVariable ["allvars", [....]]

astral tendon
#

geat, then I just need to get the index

#

Finally got that to work really want to avoid use missionNamespace getVariable next time.

winter rose
#

Yep, better to avoid global variables altogether (besides public ones), the less there are the better

crude vigil
#

Im trying to GET a variable FROM string because:
1: lbSetData or any sort of command related to dialog does not allow me to store a variable on any control and they are limit to only strings and indexes and what control is being used
2:As a work around I set a random variable in a script to a flag that is placed on the map with NO NAME on the editor
3:the script did what it was supposed to do and the flag got named Flag_7096
4: missionNamespace getVariable [(str cursorObject), objNull] returns <NULL-object> instead of Flag_7096 as its supposed to do and this is one of the way to get a variable from a trying that I saw on the forums
@astral tendon
Finally got that to work really want to avoid use missionNamespace getVariable next time.
@astral tendon
Problem was, you were looking at the wrong place for the variable. When you call setVehicleVarName, the variable is not stored in missionnamespace, but on the object's namespace under variable : #vars

orchid stone
#

so it looks like, if i want a player to spawn in as generic joe schmoe... the best way to do it is to just take care of it in the mission config

#

i was really hoping i could make this mod, map agnostic, so it could literally initialize itself with a blank map and everything would be taken care of in code

#
skipLobby = 1;```

make a bunch of blank players like mentioned above
cobalt notch
#

Does anyone know how to make server messages display globally? They display on a timer like they're supposed to... However, the seem to show on the client side rather than the server side (they start when the person connects, as opposed to when the server starts). Am I missing something really simple?

robust hollow
#

you talking about the motd in the server.cfg?

cobalt notch
#

That's my name too!

#

And no, I have a separate .sqf file, that's called under the (!isSever) part of my init.sqf

robust hollow
#

ok, so what part isnt working?

#

you only want the messages to show when the server first starts?

cobalt notch
#

Yeah. They also don't seem to appear globally. Everyone seems to get them locally, at different times

#

When I got the first message, my friends didn't get it until about 10-20 mins later

robust hollow
#

you could call your script under an isServer part instead of !isServer and remoteExec the messages to players. that way they only send when the server starts and everyone receives them at nearly the same time.

cobalt notch
#

My bad. It's under the !isDedicated portion of my init.sqf

#

But how would I go about your suggestion? I'm quite new to the whole dedicated server portion of things

robust hollow
#

send what you have so far.

rough trail
#

So am using drawLine3D and the line is very thin anyway to make it thicker?

ionic orchid
#

nope, unfortunately

warm hedge
#

Use multiple drawLine3Ds

rough trail
#

I am trying to make a skeleton ESP for an antihack menu to tell when players and leaning back to see through walls us there any alternitives? and I will try that now @warm hedge

ionic orchid
#

yeah I used multiples in the past, it depends what you need it for

warm hedge
#

Use GUI instead

ionic orchid
#

(you can't batch them so it's also a bit slow)

rough trail
#

how would I make a players bones sync with a gui

warm hedge
#

Lines of codes

cobalt notch
#

Hmmm, this solution to my global messages problems seems to not have worked, rip

karmic spade
#

I have 2, totally unrelated questions, but would really be intruiged by some answers i might get from the more intelligent people in the community than me.

  1. Is there a way to have Opfor not fire on a Bluefor soilder with certain parameters? (If theyre gun is lowered, if they are unarmed?)

  2. The F/A-18 Mod, the back seat has signifigant issues with the TGP/Laser working? Is there any kind of fix to this?

IDRK where to ask this, it may not be the right spot, but if someone can direct me to a better place that would be awesome!

astral tendon
#

Is there a way to detect and find Runways in particular? Im not sure about nearRoads

warm hedge
#

nearRoads does nothing with it. Check CfgWorlds entries

#

Not sure if there's a way to check if there's a Dynamic Airport nearby directly

astral tendon
#

Because the AI always seems to know well about the Runway that is landing/taking off so I was wondering if I can detect it or find positions.

warm hedge
#

Engine-driven and scripted things are different

onyx sonnet
#

[this,"REPAIR_VEH_KNEEL"] call BIS_fnc_ambientAnim; is removing my ai's loudout?

#

or - it doesnt wear a vest

warm hedge
#

Change equipmentLevel to "ASIS"

onyx sonnet
#

thank you

little raptor
#

@astral tendon Airports are defined in cfgWorlds. The runway is defined in the airport config entries as something like ilsTaxiIn ilsTaxiOut IIRC (I'm on my phone rn so can't check)

#

@karmic spade

  1. setCaptive makes a unit a temporary "civilian" and no one will fire on them. You can define the conditions yourself and if they are satisfied, use setCaptive true
  2. Contact the mod developers
vague geode
#

How does the Trigger Activation Type "Detected by" work? How do I check whether a certain object or unit has been detected by a given side?

winter rose
#

knowsAbout @vague geode

vague geode
#

Ok, but at which value will the trigger get activated? Everything >0?

little raptor
#

typically > 1

cobalt leaf
#

Okay, it's me again
I made to work my scripts to make a player stare at a structure in the landscape , along as open map and compass
Now i'm trying to do like in the Prologue of the game: making a script that returns true when the player places a marker in a zone
So I searched on google and BIS Forum, and I saw that someone was trying to do the same as me : https://forums.bohemia.net/forums/topic/205183-how-to-trigger-players-insert-marker-on-map/

Someone replied with a code that spawns a zone randomly and returns a hint saying whenever the marker placed by the player is in or out of the zone.
I modified it so the zone appears where I want, that works.
Now I'm trying to make the code to return a true instead of an hint, and to place it in a trigger, but I can't find how to make it works...

#

This is the original code I took from the link :

TAG_fnc_createSelectionMarker = {
    _position = player getPos [ random 500, random 360 ];
    
    if !( getMarkerPos "border" isEqualTo [ 0, 0, 0 ] ) then {
        deleteMarker "border";
    };
    
    _mrk = createMarker [ "border", _position ];
    _mrk setMarkerShape "ELLIPSE";
    _radius = 50 + floor random 100;
    _mrk setMarkerSize [ _radius, _radius ];
    _mrk setMarkerBrush "Border";
    _mrk setMarkerColor "ColorBlue";    
};

TAG_fnc_waitForPlayerInput = {
    waitUntil{ !isNull findDisplay 12 };
    findDisplay 12 displayCtrl 51 ctrlAddEventHandler [ "MouseButtonDblClick", {
        params[ "_mapCtrl", "_button", "_mouseX", "_mouseY" ];
        
        if ( _button isEqualTo 0 ) then {
            player setVariable[ "insertPos", _mapCtrl ctrlMapScreenToWorld[ _mouseX, _mouseY ] ];
            
            _nul = [] spawn {
                
                waitUntil{ !isNull findDisplay 54 };
                
                _nul = findDisplay 54 displayAddEventHandler [ "Unload", {
                    _exitCode = param[ 1 ];
                    
                    if ( _exitCode isEqualTo 1 ) then {
                        
                        if ( ( player getVariable "insertPos" ) inArea "border" ) then {
                            hint "You placed a marker inside the Area";
                        }else{
                            hint "You placed a marker outside the Area";
                        };
                    };
                }];
            };    
        };
    }];
};

openMap true;
hint "Place a marker either inside or outside the area shown";
_nul = [] call TAG_fnc_createSelectionMarker;
_nul = [] spawn TAG_fnc_waitForPlayerInput;```
#

eh... the spoiler isn't working

warm hedge
#

Why would you wanted to hide your code? 🤔

jade abyss
#

@cobalt leaf
```sqf
your code starts in a new line.
```

cobalt leaf
#

It was pretty big, I wanted to hide it in a spoiler

jade abyss
#

pastebin might be the better choice for that

warm hedge
#

It doesn't shrink it into one line

cobalt leaf
#

here we go, fixed it

jade abyss
#

If you put sqf right after ```, it will use the sqf syntax (even better readability)
😉

cobalt leaf
#

there

#

So I tried and modified the second part (the one waiting for the player's double click in the zone) to return a true , but I cannot make it to work
I'm wondering if it is because of a synthax error or something, because i'm not having any error message.

waitUntil{ !isNull findDisplay 12 };
    findDisplay 12 displayCtrl 51 ctrlAddEventHandler [ "MouseButtonDblClick", {
        params[ "_mapCtrl", "_button", "_mouseX", "_mouseY" ];
        
        if ( _button isEqualTo 0 ) then {
            player setVariable[ "insertPos", _mapCtrl ctrlMapScreenToWorld[ _mouseX, _mouseY ] ];
            
            _nul = [] spawn {
                
                waitUntil{ !isNull findDisplay 54 };
                
                _nul = findDisplay 54 displayAddEventHandler [ "Unload", {
                    _exitCode = param[ 1 ];
                    
                    if ( _exitCode isEqualTo 1 ) then {
                        
                        if ( ( player getVariable "insertPos" ) inArea "border" ) then {true;
                        }
                    };
                }];
            };    
        };
    }];```
jade abyss
#

You just simply return "true", nothing else.

cobalt leaf
#

Yes?

#

It is what i'm trying to do

if ( ( player getVariable "insertPos" ) inArea "border" ) then {true;
                        }```
jade abyss
#

Also a hint, for debugging stuff:

systemchat str["Checking _varToCheck: ", _varToCheck];

So you can follow the "way" the script takes easily yourself.

cobalt leaf
#

okay

jade abyss
#

(reason why str[] : If the result would be Nil (any) -> the chat* msg wouldn't show up)

cobalt leaf
#

Ehm i'm a bit confused what I should be looking at while

 systemchat str["Checking _varToCheck: ", _varToCheck];

is running

#

This is not really helping me here...

jade abyss
#

erm, it's an example

#

Example:

 systemchat str["_button isEqualTo 0: ", (_button isEqualTo 0)];

right before:

if ( _button isEqualTo 0 ) then {

and so on

cobalt leaf
#

eh so, the weird thing is that

#

it tells me that it returns true

#

but my trigger isn't working...

jade abyss
#

Because you don't do anything in it. You spawn a new Thread, you reach "true". But "true" doesn't do anything.

#

You have to call a function from there.

#

It's like i am asking you how many apples you ate today, and you answer me with: "Yes".

cobalt leaf
#

What would be the fonction to make the trigger's condition true, then ?

jade abyss
#

uhm

#

Not using spawn for example, since you create something "new".

cobalt leaf
#

I mean, my code is inside a trigger's condition

jade abyss
#

Maybe that helps (speaking in windows terms):

call = creating a file inside an existing folder.
spawn = create a new folder, outside of the existing folder. No Links/shortcuts. A clean folder with no knowledge of the main folder. If you pass arguments with spawn, it's like copying that stuff in the new folder.

#

So you have limitations in there, e.g. not "spawn"-ing stuff.

#

kinda same is with adding eventhandler. It's also a different "folder". It just doesn't know about the Trigger etc

cobalt leaf
#

I don't know how to use []spawn actually, i never used it
I do everything in the game with triggers

jade abyss
#

uff

#

probably the easiest solution would be (in your case, without altering the code too much):
Pass the player to the spawn'ed codepart ([player] spawn {) and do in the final then a simple _player setPos with the coordinates

#

(but in the end, you might want to dig deeper into .sqf functions, so you can create scripts like that without using triggers)

cobalt leaf
#

I'm getting real confused here

exotic flax
#

It is what i'm trying to do

if ( ( player getVariable "insertPos" ) inArea "border" ) then {true;
                        }```

@cobalt leaf well, that won't work...

#

Either use exitWith or have a variable which you set to true/false and return that at the end of the code

cobalt leaf
#

Okay, what should I type with exitWith to make my trigger turns true?

jade abyss
#

Either use exitWith or have a variable which you set to true/false and return that at the end of the code
@exotic flax Doesn't work there either, since it's spawned.

cobalt leaf
#

what does it means, it's "spawned" ???

exotic flax
sullen pulsar
#

Would anyone happen to know what dpp_01_transformer_f is apart of if it is apart of anything at all.

winter rose
#

………

#

Optimus Prime?

finite sail
#

lol

sullen pulsar
#

-.-
it's a transformer in Tanoa, trying to pull a list of them from nearestTerrainObjects but can't seem to figure out waht the type name might be.

finite sail
#

ah

sullen pulsar
#

Went through the usual power stuff, nada.

finite sail
#

wait 1

sullen pulsar
#

Trying to revive AEG

finite sail
#

"Land_dp_transformer_F"

sullen pulsar
#

That's for the one in Altis

finite sail
#

ah, k

#

wait 1

sullen pulsar
#

unless it shares the type

finite sail
#

lol

#

the model is the same but they are co,oured differently

#

also, the altis one disappeares when damage 1, the other one doesnt

sullen pulsar
#

Yeah apparently dpp (tanoa) doesn't really have damage states and stuff, seems to be a.. forgotten object?

finite sail
#

yes, exactly

#

"Land_DPP_01_transformer_F";

#

@tough abyss sexy config browser to the rescue

#

its a shame they didnt finish the dpp one up because it's a good infrastructure object that would be a good target for denial of enemy use

sullen pulsar
#

Yeah, you can still apply damage to it and stuff funny enough but it doesn't do anything visually if damage is 1, was tracing all the power stuff on Tanoa, they put so much work into the entire infrastructure but then skimmed on finishing touches D:

finite sail
#

yup

#

it can take a handledamage EH, so you can still hideobject it when it takes a Titan to the face

sullen pulsar
#

Noted WorryThumbsUp
Time to make power line repair simulator 2033 kappa

finite sail
#

what I do is...because these things usually appear in bunches of 4,9, 12 etc, I allow players to kill any of the bunch to succeed mission. it doesnt seem fair to make them pick out an individual one that is surrounded by other, identical objects

#

note the dpp has a red top, dp is grey

sullen pulsar
#

Well my plan was, there is 14? transformers on the western side power plant, those 14 will control the west part of the main island, for each transformer destroyed, furthest towns/lights from the plant go out, if you end up getting to like idk 10 destroyed transformers then only a distance of 2,500km is powered. Take out the remaining 4 and poof no lights anywhere on mainland except the east part cause it has its own power plant of some sort.

finite sail
#

yep, sounds good

#

btw, let me just confirm what i said earlier about handledamage

sullen pulsar
#

well 2,500m*

finite sail
#

looking through my code right now

#

ok, so dpp doesnt have a ruin model... i remeber that

#

dpp sinks into ground when destroyed, but leaves no ruin

#

if you subsequently setdamage 0 it, it pops back up again , good as new

#

disclaimer code written in september last year and working now to the best of my knowledge 🙂

steady terrace
#

I have a helicopter "flying" with unit capture, how do I control the landing gear?

(rather old) searches say the vehicle has to be player controlled for it to respond to ... action ["landgearup", ..., but that doesn't really make sense..

little raptor
#

@steady terrace You have to call the code every frame for it to work

#
_heli action ["LandGear", _heli]
#

This lowers the gear

#

The AI automatically raise the gear

steady terrace
#

well that's what I wanted actually, thanks! putting in AI does it

vague geode
#
_id = [
    player,
    'str_a3_wl_custom_request_tactical_strike' call BIS_fnc_localize,
    "image\holdaction_transmit_idle_ca.paa",
    "image\holdaction_transmit_progress_ca.paa",
    "!((missionNamespace getVariable format ['BIS_available_VLS_%1', side group _this]) isEqualTo []) && _this isEqualTo _target && ((_this getVariable 'allowedTacticalStrike') == 1) && !(((laserTarget _this) isEqualTo objNull) || ((laserTarget _target) isEqualTo objNull))",
    "!((missionNamespace getVariable format ['BIS_available_VLS_%1', side group _caller]) isEqualTo []) && !((laserTarget _caller) isEqualTo objNull) && (((_caller getVariable 'initialTacticalStrikePosition') distance (laserTarget _target)) < 10)",
    { (_this select 1) setVariable ["initialTacticalStrikePosition", position (laserTarget (_this select 0)),true]; },
    {},
    { _bis_hq = (_this select 1) getVariable "bis_hq"; (_this select 1) kbTell [_bis_hq,"BIS_SUPP_cruiseMissile_protocol","TacticalStrike_SupportRequest","SIDE"]; [_this, "cruiseMissileSupport.sqf"] remoteExec ["execVM",2]; },
    { (_this select 1) setVariable ["initialTacticalStrikePosition",[-1,-1,-1],true]; },
    [],
    5,
    1.5,
    false,
    false,
    false
] call BIS_fnc_holdActionAdd;

I am adding a hold action with the code above which when completed executes the script below on the server but for some reason it works perfectly in the 3Ditor but not at all on the server.

The VLS unit is always saying that the target is outside of its firing envelope but it's only supposed to way that when the target is more than 30km away from the target but I tested it on as low as 7km and it still said that.

Does anyone have any idea why?

PS: Please find a link to the code of the cruiseMissileSupport.sqf below.

https://sqfbin.com/ucuvicirefuracusegar

wispy cave
#

Does anyone happen to know which function from contact spawns a high pitched noise and make your screen all blurry?

winter rose
#

most likely a playsound and a post-process effect?

fair drum
#

any way to increase fuel consumption through scripting and not modding?

winter rose
#

no, besides frequent setFuel

fair drum
#

alright

tough abyss
#

Heya'll,
I'd like to create some looping ambient noise for a location. Does anyone know how to loop or repeat a PlaySound3D or Say3D ?

winter rose
#

if you want ambient noise, a CfgSFX would be more appropriate 🙂

tough abyss
winter rose
#

yep!

queen cargo
#

params[nil, "_foo"] could someone check what happens here?

winter rose
#

Error Type Any, expected Array, String

#

@queen cargo ↑

queen cargo
#

Kk

tough abyss
#

i have

#

problem

#

My custom insignians doesnt works

#

on server

#

but in editor it works perfect

exotic flax
#

although; do you also have the mod with insignias enabled on the server?

tough abyss
#

Theres many channels idk where to type

#

What do you mean mod with insignias

#

im making custom insignias wia description.ext

#

not mod

#

if you mean that

exotic flax
#

should work as well, although in that case the path to the texture is most likely wrong

tough abyss
#

But its working in editor?

young current
#

what path did you use?

exotic flax
#

editor is not server 😉

young current
#

👆

tough abyss
#

so

#

is there any solution or other way

young current
#

can you paste the path you used?

tough abyss
#

||class CfgUnitInsignia
{
class peta
{
displayName = "peta"; // Name displayed in Arsenal
author = "All mighty NeoArmageddon"; // Author displayed in Arsenal
texture = "peta.paa"; // Image path. Not sure this is right, try "\insig\us1.paa" otherweise
textureVehicle = ""; // Does nothing currently, reserved for future use
};
class gremlin
{
displayName = "gremlin"; // Name displayed in Arsenal
author = "All mighty NeoArmageddon"; // Author displayed in Arsenal
texture = "gremlin.paa"; // Image path. Not sure this is right, try "\insig\us1.paa" otherweise
textureVehicle = ""; // Does nothing currently, reserved for future use
}
};||

#

This is from description.ext

young current
#

ok so do you have these .paa files in your mission folder?

#

and are they transferred to the server?

tough abyss
#

i have

#

what do you mean

#

Where do i need to transfer them in server file manager?

young current
#

where did you transfer the mission files?

tough abyss
#

converted them from folder to pbo and uplouaded to mpmissions

young current
#

how did you make the pbo?

tough abyss
#

pbo manager

young current
#

I dunno if that works right on missions either

#

perhaps not

tough abyss
#

asfafshit

young current
#

Id save it as pbo from the editor

tough abyss
#

i'll tell our modmaker to put custom insignias in modpack

#

lol

young current
#

thats one way to do it

#

but I hope your modpack does not contain other peoples work

tough abyss
#

nah

young current
#

👍

tough abyss
#

too bad i cant make insignias only for mission

young current
#

well it should work

#

but I dont personally trust pboManager

#

you could try exporting the mission from the editor

tough abyss
#

well is there option to 'pack' mission folder to pbo in editor?

young current
#

Export

copper needle
#

How would I make something like this happen to every player whenever they are in range of an ATM if (typeOf cursorObject == ["Land_Atm_01_F"] && player distance cursorObject < 5) then { player addAction ["Check Balance", { hint format ["Balance: %1", money] }]; };

exotic flax
#

add the addAction to the object is probably the best way, and than in the code you get the player who called it

copper needle
#

but where would I put that? like what file

#

Im very new and have no idea

exotic flax
#

welcome to Advanced Arma Scripting 101 😉

#

if you have placed the ATM object yourself you can put it in the init field

#

or have some code in init.sqf (part of mission) to find all ATM machines in the mission, and attach an addAction to each of them

#

btw... building up a complete L*fe mission/mod without any scripting experience is a bad idea

copper needle
#

I am making a raffle system that involves adding and removing money from players so I thought I might as well make it a little fancy. The server that script will be going on already has its own banking system and the code will be remade to work with theirs but I thought Id learn a little more since I am new and need the experience

#

Definitely not trying a project that big

wraith cloud
#

@copper needle fn_setupActions.sqf

tired sigil
#

@tough abyss Sorry for the ping, but I actually found something that doesn't seem to work unless I'm doing it wrong. Show names of players on GPS doesn't seem to work.

#

// BOOL. TRUE to show unit names on the GPS display. Default FALSE. - That one

daring sentinel
#

Guys can you tell me
What is _this for
I saw some scripts have “var1 = _this select 0;”
I try to google it ,but I still don’t get it 😦

spring vigil
#

@daring sentinel ^

winter rose
#
[] spawn {
  hint str _this; // []
};

[123,456,"hello"] spawn {
  hint str _this; // [123,456,"hello"]
  private _var = _this select 1; // 456

  // better to use params to define variables
  params ["_oneTwoThree", "_fourFiveSix", "_hello"];

  // check matches
  _var == _fourFiveSix; // true
};
daring sentinel
#

If it only has
“var = _this select 0;”
does that mean anything?

winter rose
#

it sets var to the value of the first element of what is passed

daring sentinel
#

Oh ok thanks mate 😄

winter rose
#

@vague geode too many _this select x in your code, too many indent levels / not enough funnel coding (if incorrectCondition exitWith {}), I cannot read that sorry =\

exotic flax
#

who uses select anyway...

params ["_object", "_arguments"];
_arguments params ["_arg1", "_arg2", "_arg3"];
winter rose
#

params is used
just not the variables defined within it…

vague geode
winter rose
#

bit better yep 👍

#

or if (_targetPos isEqualTo [-1,-1,-1]) @vague geode ; have you checked that…

#
_caller getVariable "initialTacticalStrikePosition"
```has it been setVariable public? etc etc
ripe sapphire
#

Hello guys, i tried to delete everything inside a trigger using this code, it works on most things including some structures (ancient pillar), however it doesnt work on others (such as altis air control tower), what is the solution to delete these things that cant be deleted?

{{deleteVehicle _x} forEach crew _x;deleteVehicle _x;} forEach thisList;
winter rose
#

terrain objects cannot be deleted, only hidden

ripe sapphire
#

they are pre-placed in the editor

#

and can be deleted through zeus?

winter rose
#

also, crew should be deleted with deleteVehicleCrew

#

then the trigger must not "grab" (detect) them

ripe sapphire
#

hmm

#

i set it to anybody

#

that code also works for deleting crew btw

winter rose
#

I know it works, but it is not recommended as it leads to memory leaks

ripe sapphire
#

ah ok thanks

#

i tested naming the structures and using deletevehicle with their names and it worked, guess ill have to do that to the ones not detected by trigger

ebon citrus
#

Is there a way to make lights appear even during daytime?

#

setLightDayLight doesnt seem to work

warm hedge
#

In what context?

winter rose
#

it might be a bug, according to a dev (not sure)

ebon citrus
#

Trying to setup some paradrop jumplights for a unit that asked me to and im having a hard time having any sort of feedback on the lightpoint during the day

#

works perfectly during the night

#

but as soon as a sliver of the sun is up, the light disappears completely

winter rose
#

yep, I know :-\

ebon citrus
#

so it's a no-go?

#

the flare can be made visible during daytiume, though?

#

i swear to god this used to work back a few patches ago

winter rose
ebon citrus
#

because i remember making this orbital strike script where i used the lights

#

amped up the light to 1000 intensity and it was visible even during the day quite brigthly

winter rose
#

definitely is a bug

#

broken at one point

warm hedge
#

Flare can't be shown in daytime. Dedmen says someone “optimized” it, IIRC?

ebon citrus
#

damn

#

will have to use audible signals, then

#

during daytime

#

I'll just add a sound-signal to the light changing and that should do the trick

winter rose
#

you can do an ambient light, but no flare right now yep

ebon citrus
#

elaborate

#

setambient doesnt seem to work during day either

#

setLightAmbient*

winter rose
#

see the tuto (setLightColor does work)

ebon citrus
#

Doesnt work for me

winter rose
#

Flare can't be shown in daytime. Dedmen says someone “optimized” it, IIRC?
I believe it was Reyhard

#

Doesnt work for me
@ebon citrus set its strength higher?

ebon citrus
#

1000 not enough=

#

?

winter rose
#

should be

warm hedge
#

Try more higher, like ridiculously high so you can test if it works anyway

ebon citrus
#

brightness to 1 does it

#

intensity does nothing

#

correction, intensity during daytime does nothing

#

cheerios!

vague geode
#

@winter rose Yes, the variable is set global and the VLS is shooting now but for some reason not at the target...

winter rose
#

now that's a different issue than what you listed

The VLS unit is always saying that the target is outside of its firing envelope but it's only supposed to way that when the target is more than 30km away from the target but I tested it on as low as 7km and it still said that.

vague geode
#

Yeah, I tried to fix it myself and it seems like one of the changes "fixed" the first issue but a new one arose...

ionic orchid
#

I'm pretty sure it's not possible via config/script, but is there any way to get particles to ignore FOV when they spawn? they're slightly bigger when you hold RMB to zoom, and stay big when you let go

warm hedge
#

Use drop

ionic orchid
#

and how does that help?

#

does drop do something the particle setups dont?

warm hedge
#

drop does make one particle, with exact size

ionic orchid
#

oof, that'll suck, but I think I can work with that

#

cheers I'll give it a try

robust brook
#

is it possible to pass a private function as a param and use it in a script?

#
private _variableTestString = "TestString";

_hintFunction = {
  params ["_variableTestString"];
  hint format ["Testing... (%1)", _variableTestString];
};

[_variableTestString, _hintFunction] spawn {
  params ["_variableTestString", "_hintFunction"];
  [_variableTestString] call _hintFunction;
};
#

nvm I can lol

fair drum
#

using the method above or did you have extra you figured out? would like to know

winter rose
#

Code is a valid data type

robust brook
#

@fair drum ran exactly that in debug and it worked fine

fair drum
#

Will vehicle respawn or vehicle respawn module work with heli sling crates?

winter rose
#

🐮 Perhaps

still forum
#

@short flame #rules no crossposting, stay in your channel

ornate marsh
#

Ok, so i'm really struggling on finding what's causing the server crash issue on my mission, is it possible for someone to look over the scripts in the mission folder with me. It'd be really helpful to get another set of eyes on it

ornate marsh
#

the server will crash 10+seconds after loading in, and in the crash dump, it says its something about "Unknown module". Seems to be a problem with the mission, it's not a mod issue as i have gone through them all and checked them.

hallow mortar
#

You should transcribe the exact error. It probably mentions which module is unknown.

fluid cairn
#

Okay so I need some help with scripting. I don’t understand how to spawn stuff and how to put in the position of the spawn.

#

Like imagine I want an AI plane flyby, so I would spawn the plane, and give a waypoint to said plane and then delete the plane after reaching the WP

#

Or something like having a few members of a squad create their own group and then generate a waypoint for that new group

winter rose
#

createUnit/createVehicle?

#
  • addWaypoint/deleteVehicleCrew/deleteVehicle
fluid cairn
#

Okay but what about setting the location of that spawn

#

Or would it default spawn on the trigger?

winter rose
#

you have to define the position yes
there is no "automatic position" besides default [0,0,0] when there is an error somewhere

#

there are getPos* (getPos/getPosATL/getPosASL etc) commands

fluid cairn
#

And the trigger has its x, y, z in attributes so I could just plug that in

#

To the script

winter rose
#

if you want to, yes
or getPosATL theTrigger (if you named it)

fluid cairn
#

Would it look something like “createVehicle “classname” [X,Y,Z]”

winter rose
#

nah 😉

fluid cairn
#

Awesome

winter rose
#

I know 😎

fluid cairn
#

I had a problem with this script

#

I used it just like it says, but it wouldn’t play subsequent animations so I could only play 1

#

Also “sleep” never has worked whatsoever

winter rose
#

not in init fields or triggers yeah

#

you should enable the -showScriptErrors flag (or Launcher option) to see script issues

ebon citrus
#

Im putting this shower thought up here just for questions.

Im building up a lazer-tag system for a unit that reguested it, and i thought i could make it work a little smarter. In the config, Uniforms are basically vehicles, right? So would it be possible to add an init event script to a uniform, that gets run every time that uniform is initilialized (created) by a unit putting that uniform on?

Without testing i am unsure if this is how Arma 3 works internally, so could someone who has experience say?

#

Tldr, is the init eventscript of a uniform in cfgvehicles executed every time the uniform is switched to by a unit

young current
#

My gut feeling is that uniform init is not run when it is put on

#

Only when a character is in fact created

winter rose
ebon citrus
#

Fair enough. Thanks for the headsup

#

Any eventhandler i could hook into for switching uniforms?

#

Actually never mind, i dont even need that

mortal nacelle
#

How would I get all vehicle classnames so that I can insert them into a listbox?

warm hedge
#

configClasses

mortal nacelle
#

I use the example but it doesn't return anything?

warm hedge
#

Which?

mortal nacelle
#

_configs = "true" configClasses (configFile >> "CfgVehicles");

warm hedge
#

And how?

#

It should return all CfgVehicles entries

mortal nacelle
#

It says the return value is an array right, so I should use forEach when trying to add each array element to my lb? Such as lbAdd[1500, _x]

exotic flax
#

but it returns objects, not classnames

warm hedge
#

*classes

#

AKA configs

mortal nacelle
#

OH, so how would I be able to return the classnames?

warm hedge
#

configName

exotic flax
#

either do

_configs = ("true" configClasses (configFile >> "CfgVehicles")) apply {configName _x};

or replace your lbAdd[1500, _x] with lbAdd[1500, configName _x]

mortal nacelle
#

Ah I see, thank you, but I didn't think this is what it would return. I think what I meant to say was I am trying to get all LandVehicle classnames

winter rose
#

use the filter option ("true")

warm hedge
#
"configName _x isKindOf 'LandVehicle'" configClasses (configFile >> "CfgVehicles")```
mortal nacelle
#

Got it now thanks, also got the vehicle to spawn correctly using the listbox which is nice. Problem I have is, it lists literally every classname, is there a way to only filter through vehicles you can spawn? E.g., some of the vehicles in this list do not spawn

winter rose
#

scope = 2 should mean "public objects"

#
"configName _x isKindOf 'LandVehicle'" configClasses (configFile >> "CfgVehicles")
// ↓↓↓
"configName _x isKindOf 'LandVehicle' && getNumber (_x >> 'scope') == 2" configClasses (configFile >> "CfgVehicles")
``` @mortal nacelle
mortal nacelle
#

Perfect, thank you

rain dirge
#

Trying to pull the mission summary from the server so that it can be displayed by a player in a GUI. Any ideas if there is an easier way of going about this?

{"Multiplayer" get3DENMissionAttribute "IntelOverviewText"} remoteExec ["bis_fnc_call",2];
#

The above doesn't work just fyi.

copper raven
#

get the server to call a callback function

#

client > server > client > display the result

rain dirge
#

Okay I am not 100% sure how to go about doing that.....

winter rose
#

can't you get the info from the local mission?

rain dirge
#

The information has to be available as it's in the mission pbo somewhere, but I haven't found an easy way to get access to it. The only way in my testing that it works is if the server is the one seeking that information.

winter rose
#

Client doesn't have that info, weird

rain dirge
#

If it does then I haven't been able to find out how to get it.

winter rose
#

@rain dirge what does ```sqf
"Multiplayer" get3DENMissionAttribute "IntelOverviewText"

nvm
#

from get3DENMissionAttribute page,

Attributes are available only within the Eden Editor workspace. You cannot access them in scenario preview or exported scenario!

#

try the following?```sqf
private _overviewText = getText (missionConfigFile >> "overviewText");

rain dirge
#

Okay if it is defined in the Mission Attributes in the Editor rather than in the Description.ext?

copper needle
#

Could I use addAction like this:player addAction ["Exec the file", "scriptFile.sqf"] but instead of executing a file it executes a function?

winter rose
#

more or less

player addAction ["Exec the file", { [] call BIS_fnc_myFunction }];
#

@rain dirge IDK
if you have access to it, you could include mission.sqm inside description.ext so you can read the attribute

#

@copper needle ↑ two posts above ↑

rain dirge
#

Interesting. I am trying to not have to change how a mission is created drastically, as we already have a mission making framework. It is odd to me that something that is available to the server when you select the the mission, wouldn't be available when actually in the mission.

winter rose
#

yep, I know of briefingName but I don't remember a command for the overview text

copper needle
#

@winter rose Im trying to add that to the init of an object but it just comes back with the function being undefined. Any ideas?

winter rose
#

what exactly did you put?

#

(because obviously, BIS_fnc_myFunction doesn't exist.)

copper needle
#

The name of the function I'm trying to call (Function is defined in an sqf file in the mission folder). I didn't expect it to work since I haven't "told" the script where it is. My question really is how to make the script find it

#

Shouldve been more specific sorry about that

winter rose
#

define it in CfgFunctions, otherwise the init order is incorrect / not guaranteed

#

(or don't use init fields - at all)

#

@copper needle ↑

copper needle
#

Alright will do

#

I appreciate it

ionic orchid
#

I talked yesterday about a particle graphical issue I'm having, and it was suggested that I try drop instead
It still happens with that, so here's a repro if anyone is interested
Zoom in/out or run around the effect - it breaks sooner if your particles quality is on low

[] spawn {
    private _spawnOffset = [[0, 20, 3], -(getDir player)] call BIS_fnc_rotateVector2D;
    private _spawnPosition = (getPosASL player) vectorAdd _spawnOffset;
    private _obj = "#particlesource" createVehicleLocal (ASLToAGL _spawnPosition);

    for "_i" from 0 to 200 do {
        drop [
            [
                "\A3\data_f\ParticleEffects\Universal\Universal",
                16, 15, 1, 0
            ],
            "", "Billboard",
            1, 3,
            [0, 0, 0], [0, 0, 0],
            0, 1.0, 0.8, 0.0,
            [10],
            [
                [0, 0, 0, 0],
                [0, 0, 0, 0.124],
                [0, 0, 0, 0.0186],
                [0, 0, 0, 0]
            ],
            [1000],
            0.0, 0.0,
            "", "", _obj
        ];
        sleep 0.02;
    };

    deleteVehicle _obj;
};
winter rose
#

indeed - therefore it should be considered as engine limitation/system (you can search/make a ticket in the FT if you feel like it)

ionic orchid
#

I can't imagine it'll get fixed (most particle effects are shortlived and not persistent anyway) but I can give it a go

#

cheers

fluid cairn
#

Spearhead sideChat "We have encountered an enemy unit occupying the bridge, Continuing on foot to objective to avoid alert. Over.";
Why is this not working i keep getting errors

winter rose
#

errors such as…?

fluid cairn
#

error generic error in expression

#

when i activate the trigger

winter rose
#

that's all the code there is?

fluid cairn
#

'call {spearhead |#|sidechat "We have encountered an enemy u...'
Error Generic error in expression

winter rose
#

the whole code please, in ```sqf

fluid cairn
#

how do i get my sqf from the mission

exotic flax
#

The same way you put it in 🤔

winter rose
#

I mean, put your code in the channel here; the error most likely doesn't come from sideChat

fluid cairn
#

I used the eden editor to create my mission i never had to or have before put in a sqf or anything

winter rose
#

the code, in the trigger, you did put it there, right?

fluid cairn
#

Spearhead sideChat "We have encountered an enemy unit occupying the bridge, Continuing on foot to objective to avoid alert. Over."; is all i put in my trigger

winter rose
#

is spearhead defined?

fluid cairn
#

It's the variable name of the player

winter rose
#

then IDK, armagic

harsh vine
#

lou what type of missions do u normally make??

winter rose
#

coop for small group, why?

harsh vine
#

you seem very knowledgeable with arma 3 scripting so thought u would make some advanced missions😁

winter rose
#

well thanks, my latest seems to have some minor success
I mostly like proof of concepts, like "could I do that thing?" "yes, it works" "ok, that's it"

harsh vine
#

" could I do that thing?" yeah me too even tho i have zero clue about scripting i still like it ... or maybe i just like slamming my head on the desk.🙈

mortal nacelle
#

Question, why is vehicle player returning this C Alpha 1-1:1 (MSG Williams) and not the vehicle i am inside of?

still forum
#

looks like its returning the vehicle

#

that's just the vehicles name, it takes your name

mortal nacelle
#

oh

#

is there a way to get the vehicles classname from the vehicle the player is sitting in?

winter rose
#

typeOf vehicle player yes @mortal nacelle

mortal nacelle
#

ah, thank you!

fluid cairn
#

how can i force flashlights to be on for AI

harsh vine
#
bob addPrimaryWeaponItem "acc_flashlight";  
bob  enableGunLights "forceon";
wet shadow
#

Does anyone know if there is a quick way to check if a player is currently using the curator camera (as opposed to if he is assigned as a curator)?

winter rose
#

locally yes, but not from a remote machine

#

(afaik)

wet shadow
#

Even a local check would work in this instance

fluid cairn
#

Does the game consider items dead once in player inventory

#

Like a rocket launcher

#

When you pick it up into your inventory the game will consider it dead

#

So a task to pick up a rocket launcher I can use !alive

warm hedge
#

Excuse me?

copper needle
#

Is there a way to split arrays? For instance: ```sqf
_array = [1,2,3,4,5,6,7,8,9];

//Turns Into
_array1 = [1,2,3];
_array2 = [4,5,6];
_array3 = [7,8,9];

warm hedge
#

I don't think there's a command or function to do it. Maybe make your own way

copper needle
#

Alright thanks

slim oyster
#

_array1 = _array select [0, 2];

warm hedge
#

Ah, that actually is an idea

tough abyss
#

Is there a way to keep the varname of an object after picking it up?

#

because as far as i can tell it gets reset when an object is picked up

winter rose
#

"picked up" = object holder being deleted, sooo not really

#

everything is an illusion 👀

tough abyss
#

damn really do be like that sometimes

winter rose
#

you can always use "Take" and "Put" EH? @tough abyss

tough abyss
#

Take to give it the varname again?

ebon citrus
#

items are not real objects

#

so what do you mean by "object" being "picked up"?

#

some sort of script to move objects?

winter rose
#

the spoon doesn't exist

ebon citrus
#

or dismantling a tripod mount?

#

dismantling a UAV?

tough abyss
#

finding a girlfriend?

ebon citrus
#

Hotel?

tough abyss
#

Unfunny.

ebon citrus
#

fair enough

tough abyss
#

but no something being put into your inventory

ebon citrus
#

yeah no

#

You'll have to handle that yourself

#

also, take eh has formidable suction

winter rose
#

title of your sextape, both

tough abyss
#

👀

winter rose
#

@tough abyss let's start over: what do you want to do?

ebon citrus
#

yes

tough abyss
#

find a job

winter rose
#

in Arma

ebon citrus
#

youre in the wrong discord, then

tough abyss
#

find where the editor button is

winter rose
#

you can only lose your job (and your soul) here 😄

tough abyss
#

but no

#

I want to keep the variable name of an item

#

when being put into a player's inventory

ebon citrus
#

items dont have variable names

#

you see, when an item is on the floor, it is actually inside a container, usually called a weaponholder

#

or ground weapon holder

winter rose
#

no, what do you want to do - not how

tough abyss
#

its fine

#

I was just curious about something @winter rose 😄

ebon citrus
#

Items also stack in these containers

#

so it gets really complicated to track individual items

#

if your item is a weapon... Give it a special attachment that cant be removed, i guess

#

if it's some mission-related MacGuffin, then just make a custom item

#

or do it like i did and make your own item scripts that puts every item in their own weapon holder and then realize it has formidable suction and just bend to arma's will

tough abyss
#

really do be like that sometimes

ebon citrus
#

whatever youre probably doing doesnt need to be made in such a complicated way

#

like the scripting guide says: Is your idea necessary?

winter rose
#

it has formidable suction
perf killer?

ebon citrus
#

If used caringly, not really. The issue was tracking down and dealing with all the different edge-cases

pliant stream
#

where is this misconception of objects having "variable names" coming from? i keep seeing it over and over

winter rose
#

"objects" as in vehicles and all can have a variable
items to be picked up, no

I believe it is a mix of those two (and from an external point of view, it sounds "stupid" that one can and one cannot)
this is also enhanced by the fact you can put a e.g uniform "object" in Eden, and put a variable on it (actually, on the object holder)

pliant stream
#

put a variable on it
what, like _object setVariable ["my_v", 42]; ?

winter rose
#

no, like Eden object name

or myUniform = cursorObject;

#

"name" it, in a way

pliant stream
#

oh, i don't know what an eden object name is...

#

myUniform = cursorObject;
this is storing a weak reference to an object in the variable myUniform

#

thinking of it as naming an object is just... wrong...

winter rose
#

when you double-click on something, there is a field that allows you to "name" an object by setting a global variable pointing to it

#

e.gsqf LOU_thePlayer = playeris "naming" the player

#

(note the quotes)

pliant stream
#

i see. that must be new in A3 i suppose. but it's still just storing a reference in a variable
thinking of it as naming an object seems backwards and detrimental to understanding how it actually works

winter rose
#

well it's declaring its variable, sooo yeah, it's useful
and it was present, even in OFP

ebon citrus
#

It's good for certain things

#

i use it most for debugging or static objects or holders

#

but if im writing code for dynamic objects, "name"s are a no go

pliant stream
#

the point is the idea of an object "having a variable" rather than a variable containing a reference to an object

winter rose
#

yeah well, that's a dev POV of course
from a player that creates missions, it's "giving a name to an object" (even though that object can have multiple variables pointing to its instance, yadda yadda)

ebon citrus
#

the "name" makes it easy to reference the object throughout the mission in a more efficient way

pliant stream
#

the mechanics of it are the same, the difference is in conceptualisation

winter rose
#

sure, of course

ebon citrus
#

remember, the best carpenter doesnt use one tool religiously, but all tools efficiently

winter rose
#

but the original issue was "can we reference an inventory item by a variable"
and the answer is no

ebon citrus
#

@pliant stream yes, but this is the best and most efficient way to access editor created objects from script

#

you dont have to know what that object is

#

you dont have to know where it is

#

you dont even have to know if it is

pliant stream
#

as i said, the mechanics of it are exactly the same however you conceptualise it.

#

(object, string) should do for referring to an item

ebon citrus
#

exactly the same as what?

pliant stream
#

you have a variable containing a reference to an object
thinking of it as the object "having a name" doesn't change how it works

ebon citrus
#

no...

#

it's a variable with a reference to the object

winter rose
#

I believe we are strongly into the domain of cerebral masturbation now
back to the issue - cannot reference an inventory item with a variable.

ebon citrus
#

it's exactly that

#

inventory item*

pliant stream
#

cannot reference an inventory item with a variable
you could probably make it work

ebon citrus
#

the best way i explain it to people is that "items are not persistent"

#

when an item is moved to another inventory, the original item is deleted and a new item is created in the target inventory

#

it wouldn't be entirely impossible to add "names" to items

#

or some extra data

#

i havent looked into this too much, though

#

it would probably require engine side changes

#

or completely rewriting the inventory or adding to it

#

if you want to do it in script^

pliant stream
#

a2 weapons are not objects, magazines are. in a3 both should be objects

winter rose
#

the main issue being

  • same magazines with different ammo
  • same items added - which is the removed one, A or B?
ebon citrus
#

it's not a problem

#

2 identical items with 2 different names

pliant stream
#

same magazines with different ammo
store the ammo too
same items added - which is the removed one, A or B
does it make a difference?

ebon citrus
#

add names to a list

#

when you pick up an item, add one of the names to it

#

also, magazines are not objects

#

magazines are magazines

pliant stream
#

sure they are objects

#

they're not entities though, i think

ebon citrus
winter rose
#

code objects, not Arma objects

ebon citrus
#

kinda wouldve helped if the context was made known

#

since we were talking about arma objects

#

anyways, couldve, wouldve, shouldve not

#

arma 3 doesnt need this ability

strong compass
#

you know when you have a rebreather and a wetsuit under water, a mask is placed over the units face, is that possible to script on a unit when they are not in the water?

winter rose
#

not these ones

strong compass
#

ah ok, thanks

warm hedge
#

You need to make some config if you want

ripe sapphire
#

Theres a mod for it if you want it the easy way

strong compass
#

yea i think i found the mod

#

some thing like advanced diving environment

wet shadow
#

Does anyone know if there is a quick way to check if a player is currently using the curator camera (as opposed to if he is assigned as a curator)?

locally yes, but not from a remote machine
(afaik)
@winter rose

Care to elaborate? I guess in extremis one could look into putting something into the 'onload' of RscDisplayCurator and then use that to detect if curator view was activated. AFAIK this will mess up some of the more popular Zeus mods out there so its not ideal.

winter rose
#

I thought of something with remoteControl or cameraOn, compare this with player (and think of a case with UAVs)

ripe sapphire
#

Use CuratorObjectRegistered EH?

winter rose