#arma3_scripting

1 messages ยท Page 339 of 1

queen cargo
#

unless you provide a centralized service to guarantee those being unique

#

a certain uniqueness however is reached through adding together as many informations as possible
requires an extension though

brazen sparrow
#

@nova belfry do you mean Steam ID -> GUID (rcon reports)?

nova belfry
#

yes

brazen sparrow
#

pretty much every commonly used language ๐Ÿ˜„

nova belfry
#

@brazen sparrow I have a script to bans my player, and convert uid in guid)

#

command on ban addban

brazen sparrow
#

guid -> steam id is abit more complicated and needs a few gig of storage ๐Ÿ˜›

#

u need to generate all possible guid and store them

#

rainbow table it

tough abyss
#

@brazen sparrow shame it crap language ๐Ÿ˜‰

little eagle
#

@tough abyss No, you can't.

tough abyss
#

๐Ÿค”

#

@little eagle it's always the same answer ๐Ÿ˜ฆ

little eagle
#

That's good. That way you know it's true.

fading hemlock
indigo snow
#

mainly the quotes around it

#

also youd still need to define it inside your code, you can't just start using it

fading hemlock
#

thats a pfh, im using a pfh object

little eagle
#

L13

           ["_side","_amount","_radius","_delay","_pos","_numbervar"],//Arguments

should be:

           [_side,_amount,_radius,_delay,_pos,_numbervar],//Arguments
#

No point in passing a bunch of generic strings.

#

Then you read this parameters with this line:

(_this getVariable "params") params ["_side","_amount","_radius","_delay","_pos","_numbervar"];

In the code-block(s)

fading hemlock
#

Aha, i was trying something along the lines of that yesterday night but failed miserably, thanks for the pointers @little eagle ๐Ÿ˜ƒ

little eagle
#

Why are you using this one anyway. Imo it's ugly as hell.

fading hemlock
#

Just a experiment since im bored and want to try something diffrent

tough abyss
#

Does anyone know why targets won't popup globally in hosted and dedicated servers?

little eagle
#

Broken script.

#

A bug.

tender fossil
#

Is there any script command with both local arguments and effects or is every command with local effects combined with global arguments (like I assume)?

#

Nvm, found a command that kills my theory lol

little eagle
#

There are and they have the obvious problem that they cannot influence remote objects.

#

This one for example (in A3 at least), which is why it's a pointless command now.

tender fossil
#

That's exactly what I was thinking @little eagle

#

Ie. how to broadcast changes with a command with both local arguments and effects

brazen sparrow
#

remote exec

#

or use global effect functions

tender fossil
#

@brazen sparrow But can you use remoteExec with commands that have both local arguments and effects?

brazen sparrow
#

"local arguments", i think this is confusing u

#

u run a command with arguments

#

they have to be "defined locally"

#

when the docs refer to local arguments, they are referring to when an object is local to where the script is running

#

like a car

tender fossil
#

Yes

brazen sparrow
#

u can target RE calls based on were the object is local too

#

look at the remoteExec(Call) docs

#

think its the 3rd/4th param

tender fossil
#

But doesn't the command having both local arguments and effects create a kind of deadlock situation that renders the command useless for MP environments?

#

Assuming that I want other clients to see the effect as well

brazen sparrow
#

best way is to try it out

#

setup a server locally

#

stuff spawned via code running on the server = object not local to you

little eagle
#

No, remoteExec on a command that required local arguments and has local effects does not help.

#

Those commands are essentially unusable.

#

Outside of SP.

brazen sparrow
#

nope

little eagle
#

Yes they are.

brazen sparrow
#

ok

little eagle
#

i accept your concession.

brazen sparrow
#

if something is createVehicleLocal you are correct, the ref to the object would make no sense on other clients

little eagle
#

I don't know what this means. createVehicleLocal has local effects, but there are no arguments that could be considered local or global.

#

You're thinking of commands that have global effects, but require local arguments (or no arguments that have locality, e.g. no objects) OR

#

commands that have local effects, but work on remote objects (or don't have any arguments that have locality).

#

Commands that require local arguments and only have local effects are unusable in MP. In Arma 3 this is true for addWeaponCargo and some others.

#

By unusable I mean that they will not be synched and therefore behave weird (cargo only appearing on the machine that owns the cargo box for example).

brazen sparrow
#

@tender fossil mentions addWeaponCargo being pointless but using remoteExec can run the code were it is needed
[_targetVehicle, ["M16", 5]] remoteExecCall ["addWeaponCargo", _targetVehicle];

indigo snow
#

but that has a global argument

brazen sparrow
#

well u wouldnt create a vehicle in MP with createVehicleLocal, that is just mad

little eagle
#

Yep, _targetVehicle is only local to one machine. On every machine that not owns _targetVehicle, the command will have no effect.

#

That has nothing to do with createVehicleLocal.

indigo snow
#

createvehicle locality != command argument locality

little eagle
#

All Objects are only ever local to one machine.

#

E.g. the driver for vehicles.

#

Or the server for AI groups.

indigo snow
#

Its the principle behind headless clients

brazen sparrow
#

its this "local arguments" thing

#

u mean variables that are only "visible" on a single client?

little eagle
#

Yes, you don't seem to grasp the concept.

#

No we don't.

#

We mean objects. Objects are not variables.

#

Tanks, ammo boxes, player avatar etc.

brazen sparrow
#

ofc

indigo snow
#

Every object needs to belong to a client, and for example your players unit is local to your client, and AI generally the server

brazen sparrow
#

the original question was: "how to broadcast changes with a command with both local arguments and effects"

little eagle
#

Technically some objects can exist on every machine. Like bullets. But those can also be considered as N objects, N being the number of connected machines.

indigo snow
#

and the answer is: you cant

little eagle
#

^

indigo snow
#

the command wont work on the clients where the argument isnt local

#

flat out no result

little eagle
#

Fortunately there are very few of these commands.

tender fossil
#

That's what I was thinking

indigo snow
#

you can broadcast it and youll just get no results on many clients and a result on a single client

brazen sparrow
#

what command are u talking about

little eagle
#

addWeaponCargo

indigo snow
#

(^global argument)

little eagle
#

Note that that is not addWeaponCargoGlobal.

#

cptnick, read the comment on the wiki.

#

In A3, the argument is local.

indigo snow
#

ah i concede the point then

indigo snow
#

actually i seem to remember that not being true for A3, did it change in an update or do i misremember?

little eagle
#

This one didn't exist in A2 and therefore never worked outside of SP.

indigo snow
#

e.g. the magic ammo boxes

little eagle
#

Might've been different in Alpha/Beta when it was still more similar to the A2 system.

#

In A2 you could have local inventories with cargo boxes.

#

Using exactly these commands.

indigo snow
#

yea thatll be it then

little eagle
#

No longer supported.

tender fossil
#

A suggestion: make a quiz that covers the most important aspects of Arma scripting and all the scripting commands

tough abyss
#

A quiz?

tender fossil
#

Yeah

thin pine
#

What do you get when you win?

little eagle
#

With SQF, you don't win.

shadow sapphire
#

Hey, anyone know how you would run a script that regeared AI as they spawned, assuming you already had the regearing script and used it for other applications?

tender fossil
#

It would serve as kind of MOOC

shadow sapphire
#

Specifically, I'm trying to regear units as they spawn in the Combat Patrol game mode.

indigo snow
#

CBA Init XEH would suit you pretty well

shadow sapphire
#

I think I like @tender fossil's idea for SQF quizzes.

#

@indigo snow, haha, used it before. Came with its own headaches. I need a vanilla solution, even if it isn't elegant.

#

Long as it works and doesn't throw errors.

indigo snow
#

neverending while loop that checks all units and sets a variable to those already handled ยฏ_(ใƒ„)_/ยฏ

#

but you actually really want the CBA thing

queen cargo
#

can be done pretty fast @tender fossil

#

only problem will be: who is going to write down the questions (and answers)?

tender fossil
#

I started my journey into programming with MOOC and really liked the approach with interactive teaching method @queen cargo

queen cargo
#

so you want rather challenges instead of quizzes?

tender fossil
#

Why not, I just thought quiz would be easier to implement

queen cargo
#

as that would be done in web most likely, would require an interpreter for SQF in javascript

#

thats why

#

๐Ÿ™ˆ

tender fossil
#

Yeah, that's why I was thinking of quiz like system ๐Ÿ˜ƒ

queen cargo
#

if the answers are only text based, then that can be written down fairly quick

tender fossil
#

Yes

rancid ruin
#

x39 & commy's SQF quiz (edition 1)

#

go on

tender fossil
#

I was thinking of iterating through the scripting commands and then having general questions about scripting in modules (eg. multiplayer -> locality, keeping clients in sync, remote execution etc)

peak plover
#

"Which is faster:"

tender fossil
#

On the other hand, a series of small missions where you have to solve problems, why not

shadow sapphire
#

<@&105622502444711936>, is there any way to hook into the Combat Patrol init in order to change the gear of the units that are spawned with it or what side they are? Is there a way at all? Is it documented?

peak plover
#

Change the config for combat patrol units

#

Can be done with a mod

shadow sapphire
#

Ugh! That's good, but I can't use mods for this project.

indigo snow
#

directly pinging the devs is kinda rude

shadow sapphire
#

@indigo snow, noted.

tough abyss
#

@indigo snow unless its to bother them to add the #arma3_scripting-banter channel

shadow sapphire
#

What does that mean, @tough abyss?

tough abyss
#

queue commy and x39

queen cargo
#

mhhh?

subtle ore
#

You're buying this time Cloud. Better get a good match this time

lilac coral
#

Hello I just started SQF. I'm trying to use extdb3 and I copied the @timber cypressdb3 folder into my root arma folder including the dll, but when I do "extDB3" callExtension, I get 17:04:38 CallExtension 'extDB3' could not be found

peak plover
#

It means that the extDB3 could not be found

lilac coral
#

Thanks, I could figure that one out. I'm using TADST and I see extdb3 in the mod parameter when loading the server.

indigo snow
#

You might be better off asking in the server channels, this channel really is for scripting itself

subtle ore
#

Well some aspects of extDB do require scripted elements but mainly db and server

indigo snow
#

Not finding the dll however...

#

Not saying people here cant help, but more people with answers over there I guess

subtle ore
#

Nope

peak plover
#

Well first mistake is putting extdb3 into your root arma folder, as it should be used on the server instead

subtle ore
#

Well couldn't you load it client for testing?

peak plover
#

Sure

vague lichen
#

@lilac coral make sure your conf.ini is setup to talk to your database correctly and not just using the defaults.

shadow sapphire
#

Would anyone know how the init in the Combat Patrol module works, or maybe how I could figure out how it works?

lilac coral
#

the arma3server.exe is in here too so im assuming @extDB3 belongs here

#

and yes I filled in the config, but I don't have a passoword on my test db so i set Password =

#

with a space after the equals, not sure if that matters.

#

can't find any good documentation on this sqf stuff ๐Ÿ˜“

#

initServer.sqf

_db = "extDB3" callExtension "9:ADD_DATABASE:cynlife";

_query = "extDB3" callExtension "0:RAW:SELECT * FROM `cyn_a3__users`";

_row = ((_query select 1) select 0);

_name = _row select 2;

diag_log _name;
vague lichen
#

Torndeco's Wiki should have everything you need. You can also look at some of the other gamemodes out there that use extdb3 for some general hints.

#

He does have some sqf* example files there.

lilac coral
#

oh wait nvm i figured it out

polar folio
#

is there a way to disable an AI driver trying to avoid infantry when using setDriveOnPath? commands works perfect but i'd like the AI to drive on the path no matter what

lilac coral
#

is init.sqf run by the server, client, or both?

tough abyss
#

any handy way of removing all PP effects?

lilac coral
#

I have no idea what I'm doing ยฏ_(ใƒ„)_/ยฏ

#
  "extDB3" callExtension "9:ADD_DATABASE:cynlife";
  "extDB3" callExtension "9:ADD_DATABASE_PROTOCOL:cynlife:SQL:SQL";
  _query = "extDB3" callExtension "0:SQL:SELECT * FROM cyn_a3__users";
"[0,""Error Unknown Protocol""]"
tough abyss
#

@peak plover: no, param [0] is faster.

icy raft
#

Id there a command to open a mission in Eden editor?

#

For the startup params

#

Something like "-init=open3DENEditor["missionName"];"

rancid ruin
#

yes

#

oh sorry, a script command

#

not sure

icy raft
#

Okay

#

I'm just making a build script to make modding a little faster

still forum
#

@lilac coral Not really a #arma3_scripting question afaik. I think you're far better off looking in Life forums. As you are asking very specific questions that have mostly been answered there already and that very few people here know the answer to.

lusty canyon
#

im getting alot of these in my rpt regardless of mode SP/MP/DS:

Warning Message: 'aggregateReflectors/' is not a class ('scope' accessed)
Warning Message: 'ladders/' is not a class ('scope' accessed)

does these mean something is trying to inherit from scope = 0? or classname reference doesnt exist in cfg?

little eagle
#

No, but you might be trying to access these config entries like a class.

#
class class1 {
    entry1 = 1;
    class class2 {
        scope = 2;
    };
};
#
configFile >> "class1" >> "entry1" >> "scope"
#

This should result in the same error afaik.

#

Warning Message: 'entry1/' is not a class ('scope' accessed)

lusty canyon
#

so its an issue with the way someone made cfg class structure?

#

im not too sharp with the cfg stuff does scope mean:
scope = 0 // cannot be inherited or initialized
scope = 1 // can be inherited only
scope 2 // can be both

little eagle
#

Maybe. These happen not necessarily by script, but also, for example, when you add config entries instead of classes to CfgVehicles and similar.

#

Don't think too hard about scope. This can happen with every entry.

lusty canyon
#

when you say config entries instead of classes is it something like

cfgWeapons {
    cfgAmmo {};
}

?

little eagle
#

Those are two classes.

#

An entry is a string, number or array

#

aggregateReflectors is supposed to be an array, so I think it's a script error.

#

Same for ladders.

lusty canyon
#

ok thanks, guess ill have to isolate and retest

little eagle
#

Isn't this a pop-up error?

#

One you have to click away?

lusty canyon
#

yeah i see a popup and rpt entry

#

no way to suppress popups right?

little eagle
#

Then what did you change last before the pop-up happen?

#

no way to suppress popups right?
Yes there is. By fixing the problem.

lusty canyon
#

i say suppess not fix because its probably not my mod thats doing it, im gonna try a clean run

lilac coral
#

@still forum does extDB3 not have to do with scripting?

little eagle
#

You're still better of contacting the mod author. If someone has a very specific question about ACE, they get sent to their Slack.

lilac coral
#

kk

#

thanks anyway

lusty canyon
#

this discord should have its own CBA and ACE chans

subtle ore
#

Why?!? CBA and ACE already have their own forms of discussion

little eagle
#

And Slack > discord

lusty canyon
#

false
dis > slack
true

#

in a addaction conditional you have _this and _target. when i add an action to player and want to get variables from said player
_this and _target should be the same right?

#

now when the player enters a vehicle and i try to _target getVar, im not getting the correct values (not exist) but _this gets valid values even when player is inside vehicle

little eagle
#

If you add an action to the local player, then _this and _target will always be that player. Never a vehicle.

lusty canyon
#

thats the thing ive tested it multiple times, if player is on foot _this and _target work as intended, but once player enters a vehicle in any seat _target then kinda performs like (vehicle player)

little eagle
#
player addAction ["test", {}, [], 0, false, false, "", "systemChat str [typeOf _this, typeOf _target]; true"];
#

testing ...

lusty canyon
#

here is my addaction


    player addaction ["<t color='#7396ff'>RDF OPTICAL:</t> VIS", 
    {
        _myPlayer = (_this select 0);
        _rdfCam = _myPlayer getVariable "DW_MY_RDF_CAM_OBJECT";
        
        if ( isObjectHidden _rdfCam ) then     {
            _rdfCam hideObjectGlobal false; _rdfCam hideObject false;
        }
        else {
            _rdfCam hideObjectGlobal true; _rdfCam hideObject true;
        };    
    },
    "args",
    -400,
    false,
    false,
    "",
    "(alive _this) and (_this getVariable [""DW_UTIL_RDF_MENU"", 1] == 1)",
    5,
    false,
    ""
    ];

my getVar doesnt work inside a vehicle

#

when you use _target instead of _this

little eagle
#

You're right. _target becomes the vehicle.

lusty canyon
#

is that intended or bug?

halcyon crypt
#

could just use player instead of _this or _target ๐Ÿ˜›

lusty canyon
#

i heard you should avoid using player in action conditionals (locality)

little eagle
#

Special variables passed to the script code are _target (object to which action is attached to) and _this (caller/executing person).

halcyon crypt
#

the addAction is local

#

_this or _target is better though, was just saying ๐Ÿ˜

lusty canyon
#

so then what about the cfg useractions? global ?

little eagle
#

Apparently an action becomes attached to the vehicle when a player with action enters it.

#

Wacky logic as usual.

lusty canyon
#

thanks BIS! both addaction and cfg useraction have its pitfalls

little eagle
#

Arma is a giant pitfall.

forest jasper
#

is arma 3 change anything about dropped weapon ?

#

look like the weapon disappear when delete corpse

little eagle
#

Yes, the ground weapon holders of weapons are deleted when the unit they originated from is deleted.

#

Which is sad, because that was a decent work around to creating ground weapon holders containing a weapon with any attachments and ammo in their magazines.

#

would've been*

forest jasper
#

from new update isn't it ?

little eagle
#

It has been like this for a long time. I can't remember if it was a patch or not.

indigo snow
#

At least since Zeus was introduced I guess

forest jasper
#

what

#

so anyway to verify that the weapon from who ? anything
i'm trying to give the weapon back if no one haven't took it

little eagle
#

Soldier A has rifle B

#

Soldier A dies

#

Rifle B drops as a ground weapon holder next to the corpse of A

#

A is deleted

#

If this all happens, then (the ground weapon holder of) B is deleted as well.

peak plover
#

Hmm

#

If I use ```sqf
createDialog "menus_main_start"

#

How do I close said dialog

warm gorge
#

Use closeDisplay

peak plover
#

I just realised that if I use createDialog on the map, it will not allow me to use the map until I close the dialog

indigo snow
#

yea created dialogs will be the active one

#

if you need a ui element use a display

peak plover
#

Ok, that's what I need

indigo snow
#

displays hold dialogs and controls

peak plover
#

ok, that works really nice thanks

warm gorge
#

What works really nice?

peak plover
#

createDisplay. I can use the map and use my new button splendily

indigo snow
#

Splendid โ„ข

warm gorge
#

Ah yep btw when you said the map didnt work, was it like locked and you couldnt move it around? Because I have a teleport script which is opened from an admin menu which calls openMap and I have that issue, cant seem to work it out

indigo snow
#

you cant access the map when another dialog is the active one

#

Id guess

warm gorge
#

Yeah well thats what I figured from what we just said, however even when I closeDialog before it it doesnt work

indigo snow
#

clicking on the map doesnt make it go into focus?

forest jasper
#

@little eagle so there is no way to get the weaponholder object that created from Soldier A right ?
i know people use nearestObjects but it can be intersect with other Soldier. sad indeed

little eagle
#

What do you mean by "get"?

indigo snow
#

find out which weaponholder is associated with which corpse

little eagle
#

Don't think there is for sure, but this should be enough, no?

nearestObject [_corpse, "GroundWeaponHolder"];
nearestObject [_corpse, "WeaponHolderSimulated"];
#

It's one of these depending on what class they use. Not sure.

indigo snow
#

guess hes concerned for the case when two dudes die on top of each other but yea thats tough luck

#

maybe BI was nice and set some hidden variables but Id guess its engineland territory

little eagle
#

Yeah, but there is nothing better that I am aware of.

forest jasper
#

๐Ÿ˜ข

indigo snow
#

you might be able to cheat it yourself to some extent. replicate the creating of the weaponholder and move the weapon into it with a killed event handler and set a variable so you know which is what. Itll still be non perfect (e.g. if players drop other weapons or items in the holder or drop the weapon on the ground later when they decide against taking it).

#

but there are no hard links you can use in this case

forest jasper
#

that might be the reason why the holder aren't provide by event

indigo snow
#

during the event the unit still has the weapon in his inventory, or so id expect

tough abyss
#

@peak plover: pretty sure you can close any dialog by pressing Esc.

lusty canyon
#

any way to remove the map icon of an object? (hideobjectglobal still shows the units map icon)

indigo snow
#

You can't, they're baked into the .wrp

#

Oh wait

#

You mean the difficulty helper icon?

#

Dont think you can remove those individually

lusty canyon
#

just the regular unit a unit displays on the map, like darter for example has the quadcopter icon

indigo snow
#

Theyre a difficulty setting, I almost always have them off I guess. If its your script, try moving them away before hiding them. Maybe resetting everyones knowledge of it could work too

lusty canyon
#

so i could just do reveal 0? (hidden unit cannot be moved to edge of map, must be near player units, at lower diff they can see the icon)

peak plover
#

Play on a harder difficulty

lusty canyon
#

the diff is not up to me

#

i dont play this game, i just sqf it

tough abyss
#

Anyone have any issues with uavs created for diff factions with ```_vehicleObject = [[0,0,1000], 0," B_T_UAV_03_F", resistance] call BIS_fnc_spawnVehicle;
createVehicleCrew _vehicleObject;

#

main issue is that drones wont follow commands

lusty canyon
#

createVehcrew uses the default unit strings in the cfg so wouldnt a B_uav always spawn west crew?

#

i think you would need the I_uav class for it to be resistance?

indigo snow
#

The createVehicleCrew will take from a config entry iirc

little eagle
#

B_T_UAV_03_F
is on bluefore, but the side is resistance

#

Seems wrong.

indigo snow
#

Create it for the resistance side i guess

tough abyss
#

Well its to allow different factions to use different UAVS

indigo snow
#

But typical crew will be defined as regular blufor ai brains for the vehicle

tough abyss
#

that allows me to use it however the drone doesnt follow orders

little eagle
#

But createVehicleCrew will create a bluefor AI unit for the bluefor drone.

tough abyss
#

ah

#

so is there a way to add an independent AI?

little eagle
#

Because that is what the crew is.

lusty canyon
#

you would have to manually create units from the desired faction then move them inside

little eagle
#

createUnit and then moveInDriver

tough abyss
#

yep thanks ๐Ÿ˜„

little eagle
#

I_UAV_AI_F iirc

#

something like that

#

But then I still don't know if that allows indep to control a blufor drone class.

#

It's probably side locked anyway.

lusty canyon
#

wouldnt the vehicle side be determined by its crew?

#

if empty then its side civillian

little eagle
#

We are talking about drones. Who knows.

tough abyss
#

Wheres my reaction button

#

lol

little eagle
#

Drones don't follow the same logic as these SQF commands, side etc.

#

Not necessarily at least.

lusty canyon
#

another question about drones, how do you toggle the laser designator of a remote desig

indigo snow
#

Isnt it classified as a weapon? Try firing it

#

Or an appropriate action

lusty canyon
#

once you do the fire command laser will be perma on? how do you then turn it off?

indigo snow
#

Never played with it

lusty canyon
#

guess i could just remove the laser then give it back

tough abyss
#

yes the commands now work when i used creteUnit

indigo snow
#

createVehicleCrew creates the units defined at configfile >> "CfgVehicles" >> "B_T_UAV_03_F" >> "crew" so by using that command you just kinda turned him back into blufor

shadow sapphire
#

Anyone know how to leverage the init event handler?

still forum
#

put something in there and it will be executed at init

indigo snow
#

you cant use it in a mission by virtue of the fact you have to supply the unit to the addEventHandler command

#

I told you use the CBA one ๐Ÿ˜›

shadow sapphire
#

I gotcha. I just wish there was a way to access the init of the units spawned with the combat patrol module. The combat patrol module itself has an init field. I wonder if that's able to be leveraged the way that the inits of those units spawned by it would be. Probably not, but it makes me wonder hardcore.

indigo snow
#

no

#

that init field is for the module logic object

jovial nebula
#

Anyone knows if there's a way to change a variable dynamically in a config class ?
I'm talking about mission included ones

shadow sapphire
#

@indigo snow, drats! Thanks!

still forum
#

__EVAL maybe.. that's kinda dynamic @jovial nebula

queen cargo
#

would anybody be interested in a tiny tool that can PreProcess files?
in need of creating such a tool for testing purpose and might publish it if somebody needs

jovial nebula
#

(Me)
So no way for doing it externally?

indigo snow
#

depends on what you mean with dynamically really

queen cargo
#

__EVAL is the way to go for that

#

as dynamic as you can go

indigo snow
#

you can use __EVAL to change them when the mission gets selected, once

queen cargo
#

configs are designed to be static actually

#

so ...

#

everything that is needed to be actual "dynamic" --> changing during mission; should be done using SQF based variables

still forum
#

@queen cargo Just grab the GCC preprocessor as a binary and use that...

jovial nebula
#

Oh yeah that's without any doubts a better solution..

#

But , just for knowing, let's take this as an example

class MyClassUnderConfigFile {
class MyClass{
    class MySubClass  {
        MyVar1= 50;
        MyVar2= 10;
    };
};
};
queen cargo
#

@still forum i know there are other solutions, just asking
as when somebody would have had interest in such a tiny tool, i would put it in a separate project instead of dumping it in the end

jovial nebula
#

This for example is written in an included hpp file,is it possible to overwrite MyVar2 ?

still forum
#

There already is such a tiny tool. Publicly available.

#

@jovial nebula No

queen cargo
#

no @jovial nebula

jovial nebula
#

Okay, thx both ๐Ÿ˜ƒ

queen cargo
#

only with a separate config
as this is missionconfig, even that is no option

jovial nebula
#

Good to know

tired blade
#

Hey, anyone able to tell me how to set a trigger to spawn a logic entity when a player gets within 100m? i want to spawn Thirsk Fog (TH_FOG3) when my unit enters a base - thanks in advance!

shadow sapphire
#

What is Thirsk Fog?

#

@tired blade?

tired blade
#

its a logic entity we have in one of our mods that spawns fog locally rather than over the whole map, helps things run slicker

shadow sapphire
#

Interesting!

indigo snow
#

just use createObject to create the thing in the trigger activation field

tired blade
#

can you give an example @indigo snow i'm really new to this stuff, sorry

indigo snow
#

0 = "TH_FOG3" createVehicle getPos thisTrigger < Put that in the trigger activation field

tired blade
#

cool ty

queen cargo
#

that would spawn the frog then not local but global

#

you probably want createVehicleLocal instead

#

still would wish there was a createUnitLocal ...

tired blade
#

sorry, that didn't work, couldn't get anything to trigger, used the following settings:
type: none
Activation: BLUEFOR
Activation type: Present

in Condition box: This
in On Activation: 0 = "TH_FOG3" createVehicle getPos thisTrigger

Nothing else set

indigo snow
#

are you sure that classname is correct, then?

tired blade
#

when i hover over it says Fog Strenght 3 and underneath TH_FOG3 (strenght is mispelled on the module)

#

i've tried with both names, doesn't work

polar folio
#

so VR blocks don't work with setobjectTexture? could've sworn they did at some point

#

or am i messing it up?

subtle ore
#

@badbenson#0154 afaik any object works with setObjectTexture.

polar folio
#

nah. needs model.cfg and model itself set up right

#

i just wanna make it invisible but keep collision

subtle ore
#

Ah, gotcha. Thanks for that, I'll remember that for future reference.

polar folio
#

well what you describe would be definately desired. but don't get me started on lack of standards in BIS models. it would be so useful if every model would be set up to be used with that command

coarse olive
#

Ok, 10 minutes later and counting 3 hours

#

Can someone help me with this

#

16:29:05 Mission 3SWInsurgencyV6.Altis: Missing 'description.ext::Header'

#

I think this is what's preventing me from loading my mission on a server

gray sphinx
#

hey, does anyone know what functions I could use to keep civilian units in the passenger seats of a vehicle occupied by OPFOR? setcaptive doesn't seem to do the trick :x

little eagle
gray sphinx
#

ooh that sounds promising, I'll give it a try

#

thanks homie :]

jade abyss
#

lockCargo only locks the seat from getting IN, not out.

leaden plover
#

hey guys, i have a question regarding the "setDriveOnPath" command, how do i record the path im making? as i tried using the path i made with unit capture/unit play but that doesnt seem to work.

rancid ruin
#

it takes an array of positions, so it should be pretty easy to do

#

what i'd do is add your start point to an array, then move along the path you want to record and add your current position once it's >15m or so away from the last position

still forum
#

@badbenson#0154 VR blocks 100% work with setObjectTexture. I experimented around with projecting a UAV camera onto it.
I dunno about making it seethrough though. You could try with a different material.

polar folio
#

hm yea. maybe the material. ended up doing something else. the idea was to disable collision to units that could get close to the car that uses setDriveOnPath to keep the vehicle from doing avoidance behavior. worked great but i had to find a way to still have collision when you walk against the vehicle. so i wanted to attach an invis VR block. ended up jsut using a clone fo the vehicle itself. made more sense anyways.

tardy yacht
#

Could an array contain too much stuff? I am using diag_log to print an array and the string just cuts off at some point.

rancid ruin
#

you can only diag_log so much stuff

#

iterate through the array and log them one by one

still forum
#

diag_log has a limit yes.
There is no real Array limit. Atleast not one you would hit.

tardy yacht
#

That's what I just did I was just being a complete dumbass. Thanks my dudes.

little eagle
#

From Arma 3 v1.55.133789 arrays are limited to maximum of 9,999,999 (sometimes 10,000,000) elements

tardy yacht
#

I have a problem I just can't understand. I'm trying to send messages to a player. To locate said player I'm using a string of numbers which I find by cycling through the playableUnits and checking for the variable "cell_number" which is public. When the player joins after me, it works. When they join before me, it doesn't. I thought it was a JIP issue and the variable was just not set on my client, but when checking for the variable using the console and the command "cursorTarget getVariable "cell_number"" it returns the correct value. When trying to send a message to the number my script runs and outputs my diag lines to the RPT saying it found civ_2 with the exact number I inputted, but somehow fails just like if it couldn't find the unit attached to the variable.

still forum
#

It might be that your script executes before JIP is done and so it doesn't know the variable yet. If it still doesn't work after you checked that the variable is available.. dunno

tardy yacht
#

I've just checked, the variable is set on the guy in front of me. I even tried setting it through the console and tried again. Every time it can't seem to find the unit attached to it. The problem is it actually finds it and tells me exactly which unit matched the number in my RPT.

#

The client RPT.

#

Does the Debug see stuff the rest of my client can't see?

#

Does the Debug console somehow see what the server sees instead of what my client sees?

still forum
#

So.. Your script can't find the Unit. But it finds the Unit and logs it to RPT?.. I don't really understand..

tardy yacht
#

Exactly, I don't understand either.

#
 [_msg,name player,0] remoteExecCall ["TON_fnc_clientMessage",>
10:35:15   Error position: <remoteExecCall ["TON_fnc_clientMessage",>
10:35:15   Error Type Any, expected Number, Side, Object, Group, String
10:35:15 "Using civ_2, found number: 64621"
10:35:15 "Using civ_1, found number: 44664"
10:35:15 Error in expression <layableUnits;
#

_msg is a set string

#

Any is because I don't have a check for if it doesn't find the unit.

#

Using ... blah blah is the diag output.

#

Inputted number is 64621

still forum
#

it is calling remoteExec before it found the number? Or are you just diag_logging after that?

tardy yacht
#

diag_log after

#
TON_fnc_cell_textmsg =
compileFinal "
    private [""_msg"",""_to""];
    ctrlShow[3015,false];
    _msg = ""MATCH!"";
    _num = ctrlText 3004;

    _length = count (toArray(_msg));
    if (_length > 400) exitWith {hint localize ""STR_CELLMSG_LIMITEXCEEDED"";ctrlShow[3015,true];};
    
    if (_msg isEqualTo """") exitWith {hint localize ""STR_CELLMSG_EnterMSG"";ctrlShow[3015,true];};
    _to = {
        diag_log format [""Using %1, found number: %2 compare to %3"", _x, _x getVariable ""cell_number"", _num];
        if ((_x getVariable ""cell_number"") isEqualTo _num) then { _x };        
    } forEach playableUnits;

    [_msg,name player,0] remoteExecCall [""TON_fnc_clientMessage"",_to];
    [] call life_fnc_cellphone;
    hint format [localize ""STR_CELLMSG_ToPerson"",name _to,_msg];
    ctrlShow[3015,true];
";
#

Right now _msg is static to "MATCH!"

#

Actually

#

I'm diag_logging before

#

I might be missing something really stupid. Something I do quite often.

still forum
#

So it errors on one message. And on a completly different message it works

tardy yacht
#

Yes

still forum
#

so it apparently doesn't find the number of the first message

tardy yacht
#

Right now the guy that joined before me can message me, but I can't message him.

#

If I join before him, I can message him, he can't message me.

#

But somehow the client can still compare the variable (it finds it) but completely fails it.

#

like 2 = 2 --> no

still forum
#
    private ["_msg","_to"];
    ctrlShow[3015,false];
    _msg = "MATCH!";
    _num = ctrlText 3004;

    _length = count (toArray(_msg));
    if (_length > 400) exitWith {hint localize "STR_CELLMSG_LIMITEXCEEDED";ctrlShow[3015,true];};
    
    if (_msg isEqualTo "") exitWith {hint localize "STR_CELLMSG_EnterMSG";ctrlShow[3015,true];};
    _to = {
        diag_log format ["Using %1, found number: %2 compare to %3", _x, _x getVariable "cell_number", _num];
        if ((_x getVariable "cell_number") isEqualTo _num) then { _x };        
    } forEach playableUnits;

    [_msg,name player,0] remoteExecCall ["TON_fnc_clientMessage",_to];
    [] call life_fnc_cellphone;
    hint format [localize "STR_CELLMSG_ToPerson",name _to,_msg];
    ctrlShow[3015,true];
#

your _to is the value returned by the forEach?

tardy yacht
#

yes

still forum
#

forEach doesn't return anything

tardy yacht
#

_x

#

no ?

#

if theres no match it doesnt return anything

still forum
#

oh yeah.. okey.. It returns the value of the last Element

tardy yacht
#

oh

#

well

#

fuck me

#

so exitWith { _x }; ?

still forum
#

your code is confusing

tardy yacht
#

Most of this is written by however made it first, I just changed the variables.

#

whoever*

still forum
#

you can use count to get the length of a string. You don't need toArray

tardy yacht
#

I didn't write that

still forum
#

ยฏ_(ใƒ„)_/ยฏ

tardy yacht
#

Alright just read the wiki entry. I was indeed using forEach wrong.

#

Thank you

nocturne basalt
#

hi guys. I just attached an object to my vehicle, but its orientation is -180. whats the easiest way of rotating it around? I tried both vectorDir and setDir

indigo snow
#

either setVectorDir or setVectorDirAndUp will do the job and provide a relative rotation to the attached to object

nocturne basalt
#

so if I get the dir of my vehicle like this
_dirVector = vectorDir _vehicle;

and set it on my attached object like this
_object setVectorDir [_dirVector]

would that work?

#

hm no.. It wont

#

setVector ofc requires 3 params

#

do I set the vector before of after I attached it?

indigo snow
#

after

little eagle
#

@nocturne basalt Use

_attachedObject setDir 180;
nocturne basalt
#

@little eagle I tried that but my attachedObject is always stuck in the same position... weird

little eagle
#

Ofc. it will be in the same position. But rotated 180ยฐ.

nocturne basalt
#

Yeah thats what I meant. It's always -180

little eagle
#

Did you setDir 0 or setDir 180?

nocturne basalt
#

I tried both, but I may have set it before I attached it.. I will give this a go tomorrow. Thanks so far guys. Have a good night

#

Or day

little eagle
#

You have to use setDir after attaching it.

nocturne basalt
#

Ok I will let you know if it worked

little eagle
#

And you have to use 180, not 0. No idea why you say it's -180 every time. How did you determine that??

nocturne basalt
#

Well it's the other way around. I didn't have the value

#

Weird that stuff are rotated 180 by default when attached

little eagle
#

It's very likely not -180, but the models simply are oriented differently.

nocturne basalt
#

This model is the same orientation that my vehicle has

little eagle
#

By default, the objects are attached 0ยฐ relative to the attachedTo object.

nocturne basalt
#

Strange

little eagle
#

IIrc some objects have a config entry to modify the models orientation when placed in the editor. That might be ignored by attachTo. ... or I'm thinking of a different game again.

nocturne basalt
#

Oh... It's config is really simple

#

Dont know were it should say it's rotated

#
class House_F;
    class VR_Shape_base_F: House_F
    {
        class AnimationSources;

        author="$STR_A3_Bohemia_Interactive";
        mapSize=1;
        _generalMacro="VR_Shape_base_F";
        scope=0;
        scopeCurator=0;
        displayName="$STR_A3_CfgVehicles_VR_Shape_base_F0";
        model="\A3\Weapons_F\empty.p3d";
        DLC="Mark";
        vehicleClass="Structures_VR";
        editorCategory="EdCat_VRObjects";
        editorSubcategory="EdSubcat_Blocks";
        destrType="DestructNo";
    };
    class Sentinel_legs: VR_Shape_base_F
    {
        author="Battlestad";
        scope=2;
        scopeCurator=2;
        displayName="Sentinel_legs";
        model = "\WHwalkers\Sentinel\model\sentinel_legs.p3d";
        DLC="Mark";
        icon="iconObject_1x1";
}
#

Thats it

little eagle
#

Could be inherited.

austere granite
#

Could anyone point me towards that UI thing that kinda fuctions like a listbox, but has control groups instead?

#

They were doing that a while ago, but i can't find it for the life of me

queen cargo
#

listNBox?

#

or what youre talking about?

#

point to an image or whatever

little eagle
queen cargo
#

treeview has like nothing to do with a listbox Oo

#

maybe the fact that tree view can be build using listboxes

#

not in arma

#

but in "normal" ui stuff

little eagle
#

Ah, I was thinking of control table or whatever it's called. Can't find it on the wiki.

tardy yacht
#

I've been looking for an easier way to do this, but couldn't find one. I can't believe this is the optimal way to do it:

_numbers = ["0","1","2","3","4","5","6","7","8","9"];
_num = ctrlText 3006;
_name = ctrlText 3007;

for [{_i = 0}, {_i < (count _num)}, {_i = _i + 1}] do {

    if !(_x in _numbers) exitWith { diag_log format["BAD CHAR IN NUM! %1",_x] };
};

for [{_i = 0}, {_i < (count _name)}, {_i = _i + 1}] do {

    if (_x in _numbers) exitWith { diag_log format["BAD CHAR IN NAME! %1",_x] };
};
#

I just want to check for specific chars in my string.

tame portal
#

@tardy yacht I'd iterate through the string to check and see whether the current character can be found via "find" in the array of whitelisted characters, if it can't, it prints the appropriate message

still forum
#

toArray your string. Use count to find non-conforming characters and check if returned count > 0

#

What is your for loop doing there? you are not using _i anywhere. And where is your _x coming from?

tardy yacht
#

Yeah that's just me doing random shit again.

still forum
#

{_x < (whatever ascii thingy 0 is) || _x > (whatever ascii thingy 9 is)} count toArray _num > 0

tardy yacht
#

I didn't actually run this exact code, I just threw those in to make sure people understood what I was trying to do.

#

Forgot to proof read.

#

Or to think.

#

Ok so when I toArray a string all its chars are turned into ASCII or just the numbers?

still forum
#

into the numbers corresponding to the char

#

Don't know how that acts with UTF-8 though

tardy yacht
#

I think I got the basic gist of it, but I can't understand your line. Could you please explain it to me?

#

Turned into what I need, it'd look something like this:

{_x > 47 && _x < 58} count toArray _num > 0
#

But what in heck does that do

still forum
#

it goes through all the characters in the string and counts all characters that are not between "0" and "9" and if that count is > 0 meaning atleast one character is not in that range it returns true

vivid quartz
#

i suppose you just want to check if the value is numeric, for altis life, there is a function for it isNumber

private["_valid","_value","_compare"];
_value = _this select 0;
_valid = ["0","1","2","3","4","5","6","7","8","9"];
_array = [_value] call
{    
    private["_in","_i","_arr","_out"];
    _in=_this select 0;
    _arr = toArray(_in);
    _out=[];
    for "_i" from 0 to (count _arr)-1 do {
        _out=_out+[toString([_arr select _i])];
    };
    _out
};
_return = true;

{
    if(_x in _valid) then
    {}
    else
    {
        _return = false;
    };
} foreach _array;
_return;

@tardy yacht

tardy yacht
#

Dedmen's thing worked just fine and seems to have a very fast execution time. I think I'll stick with it.

#

But thanks for letting me know that function exists, might come it useful in other situations.

still forum
#

@vivid quartz My first, second and third thought when I look at that code: "WTF"

#

You have built a nice Rube-Goldberg machine there to do a very simple task

#

Wait.. for altis life, there is a function for it isNumber You copied that.. From Life?

tardy yacht
#

I think that's Altis Life's way of doing it.

open vigil
#

๐Ÿคฆ

vivid quartz
#

yeah, it was weird for me, because he didnt use isNumber function already, as he was editing altis life

#

maybe hes editing something else idk

still forum
#

Holy crap...

#

I knew Life code was bad.. But this...

open vigil
#

Listen to Dedmen and you'll be alright

tardy yacht
#

Is Life's code that bad?

open vigil
#

spaghetti code

still forum
#

Look at that code that @vivid quartz posted.

open vigil
#

and thats being rude to spaghetti code

tardy yacht
#

Yeah I got that part. That's extreme.

still forum
#

That code is horribly outdated and is violating at least a dozen points on the "Code optimization" wiki page

tardy yacht
#

The thing is, I'm learning how to script as I go. Most of what I got is by reading through some of Altis Life's files. If you're telling me the thing is garbage that means I ain't learned shit.

still forum
#

That code is taking your string. Splitting it to an array. Then taking each element of the array using the worst possible loop. turning it into a String again and appending it to an array using the worst possible append method. And then it does basically the check that you already had before.

#

You still learn to code. Syntax and stuff. But yeah. Altis life is not the best to learn off of.
Just ask here if you have any questions. If you provide example code you will get screamed at about how bad it is. But people will tell you how to fix it.
I'd suggest reading https://community.bistudio.com/wiki/Code_Optimisation

tardy yacht
#

I knew people hated it, but I didn't know it was that bad.

still forum
#

I don't know if all Life code is thaaat bad. I'd guess newer stuff is better. But I don't see much Life code

tardy yacht
#

Yeah I've started reading some bits of this page whenever Google would throw it at me.

cold pebble
#

Life code has improved a lot recently

tardy yacht
#

Yeah they're re-writting a lot of stuff.

cold pebble
#

Thanks to BoGuu and a few others, but there's still lots of old crap which hasn't been changed

tardy yacht
#

What confuses me is how sometimes it does something one way, but the next file does the exact same thing in a completely different way to achieve the exact same outcome.

#

Often left me blindly picking both ways to do it.

#

between

#

Oh I can edit on Discord

#

Forgot that one.

cold pebble
#

Possibly because tonic made one way, then someone else did a different way but nobody decided to delete the worse one

tardy yacht
#

Some of the bigger servers probably re-wrote the thing already anyways.

peak plover
#

There's like 10 versions of life mods

cold pebble
#

Less then you think @tardy yacht

#

Most big servers just keep updating to latest patch of Altis Life

peak plover
#

A lot of it isn't even open source, becaus money is invloved, it seems to me like a rotting bucked of cancer

cold pebble
#

Of course there's lots of versions, Altis Life itself is on 5.0

#

And Altis Life is totally open source, so you can't say much vs them guys

tardy yacht
#

Seriously? I'd think stuff like Olympus, Asylum and GTA would've re-written it by now.

cold pebble
#

In the world of 3.x they'dve not stood a chance

#

As it was horrific

#

And it was like putting a bandage on a 10m wound

tardy yacht
#

What he means is there are lots of other life mods. I came across a couple dozen different alterations when looking for specific snippets online.

cold pebble
#

But with 5.0, the new stuff BoGuu and friends have done, have made it so everything works better, as well as easier to customize yourself

peak plover
#

money + modding = ๐Ÿ’ฉ

tardy yacht
#

One of them looked particularly promising but they had a weird system to "let you in" on their code. Had to let'em see how good a coder you are to not "ruin their image" or some bullshit like that.

still forum
#

@tardy yacht are you sure

{_x > 47 && _x < 58} count toArray _num > 0

works? I think that is always true if the string has atleast one number.

{_x < 47 || _x > 58} count toArray _num > 0

This will return true if there is atleast one non-number which is what you needed right?
You should better test that in Debug console before putting that in your final code

cold pebble
#

Also you gotta remember @tardy yacht, wouldn't you rather be a lazy arse, do no work to optimise the framework, then get donations, either way you'll achieve the same goal ^_^

tardy yacht
#

I've checked both and yours does it faster. Doesn't need to go through second check if first is true @still forum

still forum
#

mine is faster yeah. But is it correct though?

tardy yacht
#

Yep

#

I tried it real quick and it seemed to work nicely.

still forum
#

Maybe my brain is weird.. In my brains script evaluator that doesn't work.. What am I doing wrong ^^

tardy yacht
#

Gave it different strings of numbers sometimes throwing in a letter or two and it caught'em easy

#

Basically anything that's out of bounds on ascii is be-bye

still forum
#

I must be doing something wrong then.. Probably didn't get enough sleep ยฏ_(ใƒ„)_/ยฏ

tardy yacht
#

Yeah I've asked some weird shit on here while I lacked sleep.

#

Most of which you fixed.

#

Or commy made me feel weak with his one-liner game.

dusk sage
#

Hmm. You could maybe abuse the parseNumber command too

cold pebble
#

BoGuu heard spaghetti code

#

๐Ÿ˜›

still forum
#

parseNumber won't work with telephone number sized numbers. Because float precision will take a dive at some point

#

my method works for unlimited long numbers

tardy yacht
#

My tel numbers are 5 digits long anyways.

#

3 per player, all 3 start with the same digit and then 4 random digits.

still forum
#

parseNumber would work in that case. Not sure if it is much faster if you convert the string to a number and then convert it back and then do a string comparison to check if it's still the same to see if it's a number

#

my code translated into C would be veeeery close to the optimum. So I'd guess in SQF it's also quite good.

tardy yacht
#

I'm also checking against numbers in a string of text for the contact's name though.

#

A contact's name can be somewhere between 4 to 25 chars.

little eagle
#
_return = true;

{
    if(_x in _valid) then
    {}
    else
    {
        _return = false;
    };
} foreach _array;
_return;

^ this is very creative.

dusk sage
#

Needs more empty blocks

little eagle
#

I wonder who came up with if (blah) then {} else {blub};

tame portal
#

Put the whole thing into {}

#

@little eagle alot of people don't know how to change the condition to only match the else case

#

So they just put in {} else {

little eagle
#

How do you write code and not know about the simplest of all operators?

peak plover
#

๐Ÿ‘Œ๐Ÿฟ

tame portal
#

@little eagle copy pasting

little eagle
#

Yes, but someone must've come up with this in the first place.

tame portal
#

Actually who knows what's happening in their heads lol

#

I guess someone who doesn't really know how to code gave this advise to someone else and it eventually spread

peak plover
#

Certified scripters

little eagle
#

Btw, none of these work with commas.

#

decimal dots* I mean

tame portal
#

Microsoft Trusted Certified Technician

#

@peak plover

sand pivot
#

anyone know of a way to list active event handlers on an object? I want to remove duplicates. I could just loop through and remove any with index >0 but wanted to debug what is being created first.

still forum
#

there is also removeAllEventHandlers
I know of a way. But not possible with SQF

little eagle
#

Not possible. You should avoid adding duplicates in the first place.

sand pivot
#

yea, it wasn't intended but i think it's happening, i'll dig further why, thanks

halcyon crypt
#

anyone got any clue what might add like 1700 empty lines to a precompiled function? It happens somewhere in the included script_component.hpp but I can't find anything weird ๐Ÿ˜ฆ

still forum
#

You just answered yourself @halcyon crypt

little eagle
#

@sand pivot You could add this guard:

if (isNil {_object getVariable "MyTag_hasEH"}) then {
    _object setVariable ["MyTag_hasEH", true];
    _object addEventHandler [...];
};
still forum
#

a precompiled function
#defines and other preprocessor commands are taken out of the code.. and empty lines are left

#

so you #include a file with a lot of empty lines and you wonder why there are empty lines

sand pivot
#

ha, that's what i was writing just now, thanks for beating me to the puch @little eagle you are the man!

little eagle
#

Alternatively to just true, you could store the eventhandler id. In case it is something you want to remove later.

halcyon crypt
#

@still forum so CfgFunctions is basically fucked? :/

sand pivot
#

yup, that is where i was leaning, storing the id

little eagle
#

๐Ÿ‘

still forum
#

@halcyon crypt How is that related to CfgFunctions? Every precompiled function with a big #include and macros in it has a lot of empty lines

#

you can just remove all the empty lines from your includes

#

if you want to get rid of them

halcyon crypt
#

thing is we're including CBA .hpps (e.g. #include <\x\cba\addons\main\script_macros.hpp>)

#

wouldn't all mods using CBA have that same issue then?

still forum
#

they all have the issue. yes.

halcyon crypt
#

so error line numbers are always "wrong".. damn ๐Ÿ˜ข

still forum
#

no

#

error line numbers refer to the source before preprocessing

#

except if you have comments before your #include

halcyon crypt
#

the includes are before the comments

#

yet errors still show line + 1700-ish lines

still forum
#

we were talking about that a few days ago weren't we?

halcyon crypt
#

yes

still forum
#

preprocessFile or preprocessFileLineNumbers? Are you just using CfgFunctions?

halcyon crypt
#

just CfgFunctions

still forum
#

Can you PM me the output of preprocessFileLineNumbers "yourfile.sqf" ?

tough abyss
#

i have a old script
[[0],"life_fnc_beast",_unit,false] call life_fnc_MP;
im trying to change to remoteExec
[0]remoteExec["life_fnc_beast",_unit];
is that how its done?

still forum
#

looks correctish to me

tough abyss
#

if i was going to test tthis on me would this work

#

[0]remoteExec["life_fnc_beast",player];

indigo snow
#

one way to find out

tough abyss
#

i try it but didnt work so was seeing if that how it should be done

little eagle
#

Depends on what life_fnc_MP is.

tough abyss
#

this script is for altis life if that helps

little eagle
#

I figured as much.

#

You should ask on a life forum

tough abyss
#

ok just want to see if i could get a quick fix! thanks!

#

It's probably something like BIS_fnc_MP.

cold pebble
#

Yeah BIS_fnc_MP achieves the same thing as life_fnc_MP

tough abyss
#

Use remoteExec instead.

still forum
#

@tough abyss That is exactly what we were talking about.

tough abyss
#

:thumbsup:

jovial nebula
#

I'm not able to check it but,is there a CfgWeapons >> Items class ?

tardy yacht
#

Are there any application differences between

_array = [];
_array pushBack life_hunger;
_array pushBack life_thirst;
_array pushBack (damage player);
_packet pushBack _array;

AND

_packet pushBack [life_hunger,life_thirst,(damage player)];
#

Execution time is split in half on the single statement line.

#

And from what I gather the outcome is exactly the same.

indigo snow
#

No difference

tardy yacht
#

You had me confused before that edit.

indigo snow
#

Didnt see the packet bit

tardy yacht
#

So you're telling me I could just change all of the client to server packet sending stuff in Life and basically cut the resources needed for it in half?

#

I just checked, every single file uses the first snippet I posted.

#

Well, everything related to sending an array of info to the server that is.

indigo snow
#

I mean its the same so go for it

tardy yacht
#

Neat.

#

Thanks

quartz coyote
#

Hello, for some reason this isn't working :

[format["<t color='#FFFFFF' size = '1' shadow='1' align='center' font='PuristaBold'>Winner is %1</t>",(Best_player)],-1,-1,8,2,0,3088] spawn bis_fnc_dynamicText;

Based on my initServer.sqf :
DM_End = false;

while { !DM_End } do {
{
_Pscore=score _x;
_last= _x getVariable["score_last",0];
if (_Pscore != _last) then {
_x setVariable["score_changed",1];
};
_x setVariable["score_last",_Pscore];
Best_player = name _x;
} forEach allPlayers;
sleep 1;
};

Can someone help ?

sand pivot
#

what isn't working?

rancid pecan
#

hello

#

how to change life_licenses to life_adsa14f

#

=?

dusk sage
#

?

#

Just change it?

sand pivot
#

is there a scripting command to remote control a bird? The following doesn't appear to work.

_bird = "Kestrel_Random_F" createVehicle [POS]
player remoteControl _bird;
dusk sage
#

I'm more questioning how you think [pos] is working?

sand pivot
#

that is a placeholder for actual position

#

it spawns fine

dusk sage
#

Oh okay

#

Have you tried switchCamera on the bird? (Internal)

sand pivot
#

no

#

it doesn't appear to work, but that's likely because remoteControl isn't working?

dusk sage
#

Did you try to switchCamera?

sand pivot
#

just did, no dice

dusk sage
#

switchCamera works for me, but it will not move

sand pivot
#

i must have done switchCamera wrong

dusk sage
#

Not used the command enough to help too much, seems like the choice of object doesn't help though

#

_bird switchCamera "internal"

sand pivot
#

yup, that works

still forum
#

@indigo snow Are you really saying

[life_hunger,life_thirst,(damage player)] is equal to [[life_hunger,life_thirst,(damage player)]] ?!
wtf

indigo snow
#

No look closer

#

I got confused too

still forum
#

ah

#

lul

indigo snow
#

In the end it gets pushed to a second var

still forum
#

Life code....

indigo snow
#

/shrug

sand pivot
#

@tough abyss no, i tried taking control via scripting and via curator but it doesn't get added to zeus via ACE nor ARES "add Objects to Zeus" modules

#

error Bad vehicle type Kestrel_Random_F

indigo snow
#

Its probably not advanced enough to be controllable

#

missing lots of config structure and whatever it all needs

sand pivot
#

yea, that's what i'm thinking, it probably can only be controlled via scripting

#

yes, that is where it is

#

i'll give that a shot, hopefully the mem points don't cause issues. we'll see

#

and i'll need to figure out the model.cfg unless there is a way to extract that?

#

the class to inherit that is

quartz coyote
#

@sand pivot The text with the name of the player is not displaying in MP

tame stream
#

Hi, how can i disable the load function when i have a arsenal in my mission. Added custom arsenal and i dont want the players to load there own saved loaout, wil break my mission and player will abuse it.

nocturne basalt
#

@little eagle setDir -180 worked after attach. Guess I was a little tired when I tried this last night..
thanks

little eagle
#

Why -180 and not 180?

subtle ore
#

does getDir return the direction in a compass bearing direction or rotation in degrees?

little eagle
#

both

#

compass bearing in degrees...

subtle ore
#

Oh. duh

#

Well, it doesn't always seem to be accurate

little eagle
#

Sure.

subtle ore
#

setDir 180 is almost never actually 180.

little eagle
#

Uhm, yes it is?

subtle ore
#

๐Ÿคท

indigo snow
#

like what else? a slight offset because of terrain gradient?

subtle ore
#

Nope.

#

I'm not having difficulties applying it.

nocturne basalt
#

@little eagle have no idea ^^

empty pagoda
little eagle
#

It's as awkward as writing setDir 540

empty pagoda
#
Error in expression <diag_log _this; kick (_this select 0);>
  Error position: <_this; kick (_this select 0);>
  Error Missing ;
still forum
#

@DevSec#6078 What is kick supposed to be?

#

ah I see.

empty pagoda
still forum
#

diag_log doesn't work in there

#

You can only use the stuff shown on wiki

empty pagoda
#

so there is no way to know what is inside the params?

still forum
#

yes

empty pagoda
#

that sucks

#

:/

still forum
#

Do you want to know what params are available?

empty pagoda
#

id really need to debug what is inside those params. it seems like onHackedData kicks for createsimpleobjects

still forum
#

Yeah.. Can't tell you that. I might be able to check what params you get. But not the values you actually have

indigo snow
#

I mean the wiki gives the handler parameters

still forum
#

lul. My browser was moved offscreen so I didn't see that.

little eagle
#

user id, file name

#

Can't really do much with these when you can only use the kick command in there.

still forum
#

if might work

empty pagoda
#

ye, thats why i want to know what is causing the kicks, so i can make a if expetion for those cases

still forum
#

nope.
users, ban,kick, numberOfFiles, lock, checkFile, checkExe

#

that are literally all script commands available

empty pagoda
#

because it seems like that as soon as the server spawns in a few objects with createsimpleobjet using models from the mission file, onHackedData starts kicking people

little eagle
#

No if, then, else, Dedmen?

still forum
#

nope

#

not even string comparison

#

you can write variables though

little eagle
#

Well then it's pointless to pass the file names in the first place, no? I guess you can use checkFile whatever that does.

#

global vars?

still forum
#

But in a private namespace only accessible in serverside scripts

little eagle
#

So only local vars or is this an inaccessable namespace?

still forum
#

checkFile takes a fileIndex. not a fileName

#

it is a namespace like any other. You just can't access it via SQF command

little eagle
#

k

empty pagoda
#

so what would you suggest what i should to now to fix my problem?

#

should i just disable onHackedData?

still forum
#

Wow.. OnHackedData receives the filename. Which you literally can't do anything with. checkFile wants a fileID not a name.

empty pagoda
#

might be bad

still forum
#

yes

little eagle
#

What's a file id anyway?

still forum
#

index in some file table probably

little eagle
#

So it's a float?

still forum
#

number.. yeah

little eagle
#

for when you have negative entries in the list.

empty pagoda
#

well, i mean select seems to work inside the eventhandlers, so i dont really see why if wouldnt

still forum
#

checkFile just queues a check. Doesn't return anything and you have no way of receiving the result

#

Because eventhandlers are normal SQF and server side scripting is not?

#

Eventhandlers are SQF like any other script

little eagle
#

kick is definitely not a SQF command.

still forum
#

it is

#

Just not available outside of server side sqf

nocturne basalt
#

@little eagle setDir 180 worked also.. same result

little eagle
#

"server side sqf" is different from "forest and maddow sqf" then.

#

@nocturne basalt Of course. That is how circles work.

#

They go around and around forever.

empty pagoda
#

@still forum no i didnt mean sqf eventhandlers

still forum
#

oh...

empty pagoda
#

onUnsignedData = "kick (_this select 0);";

still forum
#

right...

#

Guess I need to look closer

empty pagoda
#

now im getting session lost

#

for no reason

#

wtf

#
20:48:33 Reading mission ...
20:48:36 Mission read.
20:48:46 Game started.
20:49:40 Player Adi Frost disconnected.
20:49:40 BattlEye Server: Player #0 Adi Frost disconnected
#
 Mission file: BountyHunters (__cur_mp)
 Mission world: Malden
 Mission directory: mpmissions\__cur_mp.Malden\
Land_NetFence_02_m_gate_v1_closed_F: Door_1_locked_rot - unknown animation source door_1_locked_source
c:\w\stable\futura\lib\network\networkserver.cpp NetworkServer::OnClientStateChanged:NOT IMPLEMENTED - briefing!
Attempt to override final function - bis_fnc_storeparamsvalues_data
"======================================================"
"server init started..."
"======================================================"
Performance warning: Very large search for 224112 (>250 m)
Strange convex component202 in a3\structures_f\households\house_small01\d_house_small_01_v1_f.p3d:geometryView
Strange convex component203 in a3\structures_f\households\house_small01\d_house_small_01_v1_f.p3d:geometryView
Performance warning: Search for 28e52c8c100# 224112: ttowerbig_2_f.p3d was very large (1675 m)
CallExtension loaded: real_date (E:\SteamLibrary\steamapps\common\Arma 3 Server\@bountyhunters_server\real_date_x64.dll) [x๏ฟฝg๏ฟฝ]

Trying to execute a disabled command 'addaction' (2 args)
Scripting function 'bis_fnc_execvm' is not allowed to be remotely executed
 Mission id: cf64003040c75bd8b68eaa21dc76c93a9151b20d
CallExtension loaded: inidbi2 (E:\SteamLibrary\steamapps\common\Arma 3 Server\@inidbi2\inidbi2_x64.dll) []

client:

20:48:34 Starting mission:
20:48:34  Mission file: BountyHunters (__CUR_MP)
20:48:34  Mission world: Malden
20:48:34  Mission directory: mpmissions\__CUR_MP.Malden\
20:48:45 Scripting function 'bis_fnc_execvm' is not allowed to be remotely executed
20:48:46  Mission id: cf64003040c75bd8b68eaa21dc76c93a9151b20d
#

now the server closes connection to the client for no apparent reason

#

the cause is createsimpleobject, as soon as the server spawns in models with createsimpleobject. clients get disconnects

#

has anybody experienced with createsimpleobject an idea why this is happening?

indigo snow
#

declare it once in an upper scope

#
private _a
[] call {
    _a = 4
};
// _a is 4
#

well it equals [1] but yea

#

dont even need to give it a value iirc

#

scrub it down, empy most if not all code, and start re-adding until you get the problem

#

because the above example I posted works

nocturne basalt
#

@little eagle lol. yeah thats true ๐Ÿ˜‚

bleak schooner
#

I can use [4] execVM "showDamage.sqf";to pass arguments. Are there any other characters instead of [] I can use to do this?

#

Or else: How can I pass an arguent in here: ["SCOTS Training Ground", "Emergency_yelp", ["YELP Sirene"], { _handler = ['2'] execVM "Siren.sqf" }, "",[DIK_F, [false, true, false]]] call cba_fnc_addKeybind;

#

because [] doesn't work here

still forum
#

facepalm

#

What argument would you want to pass

#

and you can pass any Type.

indigo snow
#

AH, [] arent just "characters", it's a single ARRAY-type variable

tardy yacht
#

I know this isn't a "life" scripting Discord, but does anyone know if I can just create a new table using Heidi and then use it? I've added a table and now when I try updating stuff it doesn't work. It works when inserting, when selecting, but update doesn't work. I have tried manually inputting the query in Heidi (I am temporarily using the same MySQL user for the game and Heidi, same grants) and it works just fine.

dusk sage
#

Not related to life, but yes

#

If your INSERTs/SELECTs are working, then UPDATE will work

#

Ultimately you're doing something wrong

dusk sage
#

(check extDB logs)

warm gorge
#

Is parseSimpleArray meant to work with string arrays which use the ` symbol for encapsulation?

tough abyss
#

No it doesn't. Pretty sure that is in biki

quartz coyote
#

Hello, for some reason this isn't working in MP :

[format["<t color='#FFFFFF' size = '1' shadow='1' align='center' font='PuristaBold'>Winner is %1</t>",(Best_player)],-1,-1,8,2,0,3088] spawn bis_fnc_dynamicText;

Based on my initServer.sqf :
DM_End = false;

while { !DM_End } do {
{
_Pscore=score _x;
_last= _x getVariable["score_last",0];
if (_Pscore != _last) then {
_x setVariable["score_changed",1];
};
_x setVariable["score_last",_Pscore];
Best_player = name _x;
} forEach allPlayers;
sleep 1;
};

Can someone help ?

tardy yacht
#

How is it not working?

quartz coyote
#

@tardy yacht the message is not displaying

#

@tardy yacht works perfectly in SP

tardy yacht
#

I'd try making my variables public. (setVariable ["VAR",value,true])

#

The last parameter is a boolean that broadcasts the value or not.

quartz coyote
#

@tardy yacht Wont this spam the bandwidth ?

tardy yacht
#

It will, but just to check out if it works that way. If it does, then you can find which ones actually need to be broadcast. That is, if the problem is related to this.

#

Or wouldn't it be because you're calling the dynamic text thing on the server and never actually calling it from the client?

quartz coyote
#

@tardy yacht If I display the msg with my timer (ingame every second) it works in MP and SP.
But the msg is displayed with the outro ... let me see how I launch my outro...

#

@tardy yacht Outro.sqf is launched by a Trigger with condition : (TimeP<10000 and ((time >= TimeP) or (TimeEnd >= TimeP))) or (score player >= DM_Max_Score)

#

@tardy yacht on Activation : DM_End=true; TimeEnd=time; publicVariable "TimeEnd"; Null = [] execVM "Outro.sqf"

copper raven
#

@quartz coyote if youre running that code on dedi, player is null everytime on dedi

tardy yacht
#

I'm gonna be honest and tell you I don't know what I'm doing. Now that you know that, is the trigger server side?

quartz coyote
#

@copper raven Ah ! So how can I adapt my script ... ?

copper raven
#

run code on each machine i guess

#

it needs some rework tho

quartz coyote
#

@copper raven in wich way ?

copper raven
#

i still don't get the point of this code, best _player will always be the last guy in array of allPlayers

quartz coyote
#

@copper raven I'm looking for the best player of the match, the one with the biggest score

warm gorge
#

Why doesnt deleteVehicle work with dead bodies?

quartz coyote
#

It does

#

@warm gorge in PvP I use this to clear the battleground :
_body = _this select 0;

sleep 20;
deleteVehicle _body;

warm gorge
#

Weird, just tried running deleteVehicle on allDeadMen and it did absolutely nothing

copper raven
#

@quartz coyote there is probably better way to do this, but this works for me

//initPlayerLocal.sqf
fn_sendmsg= {
    [format["<t color='#FFFFFF' size = '1' shadow='1' align='center' font='PuristaBold'>Winner is %1</t>",(_this)],-1,-1,8,2,0,3088] spawn bis_fnc_dynamicText;
};
fn_getName={
    _name=call{
        _as=[];
        _an=[];
        {
            _as pushBack score _x;
            _an pushBack name _x;
        }forEach playableUnits;
        _s=selectMax _as;
        _i=_as find _s;
        _name=_an select _i;
        _name;
    };
    if(_name == name player) then {
        _name remoteExec ["fn_sendmsg",-2];
    };
};
//initServer.sqf
dm_end=false;
waitUntil {dm_end};
[] remoteExec ["fn_getName",-2];
quartz coyote
#

@copper raven Ok found why the message was not displaying :
My dynamictext ID was 3088 but it was the same as an other dynamic text with same ID displayed a few seconds before... stupid of me...

I'll take a look at your script and see if it worked !

halcyon crypt
#

do we happen to have something like substring or do we have to go the splitString / joinString route?

#

nvm ๐Ÿ˜„

#

CBA_fnc_substr and CBA_fnc_substring ๐Ÿ‘

little eagle
#

@halcyon crypt

"Fish frog cheese fromage" select [5, 4] // "frog"
halcyon crypt
#

oh sexy

#

that's new ๐Ÿ˜ƒ

#

-ish

little eagle
#

Yup.

halcyon crypt
#

the CBA functions use the same method though

little eagle
#

Yes, they were rewritten to do so when this syntax was added to the game.

#

Previously they were different and complicated enough to warrant a function. Now they are legacy.

rotund cypress
#

Hasnt that always been there pretty much? @little eagle

#

Being able to select likethat

little eagle
#

No.

rotund cypress
#

When did that syntax get released?

little eagle
#

string select [start, length] (since ["Arma 3","Arma3",127,126674,"Development"])

rotund cypress
#

Like not always but it was quite a while ago

#

Ah

little eagle
#

Sure.

rotund cypress
#

Same as being able to select via booleans, conditions etc

little eagle
#

select BOOL has been in A2, so that is way older.

rotund cypress
#

Oh rly

little eagle
#

Yes. It's probably as old as SQF.

rotund cypress
#

Heheh alright

little eagle
#

OFP 1.0

rotund cypress
#

OFP lmao

little eagle
#

Actually that means that it predates SQF and could be used in those SQS files already. xD

indigo snow
#

So I wanna track where the missiles from a grad launcher land. Best way to go about this minimally? You can't set variables on the projectile, nor does its explosion trigger any event handlers.

tough abyss
#

When it stops moving? Lol

little eagle
#

I wonder if the deleted eventhandler works. Probably not.

indigo snow
#

a spawned while loop is typically very far off because of the speed

#

it didnt

#

maybe attach a created logic unit to the missile?

little eagle
#

You can't attach to CfgAmmo

indigo snow
#

dammit

tough abyss
#

Check the position every half a second and if the position has changed then it is still moving?

indigo snow
#

too slow

#

the position will be very far off

little eagle
#

Is this mod or mission?

indigo snow
#

ideally mission but im willing to sneak some stuff in if it helps

tough abyss
#

How will the position be off? Check it faster then.

little eagle
#

Give the missile an empty particle effect with a script.

indigo snow
#

for the explosion effect?

little eagle
#

beforeDestroyScript

#

The particle effect would be set up to trigger on explosion of the missile and last one frame to then fire this script.

indigo snow
#

aight ill look into that then, thanks for the tip

half monolith
#

has anyone got any experience trying to override lmb ? I have tried kk method and works on ground, but in chopper lmb seems to take a different action? trying to call a function while disable the vanilla function of key.

indigo snow
#

you could just flat out remove the weapons the pilot has available I guess

half monolith
#

that would defeat the purpose of the lock on for pilot script we working on ๐Ÿ˜ฆ

indigo snow
#

im sorry my dude

#

with regards to the earlier grad script, thought of this:

[{
    systemChat str({ _x inArea tr_target_1 } count allMissionObjects "#explosion");
},0,[]] call CBA_fnc_addPerFrameHandler;

need to test that one in MP though.

slate sentinel
#

is there any way to damage buildings in a radius around the player?

still forum
#

Yes. Lots.

indigo snow
#

i like setDamage

#

very good way to damage things

little eagle
#

Drop a bomb on the player.

indigo snow
#

spawn a kart and setDamage 1 the kart

little eagle
#

I think they fixed karts having the tank explosion.

indigo snow
#

then i want my money back!

still forum
#

Karts had Tank explosion ?!

little eagle
#

Yes, for a long time they did.

#

Now they just burn.

still forum
#

Why did nobody tell me. So much fun I missed

indigo snow
#

im actually more impressed that you missed that

nocturne bluff
#

I enjoyed that.

#

Was quite hilarious ramming a kart into a MRAP and then taking out everything around you

indigo snow
#

great tool when the explosives had run out

halcyon crypt
#

UI event handlers don't stack, correct?

indigo snow
#

no

#

actually

halcyon crypt
#

no as in they don't stack or no as in I'm not correct? ๐Ÿ˜

indigo snow
#

unsure now

halcyon crypt
#

it doesn't return any index for the EH so my best guess is that it doesn't stack

indigo snow
#

yea just tested it, doesnt stack

halcyon crypt
#

ctrlRemoveEventHandler takes an id though

#

weeiirrdd

indigo snow
#

ah sec

#

we talking inGameUISetEventHandler or ctrlAddEventHandler?

#

the ctrl one should stack

halcyon crypt
#

ctrlSetEventHandler but now that you mention ctrlAddEventHandler I know where things went wrong ๐Ÿ˜„

indigo snow
#

๐Ÿ˜„ learned something new too ๐Ÿ˜›

halcyon crypt
#

thanks ๐Ÿ˜ƒ

rain sonnet
#

anyone know how make sure tfar radios are encrypted ie opfor and blue for wont hear each other

peak plover
#

did you try the modules?

still forum
#

@rain sonnet I just answered your question and then noticed that you double posted. I hate double posters so I deleted my answer. Have fun solving it without my help

half monolith
#

I asked earlier, but noone said much, does anyone know how to properly override the fire button (manual) as a pilot in a chopper. It doesnt seem to respond to "default action" , like in kk's example. any help would be greatly appreciated

open vigil
#

As in "you the pilot, want to fire the gunners weapon"?

little eagle
#

You can't.

cosmic kettle
#

Hi everyone o7 I'm kinda stuck on creating a rope when neither object is a vehicle. I think I'm missing something, I've asked Duda in the meanwhile, as it seems he seems to know the ropes (pun intended).
Anyone willing to help out? The final goal would be to connect 2 chairs or similar objects with a rope.

little eagle
#

You could try attaching a UAV with attachTo to the chair and hide the UAV using hideObjectGlobal

#

Plus allowDamage false to make it not take splash damage.

cosmic kettle
#

Thanks for taking the time ๐Ÿ˜ƒ I have already searched discord and couple of forums/mods and had found out that the UAV was the smallest vehicle and most people use it for workarounds...
The problem is that for some reason the cord turns rigid whenever I attach the UAV to another object.
I'm not yet hiding or disabling damage as I didn't yet think that was necessary if the base functionality isn't there... might that in some way affect the rope?

little eagle
#

Doubt it.

#

It's just so the UAV doesn't die when grenades go off nearby

cosmic kettle
#

okay I was wrong I think, some post in there talks about cable models or something I believe.

little eagle
#

Maybe those are configured as vehicles. This is why I don't like video demonstrations. They never show what's wrong with what is being shown.

cosmic kettle
#

Well, that's the thing, I'm willing to just write another config and make the 2 objects into 2 non-drive-able cars if I have to. I just want to attach some ropes ๐Ÿ˜ฆ

#

Hell, my last resort was to exactly do that, make the smallest vehicle possible in arma, like a tiny ball and use that as an anchorpoint.

little eagle
#

Idk, I hate those ropes. Along with everything else that comes with PhysX. More headache than it does good.

cosmic kettle
#

the ropes, when reskinned, offer loads of possibilities. What I am trying to achieve is turn them into powerwires.

#

I'm nearly there, but am stuck on this final and crucial step.
[LINK REMOVED]
^the TRS slot is defined in the memory LOD and I'm trying to attach to that.

#

There's no major reason why I'm trying this, I also made a chess set just to see if it was possible...

little eagle
#

I don't think you can use different models or textures for ropes. There is only one rope class and the classname is hard-coded.

cosmic kettle
#

Well I'm pretty sure, after some digging. [LINK REMOVED]

little eagle
#

Again, I also hate pictures, because they never show what's wrong.

#

If you do change the model via mod, all other ropes will look like this.

#

You can only ever have one rope model.

cosmic kettle
#

No man ๐Ÿ˜ƒ I'm switching nearby rope models to use a different texture set.

#

Willing to share my working ones if you wanna see for yourself.

#

I'm telling you, all I need t know is how can one attach a rope to something lmao

little eagle
#

Ah, you added hiddenSelectionTextures to it (and modified the model to allow this first?)

cosmic kettle
#

Hang on, I'll send the screens.

little eagle
#

I don't need screens. I understand what is said in the thread.

#

It's a pretty cool work-around.

cosmic kettle
#

So yeah

#

here I am, not even 1h for the first part, now 1 day+ on the last frikking detail

little eagle
#

There is no need to repack data_f. Could've just used a custom path for the new model, but w/e.

cosmic kettle
#

yeah it's what I did

#

the other guy doesn't get it though.

#

The chopper mod guy does

#

(bad with names)

#

So just to get back on track, what does an object need to be able to get attached by rope?

#

Cuz that's what I'm saying, I'll make a driving Speaker if I have to. I will. attach. this cable.

cosmic kettle
#

^bump

halcyon crypt
#

seems like it doesn't require anything special

#

it just uses the model center as it's initial attach point and you can offset from there

cosmic kettle
#

@halcyon crypt the problem is when creating a rope, one of the attached objects needs to be a vehicle. Like a driving one, hence why everyone points into the 'use UAV ' or 'use a kart' direction.

#

but in this case, both objects are just simple objects, ThingX class iirc.

cosmic kettle
#

Someone willing to help on this subject? Because people are saying it should possible, but I can't attach 2 cans with a rope... ๐Ÿ˜ฆ

#

can1 = "Land_Can_V3_F" createVehicle (position player); can2 = "Land_Can_V3_F" createVehicle (position player); theRope = ropeCreate [can1,[0,0,0],can2,[0,0,0],20];
Doesn't work...

quartz coyote
#

Hello !
For some reason, this is not displaying the lines 2 and 3 of the message

[format["<t color='#004399' size = '1' shadow='1' align='center' font='PuristaBold'>BLUE</t> <t color='#FFFFFF'>Team Wins<br>Score : %1<br>Touch : %2</t>",(WScore),(westtouch)],-1,-1,15,2,0,4001] spawn bis_fnc_dynamicText;};

indigo snow
#

<br/>

quartz coyote
#

@indigo snow I tried with <br /> and it didn't work so it is <br/> you say ?

indigo snow
#

im not sure if dynamic text allows structured text from the top of my head but i am totally sure the tag is <br/>

quartz coyote
#

@indigo snow i'll try and update in a second

indigo snow
#
private _msg = getPos player call BIS_fnc_locationDescription;
_msg = _msg + format ['<br/>%1/%2/%3', date select 0, date select 1, date select 2];
_msg = _msg + format ['<br/>%1', [dayTime, 'HH:MM'] call BIS_fnc_timeToString];
[
    _msg,
    [safezoneX + safezoneW - 0.8,0.50],
    [safezoneY + safezoneH - 0.8,0.8],
    5,
    0.5
] spawn BIS_fnc_dynamicText;```
is a working example
quartz coyote
#

@indigo snow Thank you !

quartz coyote
#

@indigo snow Works perfectly like this !!

[format["<t color='#004399' size = '1' shadow='1' align='center' font='PuristaBold'>BLUE</t> <t color='#FFFFFF'>Team Wins<br/>Score : %1<br/>Touch : %2</t>",(WScore),(westtouch)],-1,-1,15,2,0,4001] spawn bis_fnc_dynamicText;};

cosmic kettle
#

Bump: Anyone knows a workaround for ropes attaching to 2 non-driveable objects? http://prntscr.com/g515og
When attaching one end to a car, ropes always work, but ThingX to ThingX doesn't.

half monolith
#

yes like when pilot take manual contol of weap system. we have developed a lock on for pilot system, but we need over ride mouse while we have a target lock sorta deal

cosmic kettle
#

?

half monolith
#

im looking for a mouse over ride for the fire function in heli. while pilot and manual fire, the button doesnt seem to be default action, even in a2 it is, im thinking maybe jets update mess with things. there must be a new action for fire

#

@little eagle and why not? this is wierd, the override we try worked in a2 but not a3

little eagle
#

Why? Because you can only overwrite DefaultAction and that doesn't work when using manual fire.

#

There is not more to it.

half monolith
#

there must be something other than default action bound to lmb while in this condition. as i said, works fine in a2, but there is a difference in a3, we wanted to overwrite and use lmb, which does seem impossible, we would be fine with just cancel mouse, and use default action, as it goes to enter and space. we want to try to make script stuipd proof so if there is a lock, the player cant mistakenly pull trigger and think they will get a hit.

little eagle
#

there must be something other than default action bound to lmb while in this condition.
No, there must not be.

as i said, works fine in a2, but there is a difference in a3
That doesn't mean anything. They are different games / versions.

#

Only very few of these can be blocked with addAction.

#

If you can't block firing the weapon when using manual fire using DefaultAction, then you cannot block firing when using manual fire.

#

It is as simple as that.

half monolith
#

it even works on foot just not in chopper

little eagle
#

Feel free to try all of these, but I don't see it working.

#

it even works on foot just not in chopper
That too, doesn't mean anything.

indigo snow
#

Shame inGameUISetEventHandler only works with prevaction, action and nextaction i guess

little eagle
#

There should be a proper command to disable weapons and not a dirty work around that only sometimes sorta kinda works.