#arma3_scripting

1 messages · Page 431 of 1

queen cargo
#

uhm ... wut?

#

would run it through my sqf-vm but i lack some commands to execute it currently

#

and i have zero idea what exactly youre talking about that something is not working in parallel blablub

tough abyss
#

the code is working on each group in series (one after the other) instead of parellel (all at the same time)

queen cargo
#

uhm ... redesign it so that the marker part is not in the foreach loop?

tough abyss
#

doing a call to function now instead

queen cargo
#

instead use pushBack to push the groupleaders to some array

#

and iterate over that after the foreach

#

or avoid foreach completly in first place by using ARRAY select CODE from the very begining

still forum
#

Eh...

#

For one your _handle variable is bullshit.
Second.. use spawn. That's anyway where you got your _handle variable name from

misty trail
#

I am playing as a CIV is there a way to get all EAST to shoot CIVs Just like they are WEST ?

little eagle
broken forge
#

hey, is there a way to have items created from a script inserted into a container created from another script. (e.g. you build a base spawning a container, you can but sand bags which go into said container by the flag which was also spawned upon making the base)

still forum
#

Yes.

#

put the container into a global variable. And then use that in the script that adds the items

broken forge
#

okay, so : "Box" addItem "edn_sandbag"; ? where box is the global variable

still forum
#

Box without the quotes. Otherwise it's a string. Not a variable

broken forge
#

okay

still forum
#

And addItemCargo/addItemCargoGlobal

broken forge
#

ty

#

it says there is an undefined variable? HQBox addItemCargoGlobal "edn_sandbag";

still forum
#

Well..
put the container into a global variable

broken forge
#

ah got it now, i also had to use square brackets (Box addItemCargo ["edn_sandbag",1];)

#

also, will i be able to spawn a group of units at a random position from a certain distance away on the ground with a waypoint set to a position which they will move to?

subtle ore
#

Uhhh...no you didn't have to add brackets. Where is this being executed at? Yes you can spawn a group of units at a random position from a certain distance away on the ground with a waypoint set to a position they will move to

broken forge
#
  1. it just didn't work without the square brackets, but when i put them in it did work
  2. s there a function that i can use (or group of functions) to do it?
subtle ore
#

Where are you executing this? Because it does matter

#

Init fields have to return nothing

broken forge
#

'''if (nails >= 0)
then {
hint "Sandbag Purchased!(It can be found in the crate.)";
nails = nails - 0;
"edn_sandbag" createVehicle getpos player;
Box addItemCargo ["edn_sandbag",1];
}else{
hint "You need more nails!";
};
//Box setVariable ["HQBox","HQBox",true];'''

subtle ore
#

W H E R E

lone glade
#

`

mycode

`

#

which gives you:

mycode
broken forge
#

aha

indigo snow
#

so you never told the game what the variable Box is

#

oh wait instead you just cretaed a sandbag at the player position?

subtle ore
#

Or, created at player pos then added it to the box??

#

So there is a sandbag created regardless on the ground?

indigo snow
#

im also doubting both the item and vehicle classname are identical

fringe yoke
#

is anyone able to help me out, I'm getting an error that I just can't figure out.

{
  [_x, _faction] call FUNC(loadout);
  [_x] call FUNC(earplugs);
} forEach allUnits;

I get missing ; on line 2

cedar kindle
#

missing include for the macros?

fringe yoke
#

🤦 thank you

astral tendon
#
random [0,5,10]  >= 5

Is this give me a 50% of chance of being true or false?

neon snow
#

OK, so I 've been trying to think how to do this for long time now and I came up with nothing. I need to translate global position of vehicle to simple screen(defined in class MFD but that is not important). Is there a way, to somehow convert X and Y of each vehicle, in relation to my position AND direction? I also need to have output of two values x and y so I can use it in class mfd to draw geometries. Basicly, I need to get a top down view of surrounding vehicle, in relation to my position and direction, so for example if a vehicle is directly in front of me, the output X would be 0 and Y the distance from me? Picture for reference: https://imgur.com/4CC5rWB

errant jasper
#

@astral tendon Yes... But only if second number is exactly the average of the min and max, and what you are comparing against is also that number, which happens to be in your case. So for example: random [0, 5, 10] >= 7 would not be true 30% of the time, but if you do random 10 >= 7 it would be 30% of the time, although I prefer writing it like 30 < random 100.

astral tendon
#

Thanks

#

im using the Alternative Syntax, is there other way i can put the special like the CAN_COLLIDE?

warped thicket
#

no, you should use the first syntax

#

you an set skill using other commands, and init is just more code anyways

astral tendon
#

thats my problem, i need that init.

warped thicket
#

what for?

#

you are using an SQF command, so you are using SQF, just create the unit using normal syntax, which returns the created unit object, then do what you want on that

strange urchin
#

You could literally just execute your code immediately after spawning it

finite jackal
#

Anyone know if a animate ["HideX", 1]; exists to hide the rear covering of the Hunter?

meager heart
#

@finite jackal

hallow spear
#

is it possible to spawn the large ghost hotel complex? I see the smaller pieces. want that huge one on altis

cedar kindle
#

yes but you have to LEGO it together

still forum
#

Box setVariable ["HQBox","HQBox",true];
👏

river meteor
#

Am I able to change a dialog after using cutRsc to create it? Trying to lbAdd to a listBox and it's not having any effect

hallow spear
#

@cedar kindle , I'll gladly lego it together if you have a place to get classnames or more info

little eagle
#

@river meteor Give that dialog some init script and store the DISPLAY in a uiNamespace variable. The init script will be executed immediately after the cutRsc command in your original script before it resumes, which means that you can fetch the DISPLAY in the next line from the uiNamespace.

cedar kindle
#
    Ghost Hotel (Gazebo, Ruin)  Land_GH_Gazebo_ruins_F
Ghost Hotel (Gazebo)    Land_GH_Gazebo_F
Ghost Hotel (House, Ruin)   Land_GH_House_ruins_F
Ghost Hotel (House)     Land_GH_House_1_F
Ghost Hotel (Bungalow)  Land_GH_House_2_F
Ghost Hotel (Platform)  Land_GH_Platform_F
Ghost Hotel (Pool)  Land_GH_Pool_F
Ghost Hotel (Stairs)    Land_GH_Stairs_F 
#

@hallow spear

river meteor
#

@little eagle Right now I'm just storing the dialog in a global variable, I imagine it's a similar effect? Overall what I'm trying to do is to remake the arma 3 action menu. Is cutRsc the wrong command to use to display a dialog that needs to be interacted with while open?

little eagle
#

The effect is the same, but the game complains about if you store a display inside a mission namespace variable. Therefore you should probably use a ui namespace variable.

#

Is cutRsc the wrong command to use to display a dialog that needs to be interacted with while open?

#

You don't have a cursor if you use cutRsc, because your display will be created as a subdisplay of the mission display.

#

But you need a dialog for a cursor, so createDialog.

river meteor
#

I don't intend to have a cursor. I'm trying to emulate the arma 3 action menu and basically just make it look nicer. I was going to use event handlers and selection commands to do the selection and "clicking" of an action item

little eagle
#

Don't know what you mean by "interacted with" then.

#

You can easily add e.g. scroll wheel eventhandlers to the mission display and modify your display that way. If that is what you mean.

river meteor
#

Yes that is what I mean. I just don't know why my lbAdd isn't showing up even though when I hint lbSize it's reporting an extra element as if it was correct

#

I seriously doubt it's something to do with my display being bad like text size too small or something similar to that

little eagle
#

I've never seen listboxes used in displays that are not dialogs. It might not work.

#

You're supposed to click on them with the mouse cursor.

river meteor
#

Do you have a control in mind that would fit for what I'm trying to do?

little eagle
#

Multiline rsc text.

#

Or multiple rsc text.

#

Maybe structured text multiline.

#

I think they all are multiline, so just RscStructuredText.

#

That way you can easily highlight the selected item. And do interesting stuff like different colored text and fonts.

river meteor
#

I'll try a different control, thanks for the advice.

fossil yew
#

So you want to create a "game mode" that could be portable to different maps but you don't want code to repeat (naturally). What do you do? Put all the common code in a mod? Trouble is, the code is not meaningful outside context of the mission(s) and not very useful as mod for anything else.

#

Can this be structured some other way?

little eagle
#

Put all your files into a folder. Then to include your scripts into a different mission you only have to edit the description.ext, mainly CfgFunctions.

peak plover
#

There was talk about playing positional sound global once, so playSound3D is good right?

unborn ether
#

Can anybody tell what each of the elements stands for in

getUnitLoadout player select 8 // ["Rangefinder","","","",[],[],""]

Thanks.

little oxide
still forum
#

//Weapon Binocular (follows same layout as other weapons above) Not very conclusive..
Binocular classname, muzzle,side,top,loaded magazine, loaded secondary magazine, bipod
yes. Attachments and magazines for a binocular.

unborn ether
#

thanks

peak plover
#

How does distance work

still forum
#

distance where the sound is audible :D
It's the fade distance.

#

I guess that doesn't help you much. And I have nooo Idea.

#

Oh wait

#

pVolumeCurve
default curve that conforms to the inverse square law, such that when distance is between 0.0f and CurveDistanceScaler × 1.0f, no attenuation is applied. When distance is greater than CurveDistanceScaler × 1.0f, the amplification factor is (CurveDistanceScaler × 1.0f)/distance. At a distance of CurveDistanceScaler × 2.0f, the sound will be at half volume or -6 dB, at a distance of CurveDistanceScaler × 4.0f, the sound will be at one quarter volume or -12 dB, and so on.
There.

#

CurveDistanceScaler == distance

#

So from center out to distance you will have 100% volume.
At 2*distance you have 50%. At 4*distance you'll have 25%

meager heart
#

afaik with playSound3D sound volume start to fade out at about ~ 50 meters from source, even if set to no max distance

#

not sure about exact "range"

little oxide
#

Already played sound more than 50 m with playSound3D

meager heart
#

you will hear it, i said volume will drop at that distance

peak plover
#

Hmm thanks

tough abyss
#

Server spawned objects are out of place for the first 300 seconds or so until the server is synced with the clients, then everything snaps into place for the clients. Is there any way to force a synchronization immediately? (May be the same reason serverTime isn't synced for the first 300 seconds)

still forum
#

300 seconds? vehicles and stuff in the mission file are also server spawned but they are synced right at missionstart.
What does "out of place" mean?

tough abyss
#

Let me grab a screenshot.

meager heart
#

flying objects i guess 😀

tough abyss
#

The positions can be slightly off (within 2m) and the rotation is almost always off.

#

Then immediately, it snaps into place around 250-300 seconds

#

Can get better screens in a few

meager heart
queen cargo
#

i would guess that those are still pending

tough abyss
#

Also, there's a spawned aircraft carrier that is missing parts of it's hull for the same time period. Anyone that teleports there falls into the water

#

Can it be forced out of pending @queen cargo?

queen cargo
#

it was a wild guess of mine
only way i could think of would be modifying the server network config

#

so that it updates faster

tough abyss
#

@still forum all these objects are placed server side via script, not via sqm

strange urchin
#

Yeah, the server I’m from has that issue too

#

Sometimes it works, sometimes it doesn’t

#

Maybe I should do a setpos or something

tough abyss
#

They always snap into place after the clients and server syncs (post 300 seconds) so that's not the issue.

strange urchin
#

Yes. I know. Same thing happens here

#

Very annoying when trying to line up multiple walls

tough abyss
#

https://community.bistudio.com/wiki/serverTime

NOTE: serverTime is available to both server and clients and shows the same value when synced. The only time it is not synced is on the server, right after server restart and only for the first 300 seconds. Client side serverTime is synced from the start.```
strange urchin
#

Try doing a setpos to the objects current position immediately after placement

tough abyss
#

That's what is happening. @strange urchin

strange urchin
#

Hm.

still forum
#

Were does that 300 seconds number come from? Exactly 300 seconds everytime?

tough abyss
#

No. Usually around 200 - 300 seconds.

strange urchin
#

I wonder if doing something with simulation would help

tough abyss
#

They all have disabled simulation

strange urchin
#

That might do it

tough abyss
#
private _bluBase = createVehicle ["Land_MetalShelter_02_F", [_respawnPos select 0, _respawnPos select 1, 0], [], 0, "none"];
_bluBase setDir (_respawnPos select 2);
_bluBase setVectorUp [0, 0, 0];
_bluBase enableSimulation false; _bluBase allowDamage false;

This is the order of things.

still forum
#

scheduled or unscheduled?

#

Probably not relevant I guess.

#

Maybe you should leave simulation enabled. That way it might update it's position more often

#

Only disable it later on if you want to save performance.
Or make it simpleObject right away?

tough abyss
#

Perfect gif showing what happens

#

Unscheduled

still forum
#

What happens if you enable simulation. Do they sync faster if you do that?

tough abyss
#

Haven't tried yet.

#

Testing now

#

So they did update position much faster.

meager heart
#

also maybe this can help BIS_fnc_replaceWithSimpleObject

neon snow
#

Why does banking the aircraft affect getreldir? Is there a way to get a relative direction without affection from banking?

tough abyss
#

Will test with that as well, thanks sldt1ck

#

@meager heart It also has this on the page which isn't good: Use with caution as this technique is not very clean - should not be used for many objects and definitely not in MP games. I am breaking all those rules

still forum
#

replaceWithSimpleObject is a bad choice anyway

#

as you could just directly spawn the simple object.

tough abyss
#

Correct

strange urchin
#

@neon snow
getRelDir probably checks the relative direction as it is using only the object's model as a reference, rather than the world
I would try calculating relative direction by taking the first object's direction, then taking the direction from the first object to the second and subtracting the two numbers.

#

It's nice to know that that's how they do it, though. I'd imagine that it would be useful to have it the way it is for some people.

lone glade
#

use the alternative syntax of getDir and be done with it.

strange urchin
#

Yeah, you’d need that for the second part

neon snow
#

ok will use it, Just question, why that doesnt work?
_dir = player getDir q1; hint str _dir Tried it in local exec ingame

#

No error, nothing

#

nvm, I am stupid.

strange urchin
#

Were you still in the pause menu lol

neon snow
#

No, the tank name wasnt q1 but q1w xd

fleet wind
#

This command hides the bumper for the offroad Offroad animate ["HideBumper1", 1] What would i then use to show it again? (Cant find anything on the wiki) tried Offroad animate ["ShowBumper1", 1]

subtle ore
#

@fleet wind Second arg number is which state it should be in. So

offroad animate["ShowBumper1",1];
//hidden ?
offroad animate["ShowBumper1",0];
//show?
fleet wind
#

Nope dosent seem to work

subtle ore
#

Not sure what you're doing because that indeed does change state

fleet wind
#

Might have messed something els up sorry for the inconvinience

#

Works now

strange urchin
#

Anyone know how well animateSource works when doing it multiple times on the same thing? Does the previous command get overridden properly?

nocturne basalt
#

can you describe what you're trying to do?

#

do you mean activating multiple animations on the same object at the same time? that should work fine

#

you can also make one animationSource start a sequence of animations one after the other

subtle ore
#

0 -> 1
1 -> 0
The state doesn't just magically reset after setting the phase

#

you can return the phase with (animationPhase) given the name and object you're animating

nocturne basalt
#

if usings scripts you can use waitUntil to activate a new animation after the other too

subtle ore
#

Sure.

nocturne basalt
#

waitUntil { _v animationSourcePhase "animation1" == 1 };

subtle ore
#

Yeah that works. Still not 100% sure what the original question was

nocturne basalt
#

me neighter xD

strange urchin
#

I want to know if I can constantly animate a source to track an object without making it instantly snap to the target.

subtle ore
#

to track an object without making it istantly snap to the target? What do you mean?

strange urchin
#

Just as it sounds

subtle ore
#

What does that have to do with animating a object?

strange urchin
#

Animating a turret

subtle ore
#

Hmmm, well you're going to want to define in what angle of the turret in relation to the phase of the animation

strange urchin
#

I am aware

nocturne basalt
#

you dont want the animation to be instant you mean? just set animPeriod = x seconds

strange urchin
#

I know

subtle ore
#

IE: 90 = 0.5 , etc

strange urchin
#

But this is a moving target

#

And I’d have to constantly adjust the animation

#

For it to track

nocturne basalt
#

I'm sorry I dont follow

strange urchin
#

Will spamming animationSource cause any problems?

nocturne basalt
#

yesover the network

#

you will flood the network

#

causing desync

#

but you can go around it animating a local object

#

can you try to explain exactly what it is you're trying to do?

strange urchin
#

The turret will be a global object that is local to the machine running the script, which is the server

#

Basically, I am dissatisfied with the lookAt command or whatever. Trying to make a C-RAM work better

subtle ore
#

Okay...and you want it to fire at a object?

strange urchin
#

Yes

subtle ore
#

fireAt ?

strange urchin
#

No

#

That produces the same result

#

The CRAM overaims

subtle ore
#

What result do you not agree with?

strange urchin
#

And readjusts

subtle ore
#

Alright.. so you want it to be looking directly at the object without fail

strange urchin
#

Which is a problem when trying to target a high speed projectile

lone glade
#

you want an aimbot for CRAMs ?

strange urchin
#

Not aimbot. I just want it to be less floaty

lone glade
#

increase their precision skill

#

increasing their skill is the easiest and fastest way to fix your issue.

strange urchin
#

I don’t think that effects their overaiming

lone glade
#

it does.

subtle ore
#

Yes it does

strange urchin
#

Really? How much does it affect them?

lone glade
#

increase aiming to 1 and aimingshake to 0

#

they'll be laser accurate

strange urchin
#

I’m not worried about accuracy

#

But I’ll see if it makes them stop passing by the target and doing a sort of double take

subtle ore
#

Yes you are. That's exactly your "floaty" ness you are talking about

strange urchin
#

Never knew an AI’s ability to control weapon inertia of a vehicle turret was tied to their skill

summer kindle
#

is there a difference in deploying new content on vbs or arma3? i have a vehicle that works in vbs but if i try to launch it in amra 3 i get the error data file too short

still forum
#

Yes..

#

VBS and Arma are different games

river meteor
#

Anyone know where I can find information on a CT_CONTROLS_TABLE? Wiki doesn't have a page for it

verbal otter
#

hello, i'm set event handler on vehicle in client script, but when this player offline - eventHandler not working. But when try bring EH to server side - is not working.

still forum
#

When a player is offline.. How should the eventhandler work

#

if there is no one to execute the code how should it be executed

nocturne basalt
#

hi guys. Im trying to play a scriptet sound inside a vehicle only. I dont want to hear it outside, even when turned out. Can someone help me?

subtle ore
#

playSound has local effects, have you tried that?

#

Or is that not what you want?

nocturne basalt
#

but can I hear it in 3rd person then?

#

or from other vehicles around me?

#

I can try playSound. if it keeps me from hearing others that'll work

#

one more thing

#

Are there any real difference between these two approaches on playing a sound over the network?

[_v, "sound"] remoteExec ["say3D", 0, true];

playSound3D ["WHwalkers\sentinel\sounds\sound.ogg", _v];

if so, which one is better?

peak plover
#

I use playSound3D

subtle ore
#

does playSound3D have local effects too?

peak plover
#

I don't think so

nocturne basalt
#

playSound3d cant be used on sound classes can it? must it use the pathtoFile?

subtle ore
#

Afaik it must be full path. Not sure if absolute path but yes you cannot use sound classes

cloud thunder
#

Any way to tell if a player's group lead is recognized in group manager /has star symbol in group manager?

#

I can tell if player is group lead but can't discern if its recognized by group manager.

broken forge
#

how do i make an objective a success when the vehicle is entered

meager heart
#

@nocturne basalt

nocturne basalt
#

ok thanks

wary vine
#

Just a quick query,

    _Text = switch (toLower "handgun") do {
      case ("primary weapon"): {([primaryWeapon player] call Life_fnc_fetchcfgDetails) select 1;};
      case ("secondary weapon"): {([secondaryWeapon player] call Life_fnc_fetchcfgDetails) select 1;};
      case ("handgun"): {([handgunWeapon player] call Life_fnc_fetchcfgDetails) select 1;};
      case ("backpack"): {[backpack player] call Life_fnc_fetchcfgDetails) select 1;};
      case ("vest"): {([vest player] call Life_fnc_fetchcfgDetails) select 1;};
      case ("uniform"): {([uniform player] call Life_fnc_fetchcfgDetails) select 1;};
      case default {"test"};
    };
``` anyone know whats up with this ?
#

it was saying missing ;

peak plover
#

@subtle ore mite

wary vine
#

i thought it might have beed the ones 2 in from the end , but it wasnt ,

robust hollow
#

case default {"test"};

#

should just be default {"test"};

wary vine
#

hmm

dusk sage
#

I mean, ignore the error it's giving you

wary vine
#

case default has always worked for me.

dusk sage
#
switch (toLower "handgun")
wary vine
#

i think i found it

#

{[backpack player] call Life_fnc_fetchcfgDetails) select 1;}

#

whats missing xD

#

I think im blind.

#

nope xD

devout niche
#

Quick Question - if i wanted to retreive the name of the unit a player is looking at ( not through a wall ) how would i do so?

wary vine
#

@dusk sage the toLower is to just help with switch case, I have found it case sensitve.

dusk sage
#

toLower "handgun" is "handgun"

wary vine
#

yeah.

dusk sage
#

You're just doing

switch ("handgun")
wary vine
#

but whats being passed in the script is "Handgun"

dusk sage
#

Are you expecting it to mutate into a different string?

wary vine
#

im just using this for testing.

#

so i can run it over and over , till i find the issue.

dusk sage
#

Oh right

#

Like others said, remove the case before default

wary vine
#
    _Text = switch (toLower "Uniform") do {
      case ("primary weapon"): {([primaryWeapon player] call Life_fnc_fetchcfgDetails) select 1};
      case ("secondary weapon"): {([secondaryWeapon player] call Life_fnc_fetchcfgDetails) select 1};
      case ("handgun"): {([handgunWeapon player] call Life_fnc_fetchcfgDetails) select 1);
      case ("backpack"): {([backpack player] call Life_fnc_fetchcfgDetails) select 1};
      case ("vest"): {([vest player] call Life_fnc_fetchcfgDetails) select 1};
      case ("uniform"): {([uniform player] call Life_fnc_fetchcfgDetails) select 1};
      default : {"test"};
    };
``` is still not working
dusk sage
#

Remove the colon after default

wary vine
#

still nothing D

#

xD

dusk sage
#

What does still nothing mean

#

You can't tell me nothing is happening at all

wary vine
#
systemChat format ["%1",_text];
#

underneath.

dusk sage
#
case ("handgun"): {([handgunWeapon player] call Life_fnc_fetchcfgDetails) select 1);
                                                                                                                                                                                            ^^^
#

}

wary vine
#

t , im just blind xD

#

Thanks @dusk sage 😃

#

< itsLeigham btw, from AltisLife Discord 😛

dusk sage
#

👋 😃

wary vine
#

Hows it going 😄

#

lbSetPicture should work on RscCombo , right ?

ornate pawn
#

oes anybody knows the new gunner camera memory points UAV's ?

#

does*

strange urchin
#

Is there any way to use those little sensors boxes? I have a sonar system, and I’d like to do something a little better than just having it sit there in the corner of the screen.

meager heart
#

you need check model cfg... afaik they are different for some models

uavCameraDriverPos = "PiP0_pos";
uavCameraDriverDir = "PiP0_dir";
uavCameraGunnerPos = "laserstart";
uavCameraGunnerDir = "commanderview";

@ornate pawn

strange urchin
#

That stuff is just the PiP for viewing other crewmember perspectives

neon snow
#

Is there a way to add a Active radar event handler?

delicate totem
#

@cloud thunder Check for the variable "BIS_dg_reg" on a group. It's true when when the group is registered, nil when it's not.

#

As long as the group is registered the current leader will have the star.

cloud thunder
#

Sweet, nice one @delicate totem . TY

meager heart
#

That stuff is just the PiP for viewing other crewmember perspectives
༼ つ ͡° ͜ʖ ͡° ༽つ 🏆

strange urchin
#

Yes, I was pointing out how what you were telling me so far was useless to me.

#

Unless you have some better advice than that?

wary vine
#
//fn_addtoListbox.sqf

params ["_control","_text","_data","_picture","_tooltip"];

_control lbadd _text;
_index = ((lbSize _control) - 1);
_control lbSetData [_index,_data];
_control lbSetPicture [_index,_picture];
_control lbSetTooltip [_index,_tooltip];
``` because saving lines xD
strange urchin
#

What?

wary vine
#

Just saving lines xD

#

only a few , but looks a little cleaner

strange urchin
#

addToListBox sounds very generic if you ask me

wary vine
#

Its what it does xD

river meteor
#

I'm trying to create a control table and when I use ctAddRow, the first element of the array is -1 which is an error as it's supposed to be the row index. Anyone have experience with control tables and know why ctAddRow might fail?

river meteor
#

hmm, so I think my issue is related to the following. If I try to create the dialog with createDialog, it can't find the resource. If I use cutRsc then I see dialog on the screen, but I get an error in rpt about error loading control

sinful sky
#

ok I think I'm being stupid here, I'm trying to get one thing to spawn if a another thing doesn't

#

in the condition of presence ive put alive basewall

#

and !alive basewall

#

it doesn't spawn with ether

inner swallow
#

could be an initialisation order issue

sinful sky
#

I was thinking that could be it. just not sure how to fix that

inner swallow
#

probably use a trigger

#

and delete it

sinful sky
#

ah i see

#

that would work. but id have to create a lot to do what i want

inner swallow
#

condition true, on activation: if (!alive basewall) then {deleteVehicle otherThing;};

#

use a script then

#

something like init.sqf

sinful sky
#

tbh, i know its probly simple. but going from the triggers to and sqf confuses be.

#

its not quite the same

#

I mean could i simply put this into a sqf:
if (!alive basewall) then {deleteVehicle otherThing;};
if (!alive basewall2) then {deleteVehicle otherThing2;};

broken forge
#

does anyone know how to set up a random mission event?

sinful sky
#

what kind of event?

broken forge
#

an air drop for example

sinful sky
#

well it has to depend on somthing

broken forge
#

where every 5mins an air drop comes down at a random marker

sinful sky
#

well i that's definatly possible

broken forge
#

what would i do for the random marker thing?

#

and every 5mins

sinful sky
#

I'm rather nooby so id have to work on that myself for a while to figure it out

inner swallow
#

@sinful sky yes to your question

sinful sky
#

well you can have a trigger active evey 5 min no prob

#

ok thanks suiside

#

just have a trigger repetable and active evey5 mins [anybody-not present] or somthing

#

then the bit i don't know about

#

you need to create a list of all the places and pick one. then have it spawn parachute infantry

broken forge
#

ah

#

got it

sinful sky
#

droppoint= [drop1, drop2 drop3] call BIS_fnc_selectRandom;

broken forge
#

ty

sinful sky
#

hmmm

#

i think this would work for moving then AI to that point

#

droppoint1 = droppoint modelToWorld [0,0,200];

paraunit setpos droppoint1;

#

I belive that SHOULD put the AI 200m above the randomly picked spawn point

broken forge
#

ty

#

i shall try it out now

#

have i done this right? ad= "Airdrop" adlocal= "edn_Box_Materials" createVehicle position getmarkerPos ad modelToWorld [0,0,200]; droppoint1 = (getmarkerpos ad) modelToWorld [0,0,200];

#

ignore the droppoint bit for now

#

do i need brackets or something in the second line?

sinful sky
#

after this
droppoint1 = droppoint modelToWorld [0,0,200];
the "droppoint" is already 200m up

#

so you want
createVehicle position getmarkerPos droppoint

#

or whatever you call it

#

i think tbh. all the bits make sence to me but i struggle to put it all together. I'm sure sombody else will point out whats wrong.

#

droppoint1 = (getmarkerpos ad) modelToWorld [0,0,200];
adlocal= "edn_Box_Materials" createVehicle position getmarkerPos droppoint1

#

why the ad = airdrop?

lone glade
#

what do you need help with @sinful sky ,I won't scroll up

sinful sky
#

its not me trying to help Kadava with my limited knowledge

lone glade
#

what does he need help with? a paradrop on a map click?

sinful sky
#

a paradrop every 5 mins on a randomly selected spot.

lone glade
#

sooo, what's the hard thing in this?

sinful sky
#

I'm noob lol

#

so,

#

ive got this
droppoint= [drop1, drop2 drop3] call BIS_fnc_selectRandom;

lone glade
#

gimme 2 minutes

sinful sky
#

then
droppoint1 = (getmarkerpos droppoint) modelToWorld [0,0,200];
adlocal= "edn_Box_Materials" createVehicle position getmarkerPos droppoint1

lone glade
#

wait, does he use CBA or not?

sinful sky
#

duno

lone glade
#

otherwise i'll have to use a fucking while loop.

sinful sky
#

cant you just have a repetable trigger with a 5 min delay

lone glade
#

....

#

that's worse

sinful sky
#

lol

#

performance worse?

lone glade
#

yes, and also it's stupid

sinful sky
#

i did say limited knowledge

#

you would have a fit looking at my missions lol

lone glade
#

there:

[] spawn {
    while {true} do {
        private _vehicle = createVehicle ["edn_Box_Materials", [random [0, worldSize / 2, worldSize], random [0, worldSize / 2, worldSize], 200], [], 0, "NONE"];
        sleep 300;
    };
};
sinful sky
#

so that just picks a random spot anywhere on the map?

lone glade
#

yes

#

just be aware that the longer the mission will run the less precise the "timer" will be due to how the scheduler works

broken forge
#

is it able to create a popup saying when an airdrop is imbound our have a mission marker on it?

lone glade
#

absolutely not

sinful sky
#

lol

#

oh you are serious..?

#

i can't see why not

lone glade
#

yes it's possible, no I won't do it for him

sinful sky
#

lol

#

well

#

leme try

#

the random position isn't given a defined name it seems

lone glade
#

just put it in a var if you want to

sinful sky
#

well, i wouldn't have don't it like that because i don't know enough

#

not sure where to put the Var name for the object

#

well id love to help but without knowing how to name the random location or the object i don't now how to get the location of the drop

lone glade
#

... wow

sinful sky
#

O so smart are we...

lone glade
#

see the array after the first string?

#

that's the "random location that's totes impossible to put in a var"

#

put it in a local var and use said var instead the the array there

#

aka private _mySuperVar = contentOfTheVar;

ornate pawn
#

@meager heart does memory points don't work anymore. it looks like they change them.

meager heart
#

who...wut...

sinful sky
#

no sorry i can't see what you mean.

#

I'm trying to learn this stuff btw

lone glade
#

fuck, I almost went into writing SQF 101 for a second

sinful sky
#

lol

sinful sky
#

well i just read a bit on local variables

#

yea was just there

#

doesn't help if you don't understand half the page

ornate pawn
#

people that knows how to script are like that @sinful sky

sinful sky
#

I know, its easy to forget what its like to learn.

lone glade
#

dunno, the page explains it fairly well

#

ohgod

#

OHGOD

sinful sky
#

lol

#

^yup

lone glade
#

@still forum :

Variables are only visible in certain scopes of the game. This prevents name conflicts between different variables in different scripts.
There are three scopes: 
#

....

#

someone needs to get the 🗞

sinful sky
#

Scope?

#

you see all these trems

#

terms

lone glade
#

don't worry about scopes yet

sinful sky
#

tbh this isn't the time for sqf 101 ive been up for about 20 hours

#

but i appreciate the help.

meager heart
sinful sky
#

cheers il keep it bookmarked for later.. after sleep

meager heart
lone glade
#

at least scopes are properly explained there

nocturne basalt
#

is it possible to change a turrets weapon using a function in a script?

lone glade
nocturne basalt
#

what will happen to the weapon that was already there?

lone glade
#

???

#

it stays

nocturne basalt
#

ok thanks. Im making my own dynamic loadout for turrets

#

can use this

#

removeWeaponTurret

#

to delete the previous one

broken forge
#

@lone glade for that script you made do i still need to link it to a trigger with repeat at 300 seconds or does it automatically repeat

lone glade
#

it automatically repeats, that's what the sleep is there for, HOWEVER, due to how the scheduler works the timer will become less precise over time

broken forge
#

okay, thats fine

#

and thanks btw

#

also when i create the mission intel popup for when i is dropping how to i make the mission icons position stay following the airdrop

#

like when using the intel tab in the eden editor to set the position of the module to the drop

#

but is there a way to script that

#

actually

#

ignore me, ill just do a normal marker

wary vine
#

Welp

#

would be nice to have native suppport to add Arrays, as data to listboxes, just spent an hour trying to find the issue I was having.

empty blade
#

get good ^

lone glade
#

wat

#

thefuck are you on about

empty blade
#

fucking skids ^

lone glade
#

oh wait, I think I know what he's on about

wary vine
#

I had to turn an array into a string, to set as data on a listbox, then when pulling it back out, with call compile it was trying to turn my strings into variables xD

lone glade
#

nope

#

NOPE

#

NOPE

#

you don't have to do that

wary vine
#

I litterally had to turn my strings into strings.

#

?

lone glade
#

use the control namespace to store the array

#

gimme 5s to find what I mean

wary vine
#

its done now xD

lone glade
#

it's a stupid method you're using

#

very stupid

wary vine
#

o.o

#

it works fine .

#

just have to make sure the strings are strings,

#

and then those strings are string.

ruby breach
#

There is a distinct difference between functional, and fine

wary vine
#
private _formattedArr = format ["[%1,%2]",str _itemClassname,str (_arr select 1)];
wary vine
#

xD

wary vine
#

I still dont get it xD

#

I have always used this method in my dialogs xD

lone glade
#

save the array in the control namespace / dialog namespace using the classname or whatever you have as text as varname

#

then when you want your array you retrieve the classname / text and use getVar

wary vine
#

If your using the control as namespace, couldnt you use the index as the varName ? then it would be easier to overwrite ?

lone glade
#

suit yourself

#

but in my case that wasn't a valid solution because I modify the indexes

#

deleting an element of the list / adding one would break it

wary vine
#

Yeah, I see what you mean, but with mine , you may have multiple lines with the same classname

ornate pawn
#

I'm working on a towing system for an MP mission. but when somebody else does the towing the vehicle gets tow but it change its direction.

#

[
player,
"Attach Landing Platform",
"scripts\BEW\Logistics\images\attach_ca.paa",
"scripts\BEW\Logistics\images\attach_ca.paa",
"_target distance LP_1 < 3",
"_target distance TVeh_1 < 5",
{},
{},
{
_target playaction "Putdown";
LP_1 attachTo [TVeh_1, [0, -6, -1.3] ];
sleep 0.1;
[LP_1, "BEW_attach_to"] call CBA_fnc_globalSay3d;
sleep 0.5;
lP_1 setDir 90;
},
{},
[],
10,
1000,
false,
false
] call BIS_fnc_holdActionAdd;

lone glade
#

you're using setDir

#

ofc it changes the direction

ornate pawn
#

if i do the towing the landing platform gets align with the vehicle but if somebody else the landing platform is looking in another direction

#

lol

lone glade
#

.... no shit.

ornate pawn
#

any clue on how to fix this?

lone glade
#

use getDir to retrieve the first vehicle direction and setDir the second one with it

ornate pawn
#

its just one vehicle

still forum
#

@lone glade why?

ornate pawn
#

i mean its a landing platform where i attach the little bird to it

still forum
#

certain scopes of the game is bullshit yeah. And name conflicts too. But... Otherwise?

#

three scopes?

#

There is a unlimited number of scopes

#

wtf is dis shit

lone glade
#

hahahaha

#

@ornate pawn you're rotating the platform to a specific direction, and then you wonder why it rotates?

ornate pawn
#

sitDir 90 does it for me in MP

#

but when i ask my friend to do it doesn't

#

the object is looking somewhere else

still forum
#

@lone glade link to that page? Variables page?

lone glade
#

variables page

still forum
ornate pawn
#

that page is empty

lone glade
#

TIL setDir is AL

ornate pawn
#

lP_1 setDir 90; works for me but NOT for my friends

lone glade
#

always thought it was AG EG for some reason, use remoteExec

#

yes, that's normal

#

instead of
lP_1 setDir 90;
use
[lP_1 , 90] remoteExec ["setDir", lP_1 ];

still forum
#

Exactly. That page is empty.

#

That command doesn't exist.

#

look at the top left. under the setDir title

ornate pawn
#

that command doesn't exist? how come it works?haha

still forum
#

That blue AL thing

lone glade
#

sitDir doesn't, setDir does

ornate pawn
#

lol i'm not using sit

#

lol

still forum
#

how come it works?haha
to do it doesn't
all your words.

#

You wrote that tho

#

Also yeah. It says AL.

#

Meaning the arguments have to be local to you

ornate pawn
#

okay

still forum
#

An object that is local to you is not local to your friend

#

easiest way is to use remoteExec like @lone glade posted above.

ornate pawn
#

okay i will change my script

#

[
player,
"Attach Landing Platform",
"scripts\BEW\Logistics\images\attach_ca.paa",
"scripts\BEW\Logistics\images\attach_ca.paa",
"_target distance LP_1 < 3",
"_target distance TVeh_1 < 5",
{},
{},
{
_target playaction "Putdown";
LP_1 attachTo [TVeh_1, [0, -6, -1.3] ];
sleep 0.1;
[LP_1, "BEW_attach_to"] call CBA_fnc_globalSay3d;
sleep 0.5;
[lP_1 , 90] remoteExec ["setDir", lP_1 ];
},
{},
[],
10,
1000,
false,
false
] call BIS_fnc_holdActionAdd;

lone glade
#

also
`

mycode

`

#

there

ornate pawn
#

yeah thank you i forgot

lone glade
#

which gives you

mycode
ornate pawn
#
[   
  player,   
  "Attach Landing Platform",   
  "scripts\BEW\Logistics\images\attach_ca.paa",   
  "scripts\BEW\Logistics\images\attach_ca.paa",   
  "_target distance LP_1 < 3",  
  "_target distance TVeh_1 < 5",  
  {},   
  {},   
  {   
  _target playaction "Putdown";   
  LP_1 attachTo [TVeh_1, [0, -6, -1.3] ];  
  sleep 0.1;
  [LP_1, "BEW_attach_to"] call CBA_fnc_globalSay3d;
  sleep 0.5;  
  [lP_1 , 90] remoteExec ["setDir", lP_1 ];  
  },   
  {},   
  [],   
  10,   
  1000,   
  false,   
  false   
] call BIS_fnc_holdActionAdd;
still forum
#

y u no show sqf highlighting @lone glade

lone glade
#

;<

#

`

myHighlighted code

`

#

there.

ornate pawn
#
lol
#

ma bad

#

hahaha

#

one more thing. when my friend detach the helicopter from the landing platform the helicopter starts to bounce to finally blow up

lone glade
#

that's normal

ornate pawn
#

when i do the detaching the helicopter falls on the landing platform without bouncing

lone glade
#

it's probably clipping the platform

ornate pawn
#

but it doesn't happens to me only for him

#

weird

lone glade
#

we can't tell you why if we don't see the code

ornate pawn
#

the detaching code ?

#

here's the entire code

#

//- This script attach the Helicopter to the landing platform

[   
  player,   
  "Attach AH-6 Little Bird",   
  "scripts\BEW\Logistics\images\attach_ca.paa",   
  "scripts\BEW\Logistics\images\attach_ca.paa",   
  "_target distance LP_1 < 3",  
  "_target distance LB_1 < 5",  
  {},   
  {},   
  {   
  _target playaction "Putdown";   
  LB_1 attachTo [LP_1, [2, 0, +2.3] ];  
  sleep 0.1;
  [LP_1, "BEW_attach_to"] call CBA_fnc_globalSay3d;  
  LB_1 setDir 270;  
  },   
  {},   
  [],   
  10,   
  1000,   
  false,   
  false   
] call BIS_fnc_holdActionAdd;


//- This script detach the Helicopter from the Landing platform


[   
  player,   
  "Detach AH-6 Little Bird",   
  "scripts\BEW\Logistics\images\detach_ca.paa",   
  "scripts\BEW\Logistics\images\detach_ca.paa",   
  "_target distance LP_1 < 3",  
  "_target distance LB_1 < 5",  
  {},   
  {},   
  {   
  _target playaction "Putdown";  
  sleep 0.3;
  detach LB_1;
  [LP_1, "BEW_attach_to"] call CBA_fnc_globalSay3d;  
  },   
  {},   
  [],   
  10,   
  1000,   
  false,   
  false   
] call BIS_fnc_holdActionAdd;

#

i still need to update the remoteExc you gave me

lusty canyon
#

why is my falling damage negation EH not working?


    player addEventHandler ["HandleDamage", 
    { 
        private ["_unit", "_damage", "_source"];
        _unit = _this select 0;
        _damage = _this select 2;
        _source = _this select 4;     
        if ( (_source == "") && !(isTouchingGround _unit) ) then {0} else {_damage};
    }];
still forum
#

For one. Your private in there is completly useless

#

And... Wouldn't you be touching ground when you get fall damage?

muted sand
#

Anyone know how to make map items/objects selectable by cursor?

lusty canyon
#

how can i then make sure only falling damage is negated?

still forum
#

well source empty already seems logical

#

I would try to use that

#

@muted sand Can't.

muted sand
#

oh damn ok

#

was hoping to make a script for scavanging items from certain trees, bushes ect...

still forum
#

You can hide the building. And manuall spawn exactly the same building at the same position.

#

That one you could move then

#

You mean you want a action on that object? like a scroll wheel action?

muted sand
#

yes sorry worded that completely wrong hha

still forum
#

You can add actions to most buildings/map objects via config

#

but if they don't have a config class.. Like trees/bushes. You can't.

lusty canyon
#

thanks d it works now

muted sand
#

hmm alrighty so no trees or bushes have config classes?

still forum
#

You can make an action that's always visible. If the player uses that check if he is looking at a bush/tree. If so use that. Otherwise tell him there is nothing to scavenge from

#

I don't know of any... In theory it's possible to make them be config classes and make maps with these

#

but never seen anyone do that

lusty canyon
muted sand
#

Yea ok

still forum
#

@lusty canyon To terrain objects?

lusty canyon
#

if a building / prop / thing it will work

#

trees and simple dodads maybe not

muted sand
#

hmmm ok good info, i dont suppose theres any examples out there you guys know of?

still forum
#

Well I'm sure some life server already made that

lusty canyon
#

how about attaching an invis object that has the addaction to the simple object you want?

muted sand
#

Oh true

still forum
#

Yeah. You could attach invisible objects to every bush/tree

lusty canyon
#

performance will get wrecked tho?

muted sand
#

jayTAC maybe but I am pretty much noob so yea 😃

still forum
#

performance will probably get wrecked

lusty canyon
#

cant make the addaction conditional too complex since its checked every frame unscheduled

muted sand
#

lol yea dont want that then, what if the item we added an action to was placed by editor so not a simple object would that work?

still forum
#

yeah

#

any editor placed object works

#

But as I said you can make a action that's always available. Or with CBA even a hotkey.

#

When used it will check if there is something to scavenge

muted sand
#

Aha nice could make a few areas around map then that people could gather things

still forum
#

then you can also check if user is looking at terrain objects like trees/bushes without having to place anything on the map

muted sand
#

Ok nice

still forum
#

And that would also allow players to gather anywhere

muted sand
#

hmm alrighty guess will just have to try some stuff and see what happens, much appreciate your time!

ruby breach
#

@muted sand Could use an addAction coupled with something like str(cursorObject) find "neriumo2d" > -1 as a condition.

muted sand
#

Ok is that based on editor placed objects?

ruby breach
#

Heh, sadly not. That's just on the player

#

So always evaluated on scrollwheel

muted sand
#

ok cool just so i know

little eagle
#

Actions added to the player are evaluated every frame regardless of you using the scrollwheel.

muted sand
#

so its always on wheel and then have it so only if it finds a specific object it will allow the player to scavenge?

little eagle
#

No, every frame regardles of the scrollwheel.

muted sand
#

ok

#

I didnt think it would be as complicated as regards to gethering items from objects 😄

little eagle
#

It's not complicated.

#

Just a bit of work.

ruby breach
#

Pretty sure the workaround most life servers use is something to push the actions back into a list and then add on mousewheeldown / remove on keydown, click, etc, etc

muted sand
#

yea probably, will work it out im just new to this sorta stuff

#

yea well will give it a bash, if i get it working will let you know! Cheers

broken forge
#

@lone glade does this script spawn in the box aswell, because i use it and it creates the marker but not the crate

while {true} do {
_vehicle = createVehicle ["edn_Box_Materials", [random [0, worldSize / 2, worldSize], random [0, worldSize / 2, worldSize], 200], [], 0, "NONE"];
_markerad = createMarker ["Air Drop", position _vehicle];
_markerad setMarkerType "hd_dot";
sleep 5;
};
};```
lone glade
#

it's possible the box just falls and get destroyed by fall damage and thus sink into the ground instead of glide like vehicles

broken forge
#

ah

little eagle
#

The marker name is not unique. Only one marker will be created.

lone glade
#

and that too

broken forge
#

how do i make it unique?

#

im new to this sort of thing 😛

lone glade
#

also I hope for you that classname in the createvehicle array is valid

little eagle
#

Dynamically create the name. Just put some number at the end.

broken forge
#

in the quotes?

little eagle
#

What?

broken forge
#

so
_markerad = createMarker ["Air Drop1", position _vehicle];

little eagle
#

No, that is still not unqiue.

#

You obviously have to change the number each time.

#

Like increment it by one.

broken forge
#

how would i do that for a script?

little eagle
#

Increment a number?

broken forge
#

ye

little eagle
#

_number = _number + 1;

broken forge
#

but how would i include the number in the name

little eagle
little oxide
#

toFixed work with number like 3e+015 ?

little eagle
#

Define "work".

lusty canyon
#

is there a cmd that can change the respawn timer?

little eagle
#

Yes.

setPlayerRespawnTime
still forum
#

toFixed works with numbers yes @little oxide

little oxide
#

Just wanted to know if i have a number like 3e+015, this will put in string a 3 with fifteen 0 behind it

still forum
#

If you tell toFixed to give you 15 zeroes... yes

#

otherwise no

#

Wait...

#

Not after comma

#

then yes. it should

little oxide
#

And what is the fastest way to know the number of decimals in number ?

little eagle
#

Doubt it will be fifteen zeroes, as floats are not that accurate above 1e7.

#

It will probably peter out with something close to 1e15.

still forum
#

know number of decimals in number?

#

You mean digits?

#

I know there is a formula for that

little oxide
#

number of digits after comma

still forum
#

decimal places then... Eh.. That question is... wrong

#

If you print the number with 10 decimal places then it will have 10 decimal places

#

If you print it with 1 then it will have 1

#

Theoretically any number has infinite decimal places. With most of them being 0 though

little eagle
#

1e15 has zero digits after the decimal point. I don't understand the question.

little oxide
#

it's another question

#

like if i have number 3.125

#

it will return me 3

little eagle
#

floor

little oxide
#

if i have 3 it will return me 0

still forum
#

3.125 is the same as 3.125000000000000

little eagle
#

True.

still forum
#

There is no real way.. Besides rounding to 1 decimal digit and checking if it's equal the original number. If not, try two and so on

#

till it matches

#

that way you get the shorted possible, exact representation

river meteor
#

convert to string and count chars after a .

still forum
#

Nope.

#

3.1523534563463634634634 to string will not give you the same number.

little eagle
#

Not even 3.1523534563463634634634 will be 3.1523534563463634634634 if entered as float.

still forum
#

When arma converts to string normally it cuts of after a set number of decimal places

#

if you use toFixed it will always be equal to the number you give to toFixed

broken forge
#

how do i make the marker dynamic?
_markerad = createMarker ["Air Drop", position _vehicle];

little eagle
broken forge
#

i don't get it? do i do

_markerad = createMarker ["Air Drop %1", position _vehicle];```
little eagle
#

No.

broken forge
#
_number = _number + 1;
_markerad = createMarker ["Air Drop %_number", position _vehicle];```
#

?

shadow sapphire
#

What command makes a unit speak and where can I find the game's vanilla dialog?

ruby breach
#

Also no

little eagle
#

DEL-J, say/say3D?

ruby breach
broken forge
#

i know, i don't understand it

still forum
#

@broken forge %1 in the string is being replaced by the first argument

little eagle
#

I think the instructions on the wiki are pretty clear.

broken forge
#

well im pretty new and retarded xd

still forum
#

I was also new once...

#

¯_(ツ)_/¯

broken forge
#

😛

shadow sapphire
#

@little eagle, this has me on the right track! Thanks. Can I find vanilla voice lines from some kind of config viewer, like the animation viewer?

still forum
#

You can find configs in the config viewer

#

I don't know why the animation viewer would have voices

shadow sapphire
#

Not what I was asking, but okay.

little eagle
#

If you're slow in the head then you have to carefully read. Don't think we can cure that over discord.

still forum
#

Yes you can find them in the config.

shadow sapphire
#

Thanks!

broken forge
#

can someone give me an example of creating a marker with this format thing

river meteor
#
format ["I have a string and I can insert variables using %1, and %2 and so on...", _myExpressionReplaces1, _thisVariable replaces2];
still forum
#

@broken forge format ["Markername %1", _number] will create stuff like Markername 1 or Markername 2

little eagle
#

According to the wiki, the sound files for say2D/say3D are defined in CfgSounds.

broken forge
#

ty

little eagle
#

Which can be accessed over the config viewer.

#

There is no sound viewer afaik equivalent to the animations viewer.

shadow sapphire
#

Awesome! Thanks, @little eagle, @still forum.

still forum
#

Maybe someone should build a sound viewer 🤔

little eagle
#

Yes, but don't call it "viewer".

river meteor
#

Anyone know why I may be getting an error loading resource error when trying to create a control tree?

little eagle
#

Nope, not me.

still forum
#

config hearer :3

little eagle
#

sound ... board?

river meteor
#

Not a control tree actually, a control table. Which has very little documentation and I only found one github project that actually uses it

little eagle
#

Ah, never used those. Since they are not document, maybe they don't work?

river meteor
#

Also that screenshot showing what the result can be is exactly what I'm trying to accomplish

little eagle
#

I think silentspike tried to use those for something (spectator?) and then didn't in the end for some reason.

neon snow
#

Can I get selected target position?

little eagle
#

getPosWorld

#

?

neon snow
#

ok, but how do I make it return the target position?

still forum
#

What target?

little eagle
#
getPosWorld _target
#

Returns _target's position.

neon snow
#

Oh ok... Is there a list of the parameters like that? such as _target etc?

#

I am just begining to script so you know

still forum
#

No?

little eagle
#

_target is a variable.

#

You can name it anything you want.

neon snow
#

Ok then, so now I dont know how it will work. I

little eagle
#

Uhm, target of what? That would be a place to start.

still forum
#

Like I asked 2 minutes ago ^^

neon snow
#

The target selected by a player in a vehicle

still forum
#

how do you "select" a target?

neon snow
#

I meant locked, my bad

still forum
#

You mean like a missle lock?

neon snow
#

Yes indeed

little eagle
#

Good question.

still forum
#

It now took 6 minutes to find out what you actually want :D
I don't know.. But I can google

neon snow
#

Sorry for my stupidity xd

little eagle
#

No idea. But doesn't that overwrite the cursorTarget?

neon snow
#

I will check it now

still forum
#

cursorTarget also returns locked target for the duration of the lock even if there is another target under the cursor

#

yes

little eagle
#

I was about to post exactly this quote.

ruby breach
#

ergo, the answer to your original question is getPosWorld cursorTarget

neon snow
#

That part I know, I was just looking for cursorTarget. Thank you all 😃

velvet merlin
#

Added: A new "#" script operator (works in the same way same as "selects", is shorter to write and has higher priority than math functions)

still forum
#

Nice joke

lone glade
#

you have to be shitting me

little eagle
#

[127] # 0 // 127?

lone glade
#

holy fuck it's real....

still forum
#

wtf

#

Well... Noobs will for sure learn that very quickly

little eagle
#

Well sure, why not.

lone glade
#

because params, param and select weren't enough huehuehue

still forum
#

and it for sure looks very readable

#

I gave BI a script command to add weapons with attachments into boxes and stuff.... They just have to copy-paste it into the engine

#

and instead they chose to give us #

#

Something that we already have.. And that doesn't give us any real benefit

#

yes it's shorter.. But we already use params anyway if we would have many select's

little eagle
#

Why not give us both? Surely can't take longer than a few hours to implement each.

lone glade
#

No speed improvement too

#

i'll try with an array of 10 000 just in case

#

it's slower than select

still forum
#

Are you sure?

lone glade
#

aaaactually no, it's within test variance

little eagle
#

Eh, it looks nicer.

lone glade
#

so at best it's the same as select

still forum
#

Does it look more readable too?

lone glade
#

imho no

little eagle
#

The # char stands out a lot.

lone glade
#
private _array = [];
_array resize 10000;
_array select 1000;

vs

private _array = [];
_array resize 10000;
_array # 1000;
tough abyss
#

How very odd. Doesn't make a lot of sense at all. If they wanted to improve the syntax then _array[1000] would be easier and quicker to learn but I suspect that isn't happening. This is just an alias and a weird one at that

still forum
#

Also.. isn't # the character BI uses to show place of script errors?

lone glade
#

example using something that uses a shitload of selects:
[(_cargo # 0 # 0),(_configItems # 0 # 0), _cargo # 0, 0],
[(_cargo select 0 select 0),(_configItems select 0 select 0), _cargo select 0, 0],

still forum
#

[] is like.. Impossible to implement though.

lone glade
#

I can't remember ded, but # is used somewhere else, can't remember for what

knotty mantle
#

yeap. Position where the script goes southis marked with #

little eagle
#

It's not impossible, but it would require deeper changes. # is like done in one evening.

tough abyss
#

..........._abc ## 1000......

lone glade
#

ooooh

tough abyss
#

That isn't going to be wonderful

lone glade
#

I remember !

#

is used for preprocessor stuff

tough abyss
#

Macros and suh are all # based

lone glade
#

like concatenating words and replace

#

I honestly wouldn't be surprised if # was an alias of select

little eagle
#

for macros is always the first char in a line. # is a binary command. Unless you put your statement into multiple lines for some reason, there is no conflict between the two.

still forum
#

Does #something preprocessor stuff also work outside of macros?

#

Like the # that turns things into strings

lone glade
#

no ideas

tough abyss
#

I don't think so, everytime I have used it/seen it used is always for the macro purpose.

still forum
#

And...

lone glade
#

wait a second.....

still forum
#

What if you
#define STUFF(x) _array # x

lone glade
#

[0,1]#2 doesn't error out

#

[0,1]#3 does....

still forum
#

Just as select @lone glade

lone glade
#

yes

#

exactly dedmen

still forum
#

Well.. Scripting beginners will adopt to that very quickly. I'm sure they won't be confused at all

lone glade
#

one more command to never use 😛

tough abyss
#

And odd one to add this late as well

lone glade
#

especially without speed improvements

shut flower
#

Well.. Scripting beginners will adopt to that very quickly. I'm sure they won't be confused at all

lone glade
#

if it was faster than select maybe there would be a use case

shut flower
#

this requires documentation of it

#

just ban it off everywhere

#

the "use case" is that is get's prioritized

#

maybe some BI dev needed it for some strange calculation to make it shorter to read

lone glade
#

yeah, but in that case you use brackets

still forum
#

Woah

shut flower
#

and welp, there it is, a useless script command

still forum
#

I don't even know if we can create wiki pages with name #

shut flower
#

don't think so

lone glade
#

select (#)

#

huehuehue

shut flower
#

mediawiki has problems with that

still forum
#

Yeah..

#

autoredirects to main page

shut flower
#

url encoded

#

but don't think media wiki does that

still forum
#

Well. I won't make that wiki page...

shut flower
#

someone will maybe do one day

#

and then there has to be included: don't use it, it's strange

lone glade
#

so yeah, we can safely ignore that command and forget about it until someone decides to use it because why the fuck not.

sick sorrel
#

as a new guy, I prefer "select" actually, as I can directly read what it does.. if I saw # in a code somewhere, I'd have to look up what it means

still forum
#

Exactly.

lone glade
#

I tried replacing all my select with # in a file, it's imho less readable

shut flower
#

course it is

#

look at C++

#

that's the result if you use symbols

#

for like fuggin everything

lone glade
#

C++ is mathemagics taken too far

still forum
#

If there was actually a benefit.
But it's exactly as fast. Harder to read. Confusing AF if you use macros with #.. And that's about it.
Higher precedence.. well.. Precedence isn't documented anywhere so 99% of people won't know about that anyway

#

Why not make it ->

#

_array->5->3 is more readable

lone glade
#

true, but > is already used huehuehue

shut flower
#

wow

still forum
#

And that combined with macros.
_array->RADIO_FREQUENCY_INDEX

#

yes.. > is.. But -> isn't

shut flower
#

that strange c++ syntax isn't better

neon snow
#

and @?

still forum
#

@ is used in SQS

shut flower
#

or just curly braces?

lone glade
#

-> makes more sense

shut flower
#

like in every language?

lone glade
#

that's crazy talk right there

still forum
#

braces isn't possible without changing the language itself

lone glade
#

remember, it's sqf

still forum
#

You could have a [ command.. But you can't because array

shut flower
#

we just wait for a4 and enfusion

still forum
#

How about using a unicode arrow character? 😄

shut flower
#

and everything will be better

still forum
#

They just want to make our lives hard until enscript

#

So we all know how much better enscript is

lone glade
#

LIES DEDMEN

#

let's go back to sqs

#

the splash screen is made in sqs because of how good it is

still forum
#

Some people are still using sqs

shut flower
#

I'm still surprised you cannot delete single items in cargo since the beginnings of sqf

#

For several years now

lone glade
#

You can.

shut flower
#

core functionality

#

how?

#

delete everything and readd it?

lone glade
#

nope

little eagle
#

You can't.

shut flower
#

how would you do it @lone glade ?

lone glade
#

holy shit, you can't O.o

shut flower
#

waited for this reaction 😛

still forum
#

😄

#

I can make a script command to remove a item by classname for you if you want

shut flower
#

intercept has the main problem that is is a mod

still forum
#

but you can't choose which exact item as item ID's... eh... Technically don't... Eh.. Theoretically.. eh... ... Item ID's don't exist.

#

Noo

#

I can't make it in Intercept 😄

#

well.. I could.. But no

shut flower
#

just hack this stuff into the main assembly and hack into BIs servers and put it there

#

ah, you mean you make a script command you send to BI that would never get added?

#

because reasons?

still forum
#

Dwarden didn't say no.

#

He just said "ask again later"

#

We'll see

shut flower
#

later == 2^9999999 ?

still forum
#

After Arma 2 EOL.

shut flower
#

awesome

#

so when a4 is released?

ornate pawn
#

How can i detach a helicopter from a landing platform without the helicopter bouncing so it doesn't blows up?

shut flower
#

then I need this script command badly

still forum
#

I don't even know what "detach" means

#

a helicopter is usually not bolted to it's landing platform

shut flower
#

maybe he attached it?

#

and wants to detach it without explosions

ornate pawn
#

i have an attach script that attaches the helicopter to the landing platform

lone glade
#

move the "attach" point higher

still forum
#

attach it. Move it up by half a meter. And... It will bounce back down but...

#

Maybe explode less

ornate pawn
#

but when i detach the helicopter nothing happens the helicopter lands on the landing platform perfectly but when a friend does it the helicopter starts bouncing and then blows up

shut flower
#

just a tiny explosion instead of a huge one

ornate pawn
#

move the "attach" point higher. I did

inner swallow
#

helicopter eneableDamage false

ornate pawn
#

do i need to add a remoteExc to the detaching script too?

inner swallow
#

check the wiki, if effect is local then yes

little eagle
#

detach has global effects

ornate pawn
#

here's the whole script.

little eagle
#

But it may have to be executed on the same machine that used attachTo. At least that is what I'd guess.

ornate pawn
#
//- This script attach the Helicopter to the landing platform

[   
  player,   
  "Attach AH-6 Little Bird",   
  "scripts\BEW\Logistics\images\attach_ca.paa",   
  "scripts\BEW\Logistics\images\attach_ca.paa",   
  "_target distance LP_1 < 3",  
  "_target distance LB_1 < 5",  
  {},   
  {},   
  {   
  _target playaction "Putdown";   
  LB_1 attachTo [LP_1, [2, 0, +2.3] ];  
  sleep 0.1;
  [LP_1, "BEW_attach_to"] call CBA_fnc_globalSay3d;  
  [LB_1 , 270] remoteExec ["setDir", LB_1 ];  
  },   
  {},   
  [],   
  10,   
  1000,   
  false,   
  false   
] call BIS_fnc_holdActionAdd;


//- This script detach the Helicopter from the Landing platform


[   
  player,   
  "Detach AH-6 Little Bird",   
  "scripts\BEW\Logistics\images\detach_ca.paa",   
  "scripts\BEW\Logistics\images\detach_ca.paa",   
  "_target distance LP_1 < 3",  
  "_target distance LB_1 < 5",  
  {},   
  {},   
  {   
  _target playaction "Putdown";  
  sleep 0.3;
  detach LB_1;
  [LP_1, "BEW_attach_to"] call CBA_fnc_globalSay3d;  
  },   
  {},   
  [],   
  10,   
  1000,   
  false,   
  false   
] call BIS_fnc_holdActionAdd;

lone glade
#

nah, detach is AG EG

ornate pawn
#

when i detach the helicopter from the landing platform the helicopter lands perfect on the landing platform

little eagle
ornate pawn
#

when my friends detaches the helicopter the helicopter starts bouncing

#

even if he does the whole process of attaching and detaching

#

everything else works perfect

lone glade
#

where on this page does it say AL EG commy? HONHONHONHON

little eagle
#

I think this solution to this is to set the position of the helicopter slightly above the groud. Like 10 cm. Then it drops and doesn't collide with the ground as violently as when released inside it.

lone glade
#

oh wait

#

@ornate pawn are you the server ?

little eagle
#

It says AG EG.

ornate pawn
#

yes im hosting

#

when we do the testing

lone glade
#

okay, try this:
[LB_1] remoteExec ["detach", LB_1]

little eagle
#

I think this solution to this is to set the position of the helicopter slightly above the groud. Like 10 cm. Then it drops and doesn't collide with the ground as violently as when released inside it.

#

Can only repeat myself.

ornate pawn
#

I want to finish this so i can release it on workshop I already have some stuff in my workshop if you guys wanna check it out.

#

okay @lone glade

#

i did set the helicopter like 12" above the landing platform

#

I'm still working on Black Sheep - Chapter II

#

Nato Black Sheep is a mod with custom uniforms

#

i also have a C.Q.B training facility

#

i finish the cameras this morning thanks to a friend

#

that's an screenshot

#

the C.Q.B from the outside

#

also doing some underwater environment 😛

#

Sorry for the spam

shut flower
#

sneaky advertisement: check

lone glade
#

"sneaky"

#

your perception stat is very low chris huehuehue

little eagle
#

That was also the name of the CC Generals mission they had to censor, because the task was to gas 300 civilians.

edgy dune
#

question

#

does _unit mean anything, I guess I mean is it a reserved word or anything?

little eagle
#

It's a variable name, and arbitrary.

still forum
#

_unit doesn't mean anything besides that it's a local variable with the name _unit

edgy dune
#

so nothings assinged to it then by default?

little eagle
#

By default all variables are undefined.

still forum
#

depends on your meaning of default

little eagle
#

From the start.

#

Generally.

#

Something like that.

still forum
#

If your script is called from a nother script that has a _unit variable.. Then it's usually assigned to something.

edgy dune
#

ah cool thx

still forum
#

There are no variables that are assigned to something by default

#

There are a few that are, depending on where, when and what.

broken forge
#

how would one set a waypoint for a group of units spawned by script

inner swallow
broken forge
#

ty

broken forge
#

does anyone know what's wrong with this?

_wp =_groupalpha addWaypoint [getmarkerposHQ,0];```
still forum
#

yes

#

addWeapon doesn't return a number

#

and it's missing the left parameter

#

And the getmarkerposHQ variable is undefined

little eagle
#

NOTE: THIS SYNTAX RETURNS NO UNIT REFERENCE!

#

For starters.

#

No argument on the left hand side of addWeapon.

#

Too many args in the array of createUnit, though you probably want the other syntax anyway.

#

corporal is supposed to be a string. Currently it's an undefined variable.

#

getmarkerposHQ looks suspiciously wrong too.

#

Harder to find something right with it :/

tough storm
#

Guys, almost sure that someone posted a module here that improves bots capability of using cover

#

but cant find it at all

#

anyone?

cedar kindle
#

you mean mod?

#

asr ai, vcom ai?

ornate pawn
#

Guys If my helicopter is already attach to an object then how to prevent the attach helicopter action from displaying?

ruby breach
spring dune
#

Uhm, guys, may anyone help a bit? I just trying to make the scirpt which will override PP settings of ace3's NVG...

still forum