#arma3_scripting

1 messages ยท Page 564 of 1

still forum
#

@crude needle afaik that works yes
@mortal nacelle less hops == faster.
but.. doesn't matter. you shouldn't care

real mango
#

Hello again! ๐Ÿ‘‹
Thanks @austere granite for your reply, looks like I'll have to just tell admins to set the difficulty themselves :D

I've a little curiosity and I was wondering if anyone has extensive knowledge about https://community.bistudio.com/wiki/remoteExecCall

In the wiki it says that:
It just means that the execution of the function will be carried on in unscheduled environment.

I understand the example that it makes but I still have some doubts about how it works when multiple client use it to execute a function on a server.

If n clients do

[] remoteExecCall ["func1", 2];

at the same time, does this mean that "func1" is called n times sequentially (in order of arrival) or there are going to be n threads running "func1" in parallel that just can't be suspended?

ivory lake
#

it'd be the later but depends on network traffic and speed probably

still forum
#

scripts cannot run in parallel at the same time

#

it'd be the later
latter? no. Can't
sequentially in order of arrival is the answer

ivory lake
#

oh you're right I misread

real mango
#

Yay! I guess it's definitely what I want then, thanks a lot! ๐Ÿ™

#

(I guess it would be behave similarly to having a thread that constantly listens for new remoteExecCalls and just runs the desired function as you would with "call", right? If this is the case I assume the function that's being invoked doesn't really matter, it just behaves all the same)

still forum
#

uh.. not really.. but yeah i guess similar

real mango
#

As a way to imagine it let's say, don't want to go down in the technicalities ๐Ÿ™‚ Thanks a lot, appreciated!

dusk badger
#

Is there a script trigger activated where a group is dead or maybe 3 remaining it spawns the same group again?

astral carbon
#

Hi there!

#

I am trying to initialize an Alien's behavior system one Waypoint activation and I get an error. It works if I don't set a waypoint but I need it so once it gets to a spot, then it initializes. The error I get is:

|#|params[
"_group",
"_pos",
["_arg",-1],
[...'
Error Params: Type String, expected Bool
File A3\functions_f_contact\waypoints\fn_wpDroneMove.sqf, line 1```

I am using: `[alien] call bin_fnc_behaviorInit;` for the code inside the Activation Waypoint
mortal nacelle
#

Am I doing something wrong here, I have created a script, defined everything correctly in cfgFunctions, but when I go to use my addaction (delcared on the init box in the mission), it says my function is undefined?

#
this addAction["<t color='#FF0000'>Retrieve Standard Loadout</t>",{[]call LW_fnc_spawnStandardLoadout},nil,1.5,true,true,"","true",5];
winter rose
#

try to only type your function's name in the debug console first

mortal nacelle
#

Yeah that isn't doing nothing, it isn't in the fuctions list either, which is whats bamboozling me

winter rose
#

so wrongly declared?

#

debug console *in preview

mortal nacelle
#

I don't think so? Functions.hpp class LW { tag = "LW"; class core { file = "core"; class Loadouts{}; }; };

#

description.ext ```author = "Lewis Williams";
disabledAI = 1;

class cfgFunctions
{
#include "core\functions.hpp"
};```

#

fn_loadouts.sqf ```sqf
LW_fnc_spawnStandardLoadout = {
player setUnitLoadout[["hlc_rifle_M4","","rhsusf_acc_anpeq15A","rhsusf_acc_ACOG",["hlc_30rnd_556x45_EPR",30],[],""],["mas_launch_M136_F","","","",["mas_M136",1],[],""],["hlc_pistol_P226US","","","",["hlc_15Rnd_9x19_B_P226",15],[],""],["Gen3_aor1",[["ACE_EarPlugs",1],["ACE_morphine",2],["ACE_elasticBandage",5],["ACE_packingBandage",5],["ACE_tourniquet",2],["ACE_CableTie",2],["ACE_IR_Strobe_Item",1],["ACE_MapTools",1],["ACE_quikclot",1]]],["milgp_v_jpc_assaulter_belt_AOR1",[["ACE_Flashlight_XL50",1],["ACE_Chemlight_HiRed",2,1],["SmokeShellRed",3,1],["SmokeShell",3,1],["rhs_mag_mk84",3,1],["rhs_mag_m67",3,1],["hlc_30rnd_556x45_EPR",10,30],["hlc_15Rnd_9x19_B_P226",2,15]]],["milgp_bp_Tomahawk_AOR1",[["AMP_Door_Wedge",1],["ACE_wirecutter",1]]],"milgp_h_airframe_02_AOR1","milgp_f_face_shield_shades_shemagh_AOR1",["ACE_Vector","","","",[],[],""],["ItemMap","ItemcTab","tf_anprc152","ItemCompass","ACE_Altimeter","NVGoggles_mas_hv18"]];
};

winter rose
#

ah, well, no

#

that's not how you define a function ๐Ÿ˜„

mortal nacelle
#

๐Ÿ˜ฆ

winter rose
#

also, whatever the file content; if it doesn't appear in the Functions viewer, it wasn't properly configured

mortal nacelle
#

ok, so where do i define each individual function?

winter rose
mortal nacelle
#

@winter rose This is better? ```sqf
_functions = [
"LW_fnc_spawnStandardLoadout"
];

{
_x call BIS_fnc_recompile;
} forEach _functions;

winter rose
#

O_o

#

Where did you see that in the link I posted really??

mortal nacelle
#

"functionName" call BIS_fnc_recompile;

#

but i will have more than 1 function

still forum
#

you skipped everything and jumped directly to the end of the wiki page?

#

why?

tame lion
#

Can the "OnLoad" UI EH be applied to a UI before it is created? I want to create a textbox in Zeus Interface that will display custom information for Zeus w/o having to directly edit the interface. I want to do it through SQF only if possibly

austere granite
#

no

manic bane
#

How can I determine whether player is using backup red dot sight or main sight on NightStalker sight?

exotic flax
#

I don't think that's possible

restive leaf
manic bane
#

Ok thx

manic bane
#

I could put NVG with action command but how can I cycle NVG mode to TI with command?

drifting copper
#

@young current Will you mind elaborating?

Script uses

_unit setPos [getPos _chair select 0, getPos _chair select 1, -5]; 

I tried set/getPosASL & set/getPosASLW

ruby breach
#

Sounds like it's working as designed. At the x and y coordinates of the chair, 5 meters below the surface of the water. That's what you've just posted code for anyway

drifting copper
#

@ruby breach If I change -5 to lets say 100 it still drops you under water. Object is placed at Z = 41.781

winter rose
#

@drifting copper then something else places the unit, like an attachTo

drifting copper
#

So because I am at sea on my version I am using

_unit setPosASLW [getPosASLW _chair select 0, getPosASLW _chair select 1, getPosASLW _chair select 2];

I added getPosASLW _chair select 2]; and this got me to float just above the chair

ruby breach
#
_unit setPosASL (getPosASL _chair);
``` is a much shorter way of doing the same thing
drifting copper
#

@ruby breach it does not pull you to the XYZ then

winter rose
#

it's the exact same thing (besides ASLW - ASL)

#

doing [select 0, select 1, select 2] is the same as the original array, without three calls to the command

ruby breach
#

Yeah, I'm trying to avoid ASLW, since it sounds like waves are irrelevant to what you're trying to do

winter rose
#

Yep, I don't blame you for that ๐Ÿ˜‰

drifting copper
#

Doing just select x spits errors. So not sure about that.

Either or, it does not change the fact that you are either under the water or 1m above the chair. Which was the original issue.

ruby breach
#

You can get real fancy and use switchMove, setDir, and attachTo to make the unit actually sit in the chair

#

Then maybe you could set the unit's position to 1 meter lower on the Z axis compared to the chair?

drifting copper
#

Will google that, thank you

winter rose
#

I meant "what you do with select"

astral dawn
#

Is there an SQF command which checks if two points are on same island?

#

I could swear I saw it somewhere... damn

still forum
#

never heard of that

astral dawn
#

๐Ÿ˜ฆ maybe it was in my dream then

winter rose
#

on the same island? Nope, no command. Maybe a function, but I can't remember anything alike in the BIS ones

#

You could trace a virtual line and check every two meters "surfaceIsWater", but it is a very raw check that would return false on e.g a creek

astral dawn
#

It would return false on U-shaped islands and such

tough abyss
#

A parabala????

astral dawn
#

Oh well, basicly we need a grid of true/false generated with some step with isOnWater (existing SQF command), then find islands with that, then convert it to another grid where each element is island ID or whatever

cunning crown
#

You could use calculatePath for a soldier and verify each node

winter rose
#

Yep

sturdy cape
#

although it seems logical to me ill ask anyways. i have a switch that is getting one of 3 conditions in form of numbers. 0,1 and 2.can i do a CASE !2 for "not 2"?

still forum
#

no you can't

winter rose
#

although you could use switch (true) and use _case != 2 @sturdy cape

still forum
#

at that point you might aswell just use if

sturdy cape
#

well i want it to be structured all the same but i get your point

winter rose
#

not saying you should, just saying you could ๐Ÿ˜„

#

SQFโ€ฆ

jade abyss
#

@astral dawn isWater or however it was called?

still forum
#

surfaceIsWater

jade abyss
#

Yeah

astral dawn
#

@slim oyster Maybe you have a solution for that for your AI? (How to check quickly if two points are on same island or not)

forest ore
#

Hinting returns scalar. How to turn the scalar to some readable form?

queen cargo
#

Map it out at Start @astral dawn
Alt. Check what location is the closest and keep a list in memory what location is on what Island

astral dawn
#

Oh sweet, you are so damn right, this might work generally

#

Although to check on which island each location is, I need to check on what island each location is xD

still forum
#

Hinting returns scalar.
what?
How to turn the scalar to some readable form?
scalar is a number, can't you already read numbers?

forest ore
#

I can if I'm shown one jajaja. Why am i being shown scalar and not an actual number

still forum
#

because its nil

forest ore
#

Ahh, copy that

forest ore
#

How does one do such combination from these so that it would then be possible to count the owned vehicles?

_vehicles = format ["OwnedBy_%1", getPlayerUID player]; _vehicles;

So that returns "OwnedBy_76................." but that does not work when doing count _vehicles since it will count the number of letters. Eh, how to combine those two things so that it won't end up being a string in the end?

exotic flax
#

all you do with format is creating a string, which in your case looks like "OwnedBy_12345678" since getPlayerUID player only returns the ID of the user.

#

so you most likely are looking for setVariable and getVariable

forest ore
#

Thanks Grezvany. Weell I took a look in the wiki for both but couldn't figure out how to combine the OwnedBy_%1 with playerUID.

winter rose
#

forEach (all)vehicles?

forest ore
#

Stuff is being saved in variable OwnedBy_%1 and I'd need to be able to count what the variable holds

winter rose
#
missionNamespace getVariable "myGlobalVar"``` then
forest ore
#

If I know the specific player's UID like so

missionNamespace getVariable "OwnedBy_12345678";
``` I'm able to return what vehicles have been saved for that certain player but the problem is that I'd need to somehow substitute the UID dynamically at any given time
winter rose
#

wut

#

then format, yes
on the variable's name

forest ore
#

Oooh Lou, indeedly. ```sqf
missionNamespace getVariable format ["OwnedBy_%1", getPlayerUID player];

winter rose
#

whenever your mind is "lost" in-between multiple pieces you know fit but can't assemble together, remember:
how do we eat an elephant? one piece at a time. The trick (and it's hard, even for a seasoned dev) is to step back, and break the issue into multiple, smaller pieces. Then to address these pieces one by one. my two cents (:

oblique arrow
#

Also remember to have your ducky on hand heh

winter rose
#

oh! that one

ruby breach
#

Rubber ducky, you're the one. You make coding so much- OH REALLY, THAT'S WHERE IT WAS!?

ebon citrus
#

I just use my special other for the same purpose

orchid sable
#

can someone help me

#

this Ends mission at the end

#

but can i have it end mission and then restart the mission again?

winter rose
#

nope

#

also, it is recommended to use BIS_fnc_endMission

hallow mortar
#

Is it possible to change a difficulty setting via scripting from the mission side?
Specifically, our server has waypoints enabled for general play, but I'd like to disable it in a particular mission as it has an emphasis on manual land nav, and the waypoint can be used to "cheat" by powergamers.

queen cargo
#

Just do not launch Missionseasy

#

In easy

high marsh
#

Or with serverCommand you can just force a revote which in turn you can manage the difficulty. But otherwise - no.

hallow mortar
#

I was hoping to do it automatically because I can guarantee that manually changing the difficulty for that mission is more work than we'll remember to do

#

oh well, guess I'll just have to live with it

high marsh
#

Do like X39 said, change the starting difficulty

#

with your server.cfg you can add forceDifficulty and have the server force the difficulty persistant across missions

hallow mortar
#

Yes. We do that. We have a custom difficulty setting that is used for all missions.

#

It has waypoints turned on, because it's meant to accommodate most missions, and in most of our missions the waypoint is useful, not a cheat.

high marsh
#

tamper a bit with showHud command. Specifically the syntax with showHud [array]

#

you can hide or show certain elements of the hud this way. Execute locally.

hallow mortar
#

The parameters on that look like they cover a variety of things that are necessary to keep, but not waypoints specifically

high marsh
#

peeposhrug Cant think of anything else really

hallow mortar
#

I found this:
player onMapSingleClick "_shift";
in a forum thread, which will allegedly take the waypoint command and throw it in the bin, but I'm unsure whether it would also interfere with standard map marker placement (it's not explained in much detail in the thread)

high marsh
#

Map markers are double click, waypoints are shift click

hallow mortar
#

oh, huh, it's right here on the onMapSingleClick wiki page:

// The following code will disable Shift+click waypoint marker creation
onMapSingleClick {_shift};

high marsh
#

onMapSingleClick likely just adds a handler to the map control to do something when a user clicks on the map once. Shift being whats returned. Not sure how that would work exactly, but likely just exits when shift is held.

winter rose
#

question, does anyone have issues with lip files?

(on a side note, I have wss sounds that work well with kbTell, but don't work well with say)

high marsh
#

say, say3d, etc commands don't work with lip files iirc.

#

Just WSS, OGG iirc.

winter rose
#

they did ๐Ÿ˜ข

high marsh
#

I dunno. All I remember is there is a sound command that doesn't like the sound of LIPS

winter rose
#

in OFP (and later), samename.ogg and samename.lip would have lips moving (declaring only the .ogg in CfgSounds/CfgRadio)

high marsh
#

๐Ÿ‘ ๐Ÿ‘„ ๐Ÿ‘

#

peeposhrug
Post the codes.

winter rose
#

heh, just plain

class CfgSounds
{
    class StartPlayer1
    {
        name = "StartPlayer1";
        sound[] = { "Sound\StartPlayer1", 1, 1 };
        titles[] = { 0, "StartPlayer1" };
    };
};```or ```cpp
class CfgRadio
{
    sounds[] = {};
    class StartPlayer1
    {
        name = "StartPlayer1";
        sound[] = { "Sound\StartPlayer1", db, 1 };
        title = "StartPlayer1";
    };
};```
and ```sqf
player say "StartPlayer1";
// or
player groupRadio "StartPlayer1";
high marsh
#

Hmm, have you tried declaring the extension in the sounds array?

winter rose
#

negative (but the sound file is properly read, and the subtitle reads properly)

high marsh
#

Being read you mean it's not seen as missing? Subtitles work tho.

winter rose
#

the sound works, the subtitle works, but the lips won't move

#

it is weird reallyโ€ฆ

question, does anyone have issues with lip files?

(on a side note, I have wss sounds that work well with kbTell, but don't work well with say)

the side note is about me using wss files that I know work! and declare them in CfgSounds too, and say makes the sound skip like read at 100ร— speed without changing the pitch

high marsh
#

Oh no. Not the lips. Uhhhhh...is it some sort of FSM state?

winter rose
#

the main issue here is: generated .lip files are not considered by Arma when using say.

warm vapor
#

Is it possible to create a mod that modifies a modded armors protection values? Like, let's say Mod @A introduces 'Cool_Vest', which has a model and everything, but it's like wearing paper. I -do not- want to take their work without asking, I merely want to create a patch that modifies the value of their mod to what I need

exotic flax
#

Yes, and relatively easy to do. Although that fits more in #arma3_config since it requires you to override the original configs of the objects.

warm vapor
#

Fair enough!

worn forge
#

Can anyone point me in the right direction to use a p3d file as a graphic overlay on the player's HUD? Specifically I'm creating a camera that emulates the look of a UAV (and is way more controllable) and want to use the UAV turret hud model as an overlay (which is a p3d).

exotic flax
#

unless you want to put an object in front of the players head (which is also visible by other players), I suggest just putting an image on the screen of the user

winter rose
#

@exotic flax there is (was?) a way to display 3D objects such as a sphere or whatnot e.g cutObj

@worn forge or you may createVehicleLocal a simple object that you would position on each frame (through event handler)

worn forge
#

I must have used the wrong terminology as that's not what I'm after. You know the vignette you see when you use night vision goggles? That's what I refer to as an overlay - a much finer effect is used when you perceive through the turret of the UAV.

winter rose
#

pp Effect then - but you can only une NVG/TI and add "filters" (Arma\ยฎ Instagram Edition), but not create a completely new new view mode @worn forge

drifting copper
#

How do I getPos by object variable name? Not finding much on google.

Concept is to set player position to a specific object activated by a onplayerrespawn.sqf

runic edge
#

It s just getPos varname

drifting copper
#

@runic edge thank you, I was using "testobject" instead of just testobject

runic edge
#

You're welcome ;)

drifting copper
#

So not too sure how this works yet. Basically just learning and trying to figure out how to do things without using triggers.

If I run

player setPosASL [getPosASL RSPN select 0, getPosASL RSPN select 1, getPosASL RSPN select 2];

edit : RSPN is a object variable name
through a onPlayerRespawn.sqf and a onPlayerConnected.sqf will it only affect the player connecting/respawning or will it effect everyone in the mission?

The 2 .sqf files I have on init.sqf / execVM

winter rose
#

it's the same as doing ```sqf
player setPosASL getPosASL RSPN;

drifting copper
#

@winter rose can you read the question?

winter rose
#

@drifting copper let me type, only then you can complain

#

also onPlayerConnected.sqf seems to be a server-side script so beware of the player variable there

drifting copper
#

So got the answer for onPlayerRespawn, thank you.

So if onPlayerConnected is server side I should define player to local client? Does it change if I run it through initPlayerLocal instead?

winter rose
#

this file seems not to be an Arma-called file but a framework file, if that's the case you should refer to their documentation

drifting copper
#

Roger

runic edge
#

How are supposed to use initServer.sqf and initPlayerLocal.sqf ?

winter rose
#

properly

runic edge
#

Yeah using them properly should help

winter rose
#

Have you checked the above Event Scripts link?

runic edge
#

This one ?

winter rose
#

Yes

runic edge
#

Yeah (only for the files I'm interested in though) but it only tell me where and when those files are executed

winter rose
#

well, they are init* files
they are run once

runic edge
#

Maybe if I rephrase my initial question it 'll be clearer

#

What should be executed on the server and what need to be treated locally

#

?

#

And yeah Lou I know local stuff should be executed locally and the rest don't need to ๐Ÿ˜ญ

winter rose
#

Multiplayer_Scripting kinda says it, the server should deal with mission data, synchronisation, checks, and the fewer code on the client the better

runic edge
#

I figured that out but I kinda don't understand it somehow

winter rose
#

The server has the mission and data responsibility ; the client should only use fancy stuff

runic edge
#

Like

#

Please define fancy stuff

winter rose
#

e.g UI, graphical fancy, pp Effects

#

what is your current situation?

#

@runic edge a client can disconnect, be low perf, has high ping
Everything that is mission-critical should be ideally done server-side (except for specific situations, like check if something is on a player's screen etc)

runic edge
#

If I need to allowdamage false;

#

On an object

#

I understand that it s server

winter rose
#

it's a local arg, global eff command

runic edge
#

Wut

winter rose
#

If it is in an "action" the player clicks, then do it player-side yes

#

no problem here since the action needs a player, and if the player disconnects then nothing happens. If there are other effects though, it depends

runic edge
#

Can you explain this pls

#

it's a local arg, global eff command

winter rose
#

it is explained on the allowDamage wiki page and in Multiplayer_Scripting ; the object has to be local to the machine that runs the command

#

(@cunning crown are we preventing you from typing? ^^)

runic edge
#

Just sending not typing

cunning crown
#

You're faster than me, I've no time to answer xD

winter rose
#

and on mobile! โ˜๏ธ

runic edge
#

it is explained on the allowDamage wiki page and in Multiplayer_Scripting ; the object has to be local to the machine that runs the command

#

But objects placed on Eden are local to the server

#

Then I'm placing it in initserver

#

Right ?

winter rose
#

again, it depends

#

what is the real, actual situation of yours?

#

the command should be run on the server, yes

but:

  • is it after a player action?
  • is it straight from the beginning of the mission?
  • will the object change locality?
cunning crown
#

Can you explain this pls
it's a local arg, global eff command
local arg means that you must be the one who created the object, the player is always local to the client; the vehicle in which the player is also local to the client, but if you're client X and you're only a passenger in the vehicle, then the vehicle will be local to the one driving it. If no one is in the driver place, it is then local to the server (not sure).
Pre-placed mission objects are owned by the server, unless vehicle, then refer to what I said before

global eff just means that every client will see the repercussions of that command on their machine

winter rose
#

"run on the server" can also mean a remoteExec from a client

#

a vehicle turns back local to the server if empty yes
else the locality depends on the seats used by players

runic edge
#

the command should be run on the server, yes

but:

  • is it after a player action? No
  • is it straight from the beginning of the mission? No
  • will the object change locality? Need to check
winter rose
#

tell - us - the - current - situation dammit ๐Ÿ˜„

runic edge
#

I'm reworking some missions templates and I want to clean the Eden s in it and call this in files

#

After what you 've told this morning

#

I just don't know how ace and the r3f logistics handle localities

winter rose
#

what is the scripting situation needing allowDamage?

runic edge
#

Allow damage

#

But one object may be moved by a player

winter rose
#

moar details plz

runic edge
#

What more is it to saaaay :/

cunning crown
#

What kind of object is this; when will you dis/enable damage; ...

winter rose
#

the context of your script!

runic edge
#

The object is a flag

#

The flag is used to teleport a player from fob to ob

winter rose
#

it may be moved?

runic edge
#

Yeah

winter rose
#

and you want it to be destructible at one point?

runic edge
#

No

#

Always indestructible

cunning crown
#

Then do the allowDamage on the serveur

winter rose
#

ah yes, we are all three French ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ˜Ž

#

if always indestructible, indeed, server exec in initServer.sqf and that's it

runic edge
#

Ok that's what I understood from earlier explanations

cunning crown
#

Sorry to disappoint you @winter rose but I'm Swiss (french speaking side tho) ๐Ÿ™ƒ

winter rose
#

the good side ๐Ÿ˜›

#

I noticed some "exรฉcute" from you earlier, I spotted but needed confirmation ^^

cunning crown
#

I should have switched my keyboard to German to confuse you ๐Ÿ˜ˆ

winter rose
#

nein nein nein!

runic edge
#

What I still can't get is : why doesn't the clients need to know that this object isn't allowed to be damaged ?

winter rose
#

because the Effect is Global

#

the game broadcasts the information

#

so the clients get the info automatically

cunning crown
#

That's like the owning a pet, if you shout that everyone can pet him, everyone around you will know, but only the owner can allow that, not a random stranger

winter rose
#

haha
I like the comparison btw

runic edge
#

Ok I get that

#

Now why aren't the effects of all commands like that ?

winter rose
#

because some stuff, you want to keep to yourself and not spam the network

#

(also, some commands were not made with multiplayer in mindโ€ฆ)

#

also, some stuff only the owner can change, for security reasons

cunning crown
#

And if you want to show something to only one user, no need to propagate that to other clients

runic edge
#

Ok then I minize the impact from a command on everyone s perfs by running it only where it makes sense

winter rose
#

if you did run it everywhere, it would have a slight CPU impact (processing the command) but no impact at all regarding effects

runic edge
#

But those two logics seems to be quite contradicting each other's

winter rose
#

like "I CAN PET YOUR DOG!" and the guy says "no."

#

maybe you will understand it here with e.g addAction:
you want the user to have an action in his menu to e.g self-detonate

if the action was added to him for everyone, then everyone closing to him could trigger this action, same as with a laptop (-:

runic edge
#

My brain can't take this

#

"to him for everyone"

#

It's either for him or everyone

winter rose
#

when you do a "hack computer" action - the action is added to the computer on all clients

#

but! what if you wanted a PC hackable only by BLUFOR, while OPFOR are defending it?
then you addAction only on BLUFOR clients

cunning crown
#

If you put a button on hist chest which will represent the self detonate action, everyone one will be able to press the buton but it will detonate him; addAction to him for everyone

runic edge
#

Ok you 're trying to say he alone will be able to see / take damage from the explosion if I miss the for everyone part ?

winter rose
#

addAction effect is Local, which means the action will only appear on the client that executed the command, not any other client.

runic edge
#

Okkkkk I think I just misinterpreted "effect"

winter rose
#

yes, effect of the Command - not effect of the addaction's script ^^

runic edge
#

What you call effect is just having the interaction in your menu

winter rose
#

Better now?

runic edge
#

Yeah much clearer !!! Thanks

tough abyss
#

Ive set up a mission where units spawn on a carrier and their respawn point is the carrier, issue is warlords base module is being used to respawn them and its spawning them underneath/around the carrier, do i require a script to ammend this? And if so can someone point me in the right direction

jade abyss
#

woops:
-1.#IND ๐Ÿ˜‚

#

I think that number was too big

exotic tinsel
#

Does anyone know how to tell ai to get out of a taru troop transport pod? took an hour to make sure it was completely unlocked but not the dont use the getout waypoint on them. also when we use moveout or action getout they just dismount and then get back in. wtf.

winter rose
#

unassignVehicle @exotic tinsel ๐Ÿ˜‰

exotic tinsel
#

nope didnt help

#

they just got back in

#

its crazy

winter rose
#

leaveVehicle ?

#

also, be sure to test in an empty VR map and just your situation. if it works there but not in your full mission, something else in it impacts it

exotic tinsel
#

just tried that one, did nothing. they didn't even get out

jade abyss
#

action?
Not sure anymore, how i did it ๐Ÿค”

#

_unit action ["Eject", vehicle _unit];

#

_unit action ["getOut", vehicle _unit];

winter rose
#

works very well with allowGetIn

exotic tinsel
#

ill give them all a try later. getting too frustrated with it. thx guys

tiny wadi
#

here is a quick video of a script I made that uses the A* algorithm for finding the shortest route. Still have a few optimizations to throw in there for reducing the number of roads it has to check cost functions of but it works pretty quickly if you dont try to go from the bottom left of the map to the top right ๐Ÿ˜›

astral dawn
#

That's cool @tiny wadi

#

How do you detect crossroads?

tiny wadi
#

That was a pain in the butt, not going to lie. It was a big issue when I was testing using stratis. So the way it works is by checking each nodes neighbor (a node is a segment of the road), so I used roadsConnectedTo for that, but obviously that wouldn't get the intersections that weren't setup correctly. So I ended up also putting in a check for the road segments that weren't within roadsConnectedTo but where also within a 20 meter radius.

#

One thing I want to do to improve it is add the ability to select an island, and then it will give you the path to the closest road segment to that island

#

Also add automatic updates and such

#

Gotta do a bit more research for that though

still forum
#

Online SQFVM is back up now. But no cba includes as planned :U

winter rose
#

looks really neat @tiny wadi !
especially when you can see it into action ๐Ÿ™‚

tiny wadi
#

I sat there for about an hour the other night just watching it work ๐Ÿ˜›

exotic flax
#

Wasn't there already an A* star and Dijkstra algoritm for Arma 2 and 3?

astral dawn
#

Sure

exotic flax
#

PS. Not saying that it isn't impressive to make, although I remember a forum post about it

astral dawn
#

Lots of them

tiny wadi
#

Yeah I saw a few of them before I made mine, I mainly did it because I just wanted the challenge

#

It was fun

exotic flax
#

That's the spirit ๐Ÿ˜‰

tiny wadi
#

The only problems I have run into mine is 1. the optimization, and 2. I will select a road segment, but then once the algorithm gets to it, it doesnt realize it has found it and then continues searching

astral dawn
#

What do you mean 'doesn't realize it has found it'?

#

So you specify the end node, and while walking along nodes you can compare them... somehow it fails?

tiny wadi
#

Yes

#

Not sure why

astral dawn
#

are you comparing object handles?

tiny wadi
#

And it only happens sometimes

#

Yeah

astral dawn
#

Damn it's strange! It should never fail

tiny wadi
#

I believe the issue occurs with how I select the "end" node

#

I take the position where the user selected and just get the closest road to that

#

But that wouldn't make much sense for why it would fail

#

and it only occurs sometimes, so I've got to do some debugging

astral dawn
#

Are you sure then that it has evaluated that node?

tiny wadi
#

Not entirely, thats what I'll need to do is double check that the node has been evaluated

astral dawn
#

Yes I'd log all the checked nodes to make sure

tiny wadi
#

It could also have to do with the way I store the roads index within my node array as well. Altis has 30,000 roads so what I did to be able to get the specific nodes index as quickly as possible was create hidden sign objects locally at every road when the mission starts to store that roads index in the array

#

Is it possible to setVariable on the actual road?

#

That could save me from creating those objects, and then use the direct object reference rather than searching for the nearest sign arrow

astral dawn
#

Not sure, IIRC the other GPS used a hashmap for something like that

#

you could do str the road's object handle

#

then setVariable / getVariable with it in some dummy object (namespace)

#

but I don't remember what he used it for

tiny wadi
#

Ahhhh, yeah that could work. That'd save a ton of objects from being created on the client

tough abyss
#

is it possible to exclude null object from a count of a variable?

_house getVariable ["containers",[]];

count _containers;

some null object are stocked in this var and I want to not count them.

tiny wadi
#

If you take a look at example 2, i believe that will do what you need

#

@tough abyss

#

you could do {_x != objNull} count _myArray;

hollow gate
#

General question but I was looing into how to go about doing this.
I wish to take multiple scores from players on Simple targets and relay it to one computer so an instructor could check the scores.

#

is this possible?

exotic flax
hollow gate
#

oh thanks

#

I see getShotsDataFromTargets

#

I imagine that would work

exotic flax
#

just be careful with BIS_fnc_target, since it only works with one (vanilla) object

hollow gate
#

well

#

I know damn near nothign about scrpting

exotic flax
#

Unless you build a mod and add support for other targets as well

hollow gate
#

I have a reset script that resets the score working

#

but how to use getShotsDataFromTargets

#

I have no idea

#

hah im not building a mod LOL

#

I havent the foggiest clue how anyway ๐Ÿ˜›

#

this getShotsDataFromTargets _Tagetname;

#

?

exotic flax
#

just add ["uiOpen", [myTarget]] call BIS_fnc_target; with addAction to a laptop and it will show the scores

hollow gate
#

thats but what if I only want it to show certain targets

#

oh duh

#

sorry the Mytarget part

#

sorry

exotic flax
#

you'll need one for each target ๐Ÿ˜‰

hollow gate
#

soooo its not possible to have one score board show all the the targets data at once

#

or more specifically

#

player 1: 2 hits
player2: 4 hits

exotic flax
#

not with that system

hollow gate
#

damn:(

#

thanks anyway

meager ember
#

!purgeban @magic lance 14d link without description, advertising in wrong channel #rules

lyric schoonerBOT
#

*fires them railguns at @magic lance* ร’_ร“

spice axle
queen cargo
#

??

#

What is that supposed to do different?

winter rose
#

++ and += first, clearly

#

prioriteeez!

unique sundial
#

:= looks like penis with testicles

winter rose
#

you have a weird anatomy KK

runic edge
#

what is the proper way to use a if statement to check if an array is equal to something ?

then ... ```
cunning crown
#

The = is used to asign a value to a variable; to test you need either == or isEqualTo

#

And for arrays, you should use the later

runic edge
#

will try with isEqualTo !

#

cheers mate

#

It works thanks !

cunning crown
#

๐Ÿ‘

runic edge
#

would you mind helping me with arrays as well ? i need to do basic vectorials additions but in sqf [1,2,3]+[4,5,6] returns [1,2,3,4,5,6] instead of [5,7,9]

cunning crown
#

Iirc there's a group of command called vector... on the wiki

runic edge
#

found it

#

thanks

spice axle
#

@queen cargo it is a short it for assign a value to a var and check the expression for true or false

example:

if (a := 10 > 5) then {
    systemChat str a;
};

Outputs: 10
a is assigned the output of the expression and the if statement is based on the expression

cunning crown
#

But we already know if it's true/false since it's in an if-statement. Elif, +=, ++, ... would be a bbetter addition

spice axle
#

This was just a basic example there are more complex variants for it

#

Ah and i messed up of course a is not True it is 10

potent river
#

ive been trying to make a helicopter cut scene with unit capture it works kinda but the helicopter doesn't turn on it flys without the engine on i don't know if it's a problem in my script or something but I would like so advice/help

this is the mentioned script:
_movementdata = <mdata> ;
//_firingdata = <fdata> ;

_sequence = [VehicleName, _movementdata] spawn BIS_fnc_UnitPlay;
//[VehicleName, _firingdata] spawn BIS_fnc_UnitPlayFiring;
waitUntil {scriptDone _sequence};
hint "Playback finished";

winter rose
#

@potent river engineOn
unitPlay is only for vehicle's position and direction, nothing else

#

(unitPlayFiring captures firing too, obviously)

potent river
#

alright thats good to know but where do i paste the engineOn in the heli init?

winter rose
#

just before unitPlay?

potent river
#

Sorry if it's a dumb question but i never really played with arma coding in any way i don't have unitPlay like that only in BIS_fnc_UnitPlay form

winter rose
#

yes that's what I meant

#

I was on mobile so I didn't want to type it all

potent river
#

alright thank you

runic edge
#

hello again, i have a problem with a piece of script copied bellow with returned values
{
private _markerHalo = (markerText _x splitString " ");
//hint str(_markerHalo); sleep 3; hintSilent "";
//hint str(_markerHalo select 1)); sleep 3; hintSilent ""; /!\ returns 3000
//hint str(parseNumber str(_markerHalo select 1)); sleep 3; hintSilent ""; /!\ returns 0
if ("DZ" in _markerHalo)
then {
_coord2D = getMarkerPos _x;
//hint str(_coord2D); sleep 3; hintSilent "";
_coordZ = [0,0,parseNumber str(_markerHalo select 1)];
//hint str(_coordZ select 2); sleep 3; hintSilent "";
};
}forEach allMapMarkers;

#

I don't understand why but parseNumber _markerHalo select 1 returns an error as it needs a string as an input ...

winter rose
#

please format your code with

```sqf
/* your code */
hint "Hello There";
```
โ†“

#
/* your code */
hint "Hello There";
jade abyss
#

```sqf
if(true)then{};
```
โ†“

if(true)then{};
#

๐Ÿ˜›

winter rose
#

uv bin ninja'd eniwe

jade abyss
#

after 100000 Edits ๐Ÿ˜‚

winter rose
#

shhhhhhhhh no one saw that ๐Ÿ˜„

jade abyss
winter rose
#

SO ANYWAY

{
  private _markerHalo = (markerText _x splitString " ");
  //hint str(_markerHalo); sleep 3; hintSilent "";
  //hint str(_markerHalo select 1)); sleep 3; hintSilent ""; /!\ returns 3000
  //hint str(parseNumber str(_markerHalo select 1)); sleep 3; hintSilent ""; /!\ returns 0
  if ("DZ" in _markerHalo)
  then {
    _coord2D = getMarkerPos _x;
    //hint str(_coord2D); sleep 3; hintSilent ""; 
    _coordZ = [0,0,parseNumber str(_markerHalo select 1)];
    // hint str(_coordZ select 2); sleep 3; hintSilent "";
  };
} forEach allMapMarkers;
#

I don't understand why but parseNumber _markerHalo select 1 returns an error as it needs a string as an input
you are using str on a string, you double the quotes

#

parseNumber can parse "5", not ' "5" '

runic edge
#

Ok parseNumber _markerHalo select 1 returns an error as arma think that i m trying to use array as an input

winter rose
#
parseNumber (_markerHalo select 1);
#

*magic* ๐Ÿ˜

#

also str is not a JS function; no need to always wrap arguments between brackets

#
str player / str (player) // is the same
runic edge
#

Ok will try thanks !
Didnt get the part on js though

cunning crown
#

In JS to stringify something you would do player.toString() or Object.toString(player) for example.

runic edge
#

Ok and i dont need the ()

winter rose
#

only if you need it to force operation priority (like with _markerHalo select 1 where you wanted the select to happen before parseNumber)

runic edge
#

Ok gotcha thanks

ruby breach
#

Or, a much worse suggestion, is you could use a_hash_b ๐Ÿ˜ˆ

#

(Seriously though, don't)

cunning crown
#

is fine, I like it

winter rose
#

b-but it's bad!

cunning crown
#

Why is it?

winter rose
#

I believe the hatred towards this command is mostly due to
1/ it was not needed and came out of nowhere
2/ it "took someone" to do that instead of something else
3/ code readability

#

it is not bad per se , I mean the command doesn't have a performance impact or anything, it's justโ€ฆ a cheap version of select with higher precedence, that's it

brave jungle
#

how do I turn BIS_fnc_configPath into a proper config path i.e config file >> "blah" - it's currently returning ["configFile","Cfg"]; etc.

winter rose
#

you're curious, aren't you

brave jungle
#

using ```
_side = "west";

{ systemChat str ([_x] call BIS_fnc_configPath) } forEach ("true" configClasses (configfile >> "CfgGroups" >> _side))

#

in debug

#

I read you can have a strict param

#

but

#

it doesn't accept?

#

I did [_x, true] call blah

#

but it said error bool expect array

#

oh

#

because index 1 not 2

#

silly

winter rose
#

format (2nd param) doesn't take bool yes

#

indeed, you got it. I was your rubber duck ๐Ÿ˜„

brave jungle
#

๐Ÿ˜„

#

everytime

#

I swear

#

I post and then fix myself

#

also any ideas on my question in #arma3_editor ? ๐Ÿ˜ don't hurt for linking :P

#

literally can't find doc on it anywhere

winter rose
#

!ban @brave jungle 1y no crossposting! #rules ๐Ÿ‘€

๐Ÿ˜„

brave jungle
winter rose
#

@cosmic lichen may know

brave jungle
#

Ah yes, The resident 3DEN expert

#

fingers crossed ๐Ÿ˜„

winter rose
#

try cameraOn in the console maybe?

cunning crown
#

3/ code readability
May be the only point that make sense, although I find the hash more readable but everyone disagrees with me ยฏ\_(ใƒ„)_/ยฏ

winter rose
#

you're supposed to stay neutral ๐Ÿ˜„

brave jungle
#

๐Ÿ˜…

#

fml

winter rose
#

๐Ÿ‘๐Ÿ‘๐Ÿ‘

brave jungle
#

i'm sure that wasn't a think but still

#

Thanks for being a rubber duck haha ๐Ÿ˜„

winter rose
#

are you saying I am a quack??

jade abyss
#

I believe the hatred towards this command is mostly due to
1/ it was not needed and came out of nowhere
2/ it "took someone" to do that instead of something else
3/ code readability
it is not bad per se , I mean the command doesn't have a performance impact or anything, it's justโ€ฆ a cheap version of select with higher precedence, that's it
tbh, i switched instantly to it.
_arr#0 > _arr select 0

winter rose
#

ooooh so that's why I have feathers on my bum

brave jungle
winter rose
#

in order to cover my buttquack! ๐Ÿ˜„

brave jungle
#

oh my..

winter rose
#

no facepalms? I am disappoint

#

tbh, i switched instantly to it.
another reason you are not an example to follow @jade abyss ๐Ÿ˜„

jade abyss
ruby breach
#

_arr param [0]

winter rose
#

params ?

#

I don't think I used select for anything but positions (select 0, select 1, etc)

ruby breach
#

Nah, param with only an index provided. Because why do things the simple way. :p

winter rose
#
_array select (parseNumber str (1-1));
modest temple
winter rose
#

with love

#

setObjectTexture ?

modest temple
#

that textures the middle monitor

#

how do i texture the rest of em

#

it has multiple texture areas

winter rose
#

another index of setObjectTexture?

modest temple
#

propably yeah

#

but how exactly

winter rose
#
_objectname setObjectTexture [0, "\pboname\texture.paa"];
_objectname setObjectTexture [1, "\pboname\texture2.paa"];
modest temple
#

so the 0 and the 1 are the different screens?

winter rose
#

that's the different index in question yes

modest temple
#

sweet, thank you

winter rose
#

๐Ÿฆ†

#

๐Ÿ˜„

brave jungle
#
_factions = [];
_configgroups = "true" configClasses (configfile >> "CfgGroups" >> _side);
{
  _factions pushBackUnique ([_x, "", true] call BIS_fnc_configPath); // not adding element
} forEach _configgroups;

systemChat str _factions;
#

am I being dumb

#

array is empty

#

yes nvm

#

_side not defined

winter rose
#

๐Ÿคฃ ๐Ÿฆ†

brave jungle
#

See what I Mean

#

haah

ruby breach
#

Lou makes for an excellent ducky

brave jungle
#

100%

winter rose
#

*ruffles feathers*

#

hence the French cancan ๐Ÿ˜„

brave jungle
#

aha

still forum
#

@spice axle

should be super easy to implement.
How do you know that? (Hint: its not, not at all. Commands don't know the names of variables they've been given.)
I would rather prefer = return the asssigned var, so you can do a = b = 0; but that needs changes in 3DEN too which is annoying.

winter rose
#

any luck to have init/trigger fields to not need 0 = ... ?

still forum
#

exactly thats the "3DEN changes" i wrote

#

I hope there is a chance to fix that

#

does @unique sundial have a opinion on that?

runic edge
#

Does it exist a complementary command to isNull

winter rose
#

@runic edge please elaborate?

runic edge
#

isNull checks if an object is absent
what would i use if an object is present

#

like is there a more elaborate command than !isNull ?

winter rose
#

well nope ๐Ÿ˜„

jade abyss
#

Otherwise no idea what you want, with that limited information. What are you trying to achieve, for example?

runic edge
#

i'm trying to run a script if a certain object is present

jade abyss
#

isNull

#
waitUntil{!isNull certainObject};
doStuff
if(!isNull certainObject)then
{
  doStuff
};```
*
#

No idea where the problem with isNull is/was ๐Ÿค”

runic edge
#

was just looking if they were a command ~= !isNull

jade abyss
#

And you got it now (example above)?

winter rose
#
if (not isNull obj) then { /* */ };
```yup
runic edge
#

yeah kinda

jade abyss
#
waitUntil{!isNil "certainObject"};

if(!isNil "certainObject")then

if var is not set yet and will be set later*

runic edge
#

i rather "know i cant get it" ๐Ÿ˜‚

jade abyss
#

๐Ÿค”

#

What about, you give us some more informations. Like, why is isNull not enough?

runic edge
#

nonono

#

it's not that it s aint enough

jade abyss
#

then i am completely confus0rd

runic edge
#

it's just that i thought that they created a special function for it

jade abyss
#

for "isNull"?

#

Yeah, it's called "isNull" ๐Ÿ˜„

runic edge
#

for "**!**isNull"
i found more logical to test if something is present than if it's not ^^

jade abyss
#

Nah, this way around is better

winter rose
#

not in computer's logic :p
better check that object is null (easy) instead of checking if the object "is not any of all the other types"

#

you will get used to it, don't worry ๐Ÿ˜‰

vast lantern
#

I am currently making a database of all Items mostly because of weird (camo)variants, to help the Antistasi mod. I would like to avoid having to manually type as best as I can. For that I wanted to ask if there is any way to get a print of all the "displaynames"? I had no problem with getting the "classnames", but can't seem to find a way to export the "displaynames".

PS: I know that they shouldn't be used for any coding, I would just like to have them for easier visualization of the data if it is possible without to many hurdles. Especially as I am rather handicapped arma coding/scripting wise.
I also hope this is the right channel for asking that question.

still forum
#

getText configclass >> "DisplayName"

cunning crown
#

When remoteExecuting a function with JIP = true from the server before any client loads the mission, the function will not be remoteExecuted to JIP players, is this behavior excepted?

winter rose
#

hm, weird?

cunning crown
#

Yeah, I would except it to be put in the queue (?) regardless of the amount of clients

winter rose
#

totally, yes

#

is your function happening in preinit?

cunning crown
#

Nop, postInit, the remoteExec was targeted with -2 and setting it to 0 fixed it

winter rose
#

well

#

fyi -2 would not be good on a player-hosted mission

cunning crown
#

Well I don't know if the server is supposed to be a player in our case

winter rose
#

some do```sqf
[0, -2] select isDedicated;

cunning crown
#

Ah yeah, you're right @winter rose , it was a self-hosted mission, that's why it wasn't working but while testing with self-hosted I've noticed something:
When no clients joins, ever, and if you have the target as -2, you'll never get the remoteExec as the host but as soon as another client spawns, the host and they other clients get the remoteExec

winter rose
#

wait, so:

  • exec on -2 (clients only)
  • you host, nothing happens
  • someone connects, they receive the remoteExec
  • and you too?
cunning crown
#

Yep, me as the client/server

winter rose
#

it is weird indeed. what did you remoteExec? hint?

#

(I mean, not a global effect command?)

cunning crown
#

No no, a variable, global variable so it should stay local to the client

winter rose
#

hm ok, yes indeed
a bit weird then

#

unlessโ€ฆ you did remoteExec a function which remoteExec'ed it ๐Ÿ˜„

cunning crown
#

That's the function, it's called from the ss_fnc_initServer by [] remoteExec ["this_function", -2, true] which is in postInit

systemChat format ["#changeWeapon %1", "undefined"];
_weapon = "none";
systemChat format ["#changeWeapon %1", _weapon];
call ACE_fnc_arsenal;
// Et voilร , la variable change
systemChat format ["#changeWeapon %1", _weapon];
hint "Test";
GLOBAL_VAR = 1;
winter rose
#

did you get the systemChat?

#

(and the hint)

cunning crown
#

Yeah in the briefing but they're not what I tested, just leftover from an example to prove that private should be used everywhere. But for the JIP client they fire twice.

#

And for the server/host only once, although it should also be the case for the JIP as nothing can trigger that function except the remoteExec in the serverinit

winter rose
#

zoooโ€ฆ weird?
maybe -2 considers ServerClient as client indeed then

cunning crown
#

But it should be executed right away then, not waiting another player to update that queue ?

winter rose
#

if this is the case, that is what I would expect

#

can you try a simple:

HYX_fnc_hint3s

[] spawn { sleep 3; hint "hint3s received"; };
```and use it w/ 0 & -2 ?
#

e.g```sqf
remoteExec ["HYX_fnc_hint3s", -2, true];

errant jasper
#

For debugging purposes, I would pass the clientOwner along with the message, and on the receiving side output put the sender and the local clientOwner.

cunning crown
#

Wait, I think I may have put the condition the wrong way ๐Ÿ˜“

winter rose
#

:3

cunning crown
#

Yeah that was the case, put isServer instead of !isServer ๐Ÿคฆ

winter rose
#

\o/

#

Debug easily with Lou Montana\ยฉ the Rubber Ducky! ๐Ÿฆ†

cunning crown
#

๐Ÿฆ†

errant jasper
#

That explains the double runs, not why -2 caused the server to do anything

restive leaf
#

Broken clock is right twice a day ๐Ÿ˜‰

errant jasper
#

3 times (occasionally) with daylight saving times

cunning crown
#

That explains the double runs, not why -2 caused the server to do anything
Yeah you're right, I'll check what else I've changed (since I cleaned the mission to be sure it was not another function causing that)

#

Oh well, that's embarrassing, I had the wonderful idea to put the condition after the script... I should stop thinking after 9pm, I'm not successful at that ๐Ÿ˜–

winter rose
#

debug simple, think easy

#

nao ```sqf
goto "bed"
exit

:bed
๐Ÿ›Œ

cunning crown
#
if (awake Heyoxe) then { Heyoxe moveInDriver Bed } else { doGetOut Heyoxe }; // The Arma way
winter rose
#

stackoverflow if you loop that; you should add a ```sqf
sleep (86060);

exotic tinsel
#

how can i delete all ejection seats from the map with out doing nearestobjects on the whole map and lagging my server?

winter rose
#

allMissionObjects ?

#

@exotic tinsel ^

exotic tinsel
#

hmm what type would that be though?

winter rose
#

check the config viewer for parent class (or wiki's classes)

exotic tinsel
#

yeah i think that is even worse than nearest objects on performance mate.

winter rose
#

it's "cheaper" but still impacting.
you can detect by script when someone ejects then

#

classes:
B_Ejection_Seat_Plane_Fighter_01_F
O_Ejection_Seat_Plane_Fighter_02_F
I_Ejection_Seat_Plane_Fighter_03_F
I_Ejection_Seat_Plane_Fighter_04_F

yeah boii

#

or try entities , too

#

(although I thought entities was only about men/animals)

exotic tinsel
#

this is what i get [bin\config.bin/CfgVehicles/Land_FirePlace_F,true]

#

what am i doin wrong?

winter rose
#

you didn't call anything?

#

copy/pasted their example in debug console, worked just fine

#

@exotic tinsel ^

exotic tinsel
#

HMM

grave lotus
#

I'm attempting to double incoming damage on a vehicle/tank and none of the init values I've tried appear to be having any effect. Is there best way to handle this?

exotic flax
#

you'll need to use a Damage Event Handler, and can't be done with a single line of code in the init

grave lotus
#

is that because of the damage handler and individual sections?

exotic flax
#

it's just how Arma handles damage and allows us to modify it

grave lotus
#

copy that

signal star
#

Theres clearItemCargo and clearItemCargoGlobal, can someone explain what the actual diffrence between them is? does clearItemCargo desync the inventory in MP? or would I just want to use global version?

signal star
#

NVM i just finished testing. Always use clearItemCargoGlobal in MP. clearItemCargo even when executed globally would only affect the executing client.

unique sundial
#

Is BIKI description not enough to tell the difference?

heavy patrol
#

Hi, I'm having a slight trouble with functions, I wanted to use one to ease the load for a group teleportation, I have the path working, but the function viewer displays an empty function file and I can't call the function it contains. Any idea what I could've done wrong ?

unique sundial
#

Have you recompiled it after adding the code?

heavy patrol
#

actually, the option to recompile isn't even available

#

so I reloaded the entire scenario, not much new result, it's still empty

#

aaaand, it just told me that the file was not found... ?
File name : CustmFunc.sqf
Editor says "fn_CustmFunc.sqf" not found
Displays : core\fn_CustmFunc.sqf

#

maybe I should add the prefix to the file

#

WTF

#

it worked, sounds pretty weird, but okay

silent latch
#

Anyone know a way to make it so initServer is jip or any work arounds for that

#

Or any ways to exec a lot of code to the server

unique sundial
#

initPlayerServer?

still forum
#

@cunning crown

if (awake Heyoxe) then { Heyoxe moveInDriver Bed } else { doGetOut Heyoxe }; // The Arma way
so.. when you are awake you go to bed, and when you are asleep you leave the bed? ๐Ÿค”

cunning crown
#

Uh well, that's a prototype, things may not work as excepted ๐Ÿ™ƒ

winter rose
#
while { alive Heyoxe } do {

  waitUntil { sleep 45 * 60 ; getFatigue Heyoxe > 0.8 || not alive Heyoxe };
  if (not alive Heyoxe) exitWith {};
  Heyoxe moveInDriver bed;
  Heyoxe engineOn false;

  sleep 8 * 60 * 60;
  Heyoxe engineOn true;
  doGetOut Heyoxe; // exception on Sunday
};
still forum
#

syntax error, missing ; in line 6

#

also why only check isTired every 45 hours? I'd check every 10 minutes. maybe 30

winter rose
#

45 min is the sleep cycle

#

if you miss the train, you have to take the next one
(can't find the missing ;)

#

if you put that into Arma, isTired is not a command :p

runic edge
#

Lets create a wiki page anyway

still forum
#

(can't find the missing ; )
then you don't know arma well enough ๐Ÿ˜„

#

engineOne is typo, command doesn't exist -> missing semicolon error

winter rose
#

come ooon, obvious typo

#

lemme be!

heavy patrol
#

mmmmm, I am being troubled

#

A teleport function isn't working, and I can't find why

winter rose
#

as far as I can say, it's because there is a problem.

heavy patrol
#
{
    params ["_group", "_position"];

    private _leader = leader _group;
    
    {
        private _dir = _leader getDir _x;
        private _dist = _x distance2D _leader;
        _x setPos (_position getPos [_dist, _dir]);
    }
    forEach units _group - [_leader];
    
    _leader setPos (_position getPos [0, 0]);
};


//example
//[group player, [4090.231,4123.156,0]] call fnc_teleportGroup;```
#

That's the function, for some reasons, it's not willing to work even on a dry test

still forum
#

_leader setPos (_position getPos [0, 0]);
just setPos _position?
tried filling it with tons of diag_log's to see whats going on?

winter rose
#
fnc_teleportGroup = 
{
    params ["_group", "_position"];

    private _leader = leader _group;
    
    {
        private _dir = _leader getDir _x;
        private _dist = _x distance2D _leader;
        _x setPos (_position getPos [_dist, _dir]);
    }
    forEach units _group - [_leader];
    
    _leader setPos (_position getPos [0, 0]);
};


//example
//[group player, [4090.231,4123.156,0]] call fnc_teleportGroup;
```(formatted)
heavy patrol
#

Well, the objective is to have the player & his group to be teleported at a random start point out of 3 with his group.

still forum
#

(formatted) (colored)*

#

yeah, the code looks goodish to me

heavy patrol
#

I mean, it's a script made by Killzone_kid I found by looking around, I'll try to remove the [0,0] and see how it goes

brittle dock
#

anyone know why this doesn't work? ```sqf
while {"firstTask" call BIS_fnc_taskCompleted} do

#

I'm trying to make a script that loops when a certain task has been completed

#

that should return "true"

winter rose
#

while the task is completed, do something? you sure you don't want to use waitUntil?

brittle dock
#

I have a waituntil inside the while

winter rose
#

I don't see it

brittle dock
#

I need it to loop

still forum
#

that should return "true"
Have you tested in debug console whether it does?

brittle dock
#

because when that task is completed, it creates dynamic tasks that recreates when they're finished

#

Well the task gets completed

winter rose
#

check

brittle dock
#
["firstTask", "SUCCEEDED", true] call BIS_fnc_taskSetState;
``` runs without a problem
#

BIS_fnc_taskCompleted = Returns true if task is "SUCCEEDED", "FAILED" or "CANCELED".

winter rose
#

and ```sqf
"firstTask" call BIS_fnc_taskCompleted

still forum
#

what is the code before your while loop, when is it entered?

brittle dock
#

the script is run in the init automatically

#

I'm just using the while loop to make it check that the firstTask is completed, when it is it should just run

#

"while {true} do" always works

#

maybe the script can't gather info from the task framework somehow?

#

as if it doesn't know the taskID exists

heavy patrol
#
private _position = [8350.96,3082.77,19.34];
private _leader = leader testgrp; 
  
 { 
  private _dir = _leader getDir _x; 
  private _dist = _x distance2D _leader; 
  _x setPos (_position getPos [_dist, _dir]); 
 } 
 forEach units _group - [_leader]; 
  
 _leader setPos (_position getPos [0, 0]);

So, I tweaked the script and did a manual value entry, it only teleport the group leader.

winter rose
#

try ```sqf
forEach (units _group - [_leader]);

heavy patrol
#

Yeah, I just spotted it

winter rose
#

I really am a rubber ducky ๐Ÿ˜„

heavy patrol
#

nha, I'm a dum dum, this one was easy to see ^^'

#

so, yeah, it worked. Half the problem solved, now the issue is, why would it not work when it's a function with global parameters

winter rose
#

it should

#

try again?

heavy patrol
#

Nope, not working with "[testgrp, [###,###,##]] call fnc_teleportGroup;"

still forum
#

@brittle dock The problem is that... eh.... You left the discord already.. uh.. okey. Bye then?

#

this one was easy to see ^^'
was it? what was the problem there?
Only issue i can see there is it teleporting all units, and not skipping the leader

heavy patrol
#

I had forgotten to replace _group by "testgrp" as manual input

still forum
#

yeah. But.. the original script in a function doesn't ahve that problem ๐Ÿ™ƒ

heavy patrol
#

so, it manually works, but doesn't work as a function for some reasons, it should, but, something gets lost somewhere

still forum
#

tried adding diag_log into it? log the parameters and stuff and see if it is what you expect?

heavy patrol
#

then I'll ask a simple question since I never used it, do I put the diag_log at the start or the end ?

still forum
#

everywhere where you want to log something

#

just do like
diag_log [_group, _position];
after your params to see if the values are right

tough abyss
#

Mhm. Could anybody help me with a script issue?

#

I'm getting a generic error in expression and I can't figure out what's causing it.

heavy patrol
#

Okay, thanks, that should help to find where it doesn't catch

still forum
#

go ahead and throw your doogles at us!

tough abyss
#
// Autokrat 1
[ 
 autokrat1,           
 "Doorzoek krat",       
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",  
 "_this distance _target < 3 && (missionNamespace getVariable ['krat1_done', 'false'] isEqualTo 'false')",       
 "_caller distance _target < 3 && (missionNamespace getVariable ['krat1_done', 'false'] isEqualTo 'false')",     
 {},             
 {},              
 { [{krat1_done = "true"; 
publicVariable "krat1_done";},"BIS_fnc_spawn",true,true] call BIS_fnc_MP;
["", "Je doorzoekt het krat, maar vind niks bijzonders"] spawn BIS_fnc_showSubtitle];
},   
 {},             
 [],             
 10,              
 0,            
 true,             
 false            
] remoteExec ["BIS_fnc_holdActionAdd", 0,autokrat1,true];

Basically its a addaction using the holdaction. Once completed, I want the person completing it to recieve some text on screen using showSubtitles.

#

autokrat1 is the object and the dutch text you see is mainly the dialog I want displayed, so not completely relevant for the question.

still forum
#

'false'] isEqualTo 'false' why? you we have booleans, just use them?

#

krat1_done = "true" -> krat1_done = true
(missionNamespace getVariable ['krat1_done', 'false'] isEqualTo 'false') -> !(missionNamespace getVariable ['krat1_done', false])

#

[{krat1_done = "true"; publicVariable "krat1_done";},"BIS_fnc_spawn",true,true] call BIS_fnc_MP;
1st BIS_fnc_MP has been replaced by remoteExec
2nd, why are you trying to publicVariable, a variable that you already globally set using BIS_fnc_MP? you are setting it global twice.
Every player will re-set and re-publicVariable the same value and spam network traffic

#

Also you set isPersistent parameter to true, but.. publicVariable is already persistent, so you are not setting the variable twice, but thrice even.

tough abyss
#

I got this from a friend, and I try to refurbish it for my purposes. I didn't write this script myself.

still forum
#

3rd, "BIS_fnc_spawn" why call a function that just executes spawn, why not spawn directly?

#

Next
["", "Je doorzoekt het krat, maar vind niks bijzonders"] spawn BIS_fnc_showSubtitle];
open array, close array, spawn function, close array.
Where is the open array for the last close array bracket? Its not there

tough abyss
still forum
#

yes. That part is correct

#

you close an array at the end that you never opened

#

that errors

tough abyss
#

Oh. right.

queen cargo
#

generic error in expression --> what dedmen said, pretty much always syntax errors

#

i think ...

#

damn ... last time i actually ran code in arma was literally ages ago

tough abyss
#

Gotcha. Well. I guess that leaves the triple variable setting to resolve honestly.

still forum
#

pretty much always syntax errors
No. Actually not

#

it literally always says "generic error" so, every syntax error is a generic error. but not every generic error is a syntax error.

queen cargo
#

yup ... really has been a long time since i last saw some real arma scripting error ๐Ÿ˜…

tough abyss
#

Alright. So. having fixed most of what you said dedmen. The only thing I cannot wrap my head around all that much is the variable fuckery at [{krat1_done = "true"; publicVariable "krat1_done";},"BIS_fnc_spawn",true,true] call BIS_fnc_MP;

winter rose
#

@tough abyss BIS_fnc_MP is obsolete; use remoteExec or remoteExecCall

tough abyss
#

Already changed that.

#

not sure about the 2x true though.

winter rose
#

what you are doing is "setting the variable to true, publicVariable it"

but you are broadcasting this effect, so it will be multiplied by the number of clients

#

because every single client will set this value to true and publicVariable it

tough abyss
#

Mhm. Darnit. I just want the person completing the addaction to see he found nothing. That's all.

still forum
#

not sure about the 2x true though.
there is no 2x true in remoteExec

#

make it go away

#

actually. That whole thing is useless, don't use either BIS_fnc_MP, nor remoteExec

#

just set the variable, and publicVariable it

tough abyss
#

Heard. Thank you for your time.

heavy patrol
#

So, after searching into the RPT, I am now having even more questions ^^'

Error in expression <osition getPos [0, 0]);
Error in expression <"_position"];

still forum
#

uh.. ๐Ÿค”

#

can you post the whole error, and not just single line snippets from it?

heavy patrol
#

I guess

winter rose
#

@heavy patrol also, please use -showScriptErrors exe flag so you have errors displaying in game ๐Ÿ™ƒ

heavy patrol
#

Thanks, that's nice to tell me that, I'm very unfamiliar with the debug tools ๐Ÿ‘

#
11:18:52 EPE manager release (0|29|0)
11:18:52 Error in expression <osition getPos [0, 0]);

diag_log params;
diag_log _group;
diag_log _leader;
dia>
11:18:52   Error position: <;
diag_log _group;
diag_log _leader;
dia>
11:18:52   Error Invalid number in expression
11:18:52 File core\fn_CustmFunc.sqf [Tutorial_fnc_CustmFunc]..., line 18
11:18:53 Error in expression <osition getPos [0, 0]);

diag_log params;
diag_log _group;
diag_log _leader;
dia>
11:18:53   Error position: <;
diag_log _group;
diag_log _leader;
dia>
11:18:53   Error Invalid number in expression
11:18:53 File core\fn_CustmFunc.sqf [Tutorial_fnc_CustmFunc]..., line 18
11:21:03 EPE manager release (0|29|0)
11:21:04 Error in expression <Pos (_position getPos [_dist, _dir]);
}
diag_log forEach units _group - [_leader>
11:21:04   Error position: <diag_log forEach units _group - [_leader>
11:21:04   Error Missing ;
11:21:04 File core\fn_CustmFunc.sqf [Tutorial_fnc_CustmFunc]..., line 14
11:21:04 Error in expression <Pos (_position getPos [_dist, _dir]);
}
diag_log forEach units _group - [_leader>
11:21:04   Error position: <diag_log forEach units _group - [_leader>
11:21:04   Error Missing ;
11:21:04 File core\fn_CustmFunc.sqf [Tutorial_fnc_CustmFunc]..., line 14

11:21:25 EPE manager release (0|29|0)
11:21:25 Error in expression <Pos (_position getPos [_dist, _dir]);
}
diag_log forEach units _group - [_leader>
11:21:25   Error position: <diag_log forEach units _group - [_leader>
11:21:25   Error Missing ;
11:21:25 File core\fn_CustmFunc.sqf [Tutorial_fnc_CustmFunc]..., line 14
11:21:25 Error in expression <Pos (_position getPos [_dist, _dir]);
}
diag_log forEach units _group - [_leader>
11:21:25   Error position: <diag_log forEach units _group - [_leader>
11:21:25   Error Missing ;
11:21:25 File core\fn_CustmFunc.sqf [Tutorial_fnc_CustmFunc]..., line 14
#

So that's the errors, there was some "magazine issues" in between

still forum
#

diag_log params;
eh

#

you are calling the params command without any parameters.

#

diag_log forEach units _group
what? you can't diag_log a syntax error.. foreach is missing the code

#

I already told you above what/how to diag_log and linked you the wiki page ^^

heavy patrol
#

Well, I checked the wiki page and kinda tried what I could ^^'

winter rose
heavy patrol
#

So, you're telling me that diag_log blocked the params here or it is what I guess and the parameters are just not getting filled ?

winter rose
#

params is a command, it's like doing ```sqf
diag_log setDir

heavy patrol
#

Ho, I see

#

Well, let's recompile all of this and see what we get

{
    params ["_group", "_position"];
    diag_log [_group, _position];

    private _leader = leader _group;
    
    {
        private _dir = _leader getDir _x;
        private _dist = _x distance2D _leader;
        _x setPos (_position getPos [_dist, _dir]);
    }
    forEach units _group - [_leader];
    
    _leader setPos (_position getPos [0, 0]);

diag_log [_group, _position];
};

I'm asking just in case, something like this should work or am I doing something wrong again ?

winter rose
#

brackets after forEach

queen cargo
#

not required

#

but useful for visibility purpose

still forum
#

parenthesis*

heavy patrol
#

Well, right now I'm confused to the highest and probably went wrong somewhere

#

the rpt file doesn't countain any line with the arguments

still forum
#

that means your function didn't get called :3

winter rose
#

parenthesis*
I never know in English!!

heavy patrol
#

Time for an EVEN MORE DRY RUN

winter rose
#

add sand!
result?

heavy patrol
#

Well well well

Warning Message: Script core\fn_CustmFunc.sqf not found

still forum
#

applies lube

heavy patrol
#

So, the basic function file name is "CustmFunc.sqf"
But, if I do that, it says it doesn't find it, so I add the "fn_" prefix, then the function appear in the function viewer of the editor.
So, which part of all of this is wrongly done ? The define in description.ext maybe ?

#

because it looks like this

class CfgFunctions
{
    class Tutorial
    {
        class core
        {
            file = "core";
            class CustmFunc {};
        };
    };
};
jade abyss
#

personaly, i switched to the file= tag

class CustmFunc {file = "\pathTo\CustmFunc.sqf";};
winter rose
#

file can mean file itself, or parent directory

jade abyss
#

e.g.:

class CfgFunctions
{
    class Tutorial
    {
        class core
        {
            //"Tutorial_fnc_CustmFunc"
            class CustmFunc {file = "\pathTo\CustmFunc.sqf";};
            //"Tutorial_fnc_AnotherCustmFunc"
            class AnotherCustmFunc {file = "\another\pathTo\TotalyDifferentFileName.sqf";};
        };
    };
};
#

@heavy patrol

heavy patrol
#

Well, guess I'll do that, at that point

jade abyss
#

I found that much easier to deal with

heavy patrol
#

Well

jade abyss
#

*edited above

heavy patrol
#

now it's not crying for "fn_" prefix when I remove it from the file

#

So, that's one progress

#

I'm confused

#

It sees the function. And yet it doesn't find it.

jade abyss
#

"it sees"?

#

You have to tell us a bit more, since we can't see your screen.

heavy patrol
#

It is displayed in the function viewer

#

basically

#

so, I assume it means that the files are compiled when the scenario is started

jade abyss
#

Get in the editor, open the debug console, insert the name of the function, click exec. In the textbox below, should appear some text. Is it?

#

Yeah, when you start the mission it will be "compiled"

#

CfgFunctions more or less just does this:

MyTag_fnc_ThisIsAFunction = compileFinal preprocessFileLineNumbers "\pathTo\myFile.sqf";
#

(just some more steps of course)

heavy patrol
#

Okay, I'm looking at something really weird in the editor... something is off

jade abyss
#

So technicaly, you could just add this to your init.sqf:

MyTag_fnc_ThisIsAFunction = compile preprocessFileLineNumbers "\pathTo\myFile.sqf";

MyTag_fnc_ThisIsAFunction would be the function then. (compile ! Instead of compileFinal)

#

For testing of course*

heavy patrol
#

If I load another scenario and come back to the dry one, the function viewer now consider the function an "empty" file

#

and of course, going by the debug console gives nothing, since it's empty

#

Let's try

#

okay, is doesn't even finds it lol

#

let's try to put it in the root

jade abyss
#

try removing the first \

heavy patrol
#

I did

jade abyss
#

๐Ÿค”

#

Did you load the mission where the file is in?

heavy patrol
#

Ho my

#

I removed the slash but added a space

#

okay

#

well, good news

#

it works

jade abyss
#

๐Ÿ‘

heavy patrol
#

bad news

#

the trigger doesn't triggers it xD

jade abyss
#

Different topic, and i have to go now o7

heavy patrol
#

no worries, thanks for the help

#

I'll give it a rest for now

chrome violet
#

Hi! Quick question. Is there any way to stop compositions from bouncing around when placed with zeus in the config.cpp? I tried using init and enableSimulation false. Thank you

runic edge
#

Place walls

#

Walls dont bounce

chrome violet
#

Ermm... not quite what was I was looking for, but thanks

winter rose
#

enableSimulation false should work

chrome violet
#
class Object24    {side = 8; vehicle = "PowerCable_01_StraightShort_F"; rank=""; position[] = {3.18445,-3.75049,0}; dir = 269.808; init="this enableSimulation false";};
#

i have this for example @winter rose

#

is there something wrong here?

winter rose
#

maybe enableSimulationGlobal, I don't know much about objet inits

chrome violet
#

ok i will give that a try!

winter rose
#

@chrome violet yes it should be the global version indeed

manic bane
spice axle
#

yes plus server

winter rose
#

remoteExec 0 it is

interesting, yep

manic bane
#

Thanks!

#

๐Ÿ‘

queen cargo
winter rose
#

good question ๐Ÿ˜„

#

if I had to guess, I would say silently fail
another (secondary) possibility would be that the group units join the leader's group

#

(@ work, can't test that)

queen cargo
#

me neither, at university

still forum
#

uh... That might actually be interesting.

cunning crown
#

The unit on the right will become the groupLeader of the group but will not change group

still forum
#

but doesn't that cause further issues? like.. when the leader is not even in the group. That must cause some issues somewhere ๐Ÿ˜„

winter rose
#

That might actually be interesting
I second this statement

cunning crown
winter rose
#

playersNumber?

cunning crown
#

Alt-tabed

queen cargo
#

Not sure what exactly is going on from that view, would you be so kind to further explain?

cunning crown
#

Well unit1 is in group2, and player in group1, I've executed the selectLeader on the group2 and it sets the player as the leader (as excepted) BUT the player is not in the group2. he's still in his group and the leader of group1 and group2

winter rose
#

but you can't give orders ๐Ÿ˜„

cunning crown
#

No, and I can even set a unit from group2 as the leader of group1 which has the leader for group2 etc. ๐Ÿ˜„

queen cargo
#

Sooo
Literally bugged but kinda working

winter rose
#

works as not expected ๐Ÿ˜„

queen cargo
#

Should probably be added to biki as Note

winter rose
#

will do

still forum
#

Maybe should add a simple safety check into that. but then, why would you ever need to pass the group to the command.
If the group can be read from the unit

winter rose
#

triple indeed

queen cargo
#

what if either the group or the unit is null?

winter rose
#

stop asking weird questions! ๐Ÿ˜„

queen cargo
#

it is important for sqf-vm ๐Ÿ˜ฆ

cunning crown
#

If the group/unit is null before the selectLeader exec, nothing seems to happen; if you delete the leader after he has been selected as one, leader (group ...) returns <NULL-object>

#

leader (group ...) will return null only when the deleted unit is leader of a group it is not in

queen cargo
#

Okay, we need notes in the biki

winter rose
#

looking for me?

queen cargo
#

More for anybody with access and a pc at hands

exotic flax
#

so if you select an unit which does not exist, you expect something? ๐Ÿค”

queen cargo
#

Yes, some Script error or Warning

exotic flax
#

For dead units, objNull is returned.
Could add For non-existing units, null is returned

winter rose
#

so:

An invalid combination can be provided to this command, e.g unitName not being part of group. In that case:

  • ''unitName_ will be [[leader]] of group, but will not be able to command them
  • once unitName killed, [[leader]] of group will be [[objNull]] and will not automatically be reassigned.

correct?

queen cargo
#

Question now is... Is it actually ever automatically reassigned?

#

What if multiple units are Inside the Groups

winter rose
#

moar testing indeed plz

cunning crown
#

Doesn't seem to be reassigned, also, if an unite which is not part of the group is the leader, none of the 2 units will be able to command the group

queen cargo
#

Makes me wonder ๐Ÿค”๐Ÿค” what effect does this have to Formations?

winter rose
cunning crown
#

The group follows the leader which was inside the group, the same unit as formationLeader I guess?

#

Ohh, when you have a group with 2 or more units, and the leader is not part of that group HH:MM:SS Join to another group will be spammed non-stop in the log

queen cargo
#

So it is a Bug ๐ŸŽ‰ ๐ŸŽ‰

winter rose
#

I feel like we just opened Pandora's box ๐Ÿ˜„

exotic flax
cunning crown
#

So it is a Bug ๐ŸŽ‰ ๐ŸŽ‰
a feature*

queen cargo
#

Maybe I should give bi my sqfvm Test Cases So they can actually test their Code

winter rose
#

talk about adding insult to the injury x)

queen cargo
#

For theese pitfalls

#

๐Ÿ˜‚ ๐Ÿ˜‚

#

Though... Kinda useless as sqf-vms goal is to emulate the arma Environment

exotic flax
#

so it should also be broken in sqfvm

queen cargo
#

It will be

#

But littered with Warnings

#

As it is done with all other commands

winter rose
#

one question, will SQF-VM support BIS_fnc functions?

#

I suppose "yes as it will compile'em"

queen cargo
#

If you load them, sure

#

Sqf-vm is not providing anything by itself contentwise

winter rose
#

you mean it can't read fncs directly into config & pbo??!?

queen cargo
#

Nope, nรถ pbo Reader yet in sqf-vm

#

But it can obviously read Config and sqf Code ๐Ÿ˜‚ ๐Ÿ˜‚

winter rose
#

soon it will parse p3d and you will include your own 3D engine ๐Ÿ‘€

queen cargo
#

Thought about that

#

But Thats too much work

winter rose
#

it will be Arma 3 Free ๐Ÿ˜„

queen cargo
#

๐Ÿ˜‚ ๐Ÿ˜‚ and in slow and without actual simulation and, and, and

#

Plus I need like a shitton of Developers to pull that Trick off

winter rose
#

but you can multithread it properly ๐Ÿ˜„

queen cargo
#

I could do that

#

Yes

chrome violet
#

Yeah, the objects are still colliding with each other and fly everywhere when I place them on a slope with zeus. Tried enableSimulationGlobal false, enableSimulation false, enableDynamicSimulation false, even [this] call BIS_fnc_replaceWithSimpleObject.

winter rose
#

@chrome violet again, I don't know a lot about Zeus configs but are you sure that
init="this enableSimulation false" is valid in the object, and are you sure the parameter is this?

jade abyss
#

In the editor stuff, yeah

#

Without the _

winter rose
#

are these commands/initfields called when placing compositions with Zeus?

#

because maybe init="this setDamage 1" doesn't work either, and it is not a command issue

oblique arrow
#

Hey do any of you smart peeps know if directional signals are possible with the basic (vanilla) spectrum device api and if so can give me some pointers on how to achieve that blep

chrome violet
#

I am doing this in a mod config.cpp @winter rose and @jade abyss . Trying to apply this to objects in CfgGroups, Empty

#

I also think that the init line is not read when it loads

#

maybe objects in composition groups can't be manipulated by init lines?

jade abyss
#

No clue, tbh. Never touched them.

chrome violet
#

No probs, thanks for trying

runic edge
#

It wont help but in my group we made a structure mod and run around this problem by simply having the Zeus adding them after popping the composition. Plus Eden provides some cool features that are not available to a Zeus and you can make your mods work there too and have your Zeus preparing their missions there !

jade abyss
#

something like

_arr = [[0,1]];
_a = param[0][1]; // 1

wasn't possible, right?

still forum
#

thats syntax error

jade abyss
#

"something like"

#

...

winter rose
#

_arr # 0 # 1 ?

jade abyss
#

Yeah, except multiselect/#.

still forum
#

_arr select 0 select 1

#

no

#

_arr param [0] param [1]

winter rose
#

params of param yes x)

jade abyss
#

meh, no then

ebon citrus
#

_nObject = nearestObject [_unit, "man"]; can and will return snakes and rabbits... the more you know

winter rose
#

yes ๐Ÿ˜ CAManBase is the root for people I think

ebon citrus
#

solid thatnks, i was just having a laugh when i realized i had been moving around a random snake

winter rose
#

Welcome to Arma! ๐Ÿ˜„

ebon citrus
#

also, im trying to move this object "_ghost" one step away from the unit _nObject, but it seems to just disappear

#

probably teleported somewhere where it shouldn't

#

but when executed on the player, it works fine

#

_ghost setposATL (_ghost getRelPos [1, ([_ghost, _nObject] call BIS_fnc_dirTo)-180]);

jade abyss
#

iirc, BIS_fnc_dirTo can be replaced with getDir alternate Syntax

ebon citrus
#

it actually works with all other objects, but not this one

#

userTexture1m_f

jade abyss
#
An alternative syntax was added that gets heading from one object or position to another object or position, the engine equivalent of BIS_fnc_dirTo.```
#

just saying

ebon citrus
#

alright

#

i was told once by someone to use calls, and then i get told to not use calls

jade abyss
#

attachTo?

exotic flax
#

UserTexture1m_F seems to be an invisible object, so would make sense it "disapears"

jade abyss
#

Who told you not to use calls? ๐Ÿค”

ebon citrus
#

it's invisible if you dont assign a texture to it

#

the object needs to be able to move on it's own or be further away but not any closer

#

i know im doing some logical error here, but i dont understand why the object either flips or goes somewhere

jade abyss
#

constantly systemchat the pos?

ebon citrus
#

currently, for testing i have this running on a loop

            _ghost setposATL (_ghost getRelPos [1, ([_ghost, _nObject] call BIS_fnc_dirTo)-180]);
        };

jade abyss
#

Just to see if it disappears or just...

#

setposATL

#

getRelPos was ags, iirc

ebon citrus
#

AGS=ATL?

jade abyss
ebon citrus
#

on land, AGL=ATL

#

ASL โ€“ Presumably โ€œAbove Sea Levelโ€ ATL โ€“ Presumably โ€œAbove Terrain Levelโ€ ASLW โ€“ Presumably โ€œAbove Sea Level inc. Wavesโ€ AGL โ€“ Presumably โ€œAbove Generic/Ground Levelโ€ AGLS โ€“ Presumably โ€œAbove Generic/Ground Level inc. Surfacesโ€

jade abyss
#

if standing on someting !=

jade abyss
#

As mentioned before: Systemchat the poos of the ghost obj and compare with yours

ebon citrus
#

Not really what i was looking for

jade abyss
#

stupid S in the end

#

nvm me

ebon citrus
#

ok, so now it's being super weird

#

ok...

#

it doesnt like me changing the direction it's facing

oblique arrow
#

Hm what does the Activation 'Game Logic' for a trigger mean? As in what does that actually do?

winter rose
#

I think it is when a GameLogic reaches a (synchronised) waypoint @oblique arrow

oblique arrow
#

ablobderpyhappy oki

ebon citrus
#

now i know why

#

getDir returns an absolute direction

#

azimuth

#

but getrealpos wants a relation direction

#

this is so stupid

#

so i need to use getRelDir instead

#

also, why is it that when i set an RVMAT using setObjectMaterial i need to completely close down the game and reload it if i want changes in that rvmat to take effect?

cunning crown
#

Cache I guess? You can change the name on each change as a workaround

ebon citrus
#

and i tried this. i even DELETED the rvmat in question

#

geez, alright, sounds reasonable

#

is there a way to disable caching?

cunning crown
#

I don't think so, I've always did texture_XX and incremented by one each time ยฏ_(ใƒ„)_/ยฏ

ebon citrus
#

๐Ÿ˜… alrighty

#

looks like that's what it has got to be

#

seems like a really bothersome thing considering the game can load the rvmats pretty much on the fly

#

why cache them

still forum
#

cuz cache faster

ebon citrus
#

yeah, i went from 120fps to 120fps

#

but this workaround seems good enough

#

just have to define my rvmats

#

i wonder if i can use keyframes to do 2d animations in arma

#

or are they only for positional stuff

#

i bet they made that drone checkpoint in Old Man with keyframes

still forum
#

UV animations in rvmat are also a thing

ebon citrus
#

oh yeah 1.84 stuff

#

no wonder i didnt find this before

tame lion
#

question regarding Wind direction in ACE; is wind direction always the same across the entire map? It doesn't change from pos to pos?

still forum
#

somewhat yes

#

trees and height changes speed, but i don't think it changes direction

tame lion
#

thanks @still forum that answers my question

reef otter
#

So, this is my first time actually working on a script, anyone know how to change it so it allows the particles to spawn near the player? Because as it currently stands, they won't spawn within 10-15 meters of the player. https://gyazo.com/b5fc49f855d6d5c0d64dfeb5884e5a3f

ruby breach
#

Generally, pasting the code with the sqf tag, or a link to a pastebin, is preferable to a screenshot of your code

reef otter
#

Yeah sorry man, didn't even write this, I'm just reworking it to work for a mission I'm making. How would one do either of those?

cunning crown
#

```sqf
/* your code */
hint "Hello There";
```
โฌ‡๏ธ

/* your code */
hint "Hello There";
winter rose
#

yeah I don't know why this doesn't work ๐Ÿ˜†

ruby breach
#

I don't know much about particle sources, but if I had to guess it's the position parameter of setParticleParams or the positionVar parameter of setParticleRandom

#

If at first you don't succeed

cunning crown
#

Ah found the issue, the * was not escaped so Discord formating was lost ยฏ_(ใƒ„)_/ยฏ

winter rose
#

oooooooooh