#arma3_scripting

1 messages ยท Page 448 of 1

glad venture
#

@drowsy axle event handlers are things that allow you to automatically run scripts on an event https://community.bistudio.com/wiki/Arma_3:_Event_Handlers It can be useful for resctricting items, check for unallowed items when a players takes something, restrict vehicles, dismount player if they don't have perms for that vehicle, or things like tasers, run a damage handler script to see if it is the taser weapon and ammo.

drowsy axle
#

Okay, thank you. @glad venture

unborn ether
#

@glad venture To rename existing item name, you need to change displayName entry of its class. I don't think its the best way of doing it, it's better to just inherit it to a new class and change it there. Kinda, create a new one instead. You can try to destruct existing class with delete but I would never do that, behaviour unexpected.

ruby turtle
#

From TacOps DLC there came new objects. One of them is a grey Personal locker can be used as a inventory filled object. Is there any way to declare each Locker to a special player in MP? For example there are 4 lockers all filled with equipment for a special class (SQL, FTL, etc) I want that only a SQL get access to a SQL locker. How can I realise it?

brave jungle
#

My brain is melting, been looking at this for too long. Anyone wanna give me a hand with ctrl EH's?

display_Options = (findDisplay 46) createDisplay "RscDisplayEmpty";
CTRL_FPPLock = display_Options ctrlCreate ["RscCheckbox", 7147];
CTRL_FPPLock ctrlSetPosition [0.402031 * safezoneW + safezoneX, 0.313 * safezoneH + safezoneY , 0.0154688 * safezoneW, 0.022 * safezoneH];

CTRL_FPPLock ctrladdEventHandler ["onCheckedChanged", {
    If (!FPPLocked) then {
        FPPLocked = true;
    } else {
        FPPLocked = false;
    };
    If (FPPLocked) then {
        EH_FPPLocked = player addEventHandler ["Respawn", {

        [] spawn {
            while {(true)} do
            {
                if (cameraView == "External") then
                {
                    if ((vehicle player) == player) then
                    {
                        player switchCamera "Internal";
                    };
                };
            };
        };
}];
    };
}];

Need the [] spawn {....}; code to run after a checkbox is clicked. the normal ctrlChecked and cbChecked only return false, no matter what, seem to have done this for a while.
If you do spot anything, PM me, going to sleep on it.

glad venture
#

@ruby turtle do you mean ammoboxes

ruby turtle
#

I just mean the tall lockers I can spawn. They have an door animation and you can fill them with items

ruby breach
#

@ruby turtle Easiest way would probably be a combination of set/getVar and an InventoryOpened EVH. Prohibit access if var on container doesn't match class

lone glade
glad venture
#

@ruby turtle you could probably turn it into a virtual ammobox, allow certain items and set class restrictions

brave jungle
#

lol

ruby turtle
#

Okey and maybe easier can I display a special Text in the face of a player when he is watching to the locker? So they see its only for SQL. I dont like virtual arsenal for MP Missions

glad venture
#

what is SQL, are you talking about the database or is it a class of soldier?

#

you could add an event handler to the container for on container open and if the player's class doesn't equal required class then close the inventory

ruby turtle
#

Squad Leader

#

Its just a role in a mission

glad venture
#

oh

ruby turtle
#

Its a 60 clients coop event. I have to safe much performance as possible so I need a solution without any big scripts they are running in backround maxbe display name should be better?

glad venture
#

are you going to go by config type/slot like rifleman slot, squad lead slot etc?

ruby turtle
#

Hoq do you mean that?

glad venture
#

so, you know how there are the different type of men you can place in editor, are you using that as to determine roles or a script?

ruby turtle
#

I just name the roles for lobby and creating loadouts trough ACE Arsenal and the loadouts are integrated in the mission sqm.

#

So the first one :)

unborn ether
#

@brave jungle

FPPLocked = !FPPLocked;

instead of

    If (!FPPLocked) then {
        FPPLocked = true;
    } else {
        FPPLocked = false;
    };

will make your eyes feel easier, same for anything like that.

lone glade
glad venture
#

@ruby turtle I think I got it, you'll have to put this in the lockers init and the second part in a separate function: this addEventHandler ["ContainerOpened", {[["Medic",_unit],"mission_fnc_checkLocker",true] call BIS_fnc_MP;}];

//checkLocker
params["_type","_unit"];
if(player isEqualTo _unit) then {
switch (_type) do {
case "Medic" : {
isRight = getNumber ( configFile >> "CfgVehicles" >> typeOf _unit >> "attendant" ) isEqualTo 1;
if(!isRight) then {closeDialog 2;};
};
};
};

brave jungle
#

Like I said, head hurts, I'll add to the file to check over tomorrow, thanks :D

ruby turtle
#

Have to check this tomorrow , but when I have 12 dfferent roles, I have to create 12 new cases right?

glad venture
#

well, you only have to create for as many unique classes of lockers, if you are going to only have locker for like 2 classes you only need 2

ruby turtle
#

Ao can you give me please a example with two cases? Its really late in germany and I don't be able to understand the syntax ๐Ÿ˜…

lone glade
#

jesus christ....

ruby turtle
#

Shalom

glad venture
#

case "Engineer" : {
isRight = getNumber ( configFile >> "CfgVehicles" >> typeOf _unit >> "engineer" ) isEqualTo 1;
if(!isRight) then {closeDialog 2;};

ruby turtle
#

Ah just see it now, thank you swatguy ๐Ÿ˜˜

glad venture
#

does anyone what the default handleDamage function for ACE3 advanced medical system is? I'm trying to overwrite it so that it only injures a unit if certain conditions are met.

still forum
#

@ruby turtle Fill with with addWeaponCargo instead of addWeaponGlobal. That way people will only see the items that were locally added.
If someone puts items into it everyone can see it. But items that you added via that script cannot be seen by others.
@brave jungle

    If (!FPPLocked) then {
        FPPLocked = true;
    } else {
        FPPLocked = false;
    };

uh.. how about

FPPLocked = !FPPLocked;

You are using ctrlChecked/cbChecked inside the onCheckedChanged Eventhandler? That's kinda dumb...

https://community.bistudio.com/wiki/User_Interface_Event_Handlers
The checked state is already in _this. Just take it out of there.

tough abyss
#

this shit has been pissing me off

#

anytime a client is passing player through a re to another player, and then that player tries to re back to them with the param its giving an error

brave jungle
#

@still forum i had used cbChecked outside of an eh. I got values but they returned false no matter what. Saw online they were broken but an eh would work. Got a return with a hint but it doesn't seem to fire with code in it, unless I removed something by accident.

still forum
#

@tough abyss I think you are missing a ]

#

You are stringifying a object. And expecting that to turn into an object when you just call it

#

that just doesn't work at all.

tulip otter
#

Any here ran into a way to script it, so you can use Gauges from advanced flight model, while still on standard flight model?

young current
#

Id say you cant. I would think those gauges use the advanced flight model sources for their values and standard fligtmode just wont output those

#

unless of couse you just use the graphics

#

and make your own logic behind it

tulip otter
#

Okay, a guy in my community, thinks he have been able to do it in one of those Dayz wannabe mods online. But he of course cant remember which ๐Ÿ˜„

young current
#

hes the one who needs to prove it ยฏ_(ใƒ„)_/ยฏ

wary vine
#

then you wouldnt need to pass the player through

tulip otter
#

Yeah, just hoped some really smart people in here could be my saviour, as he is "special" ๐Ÿ˜„

glad venture
#

@still forum I am using ace advanced medical and removed the default damage event handler and put mine in instead. I am trying to do make a taser script that does no damage if it is a taser, but does the default ACE function if it isn't. Do you know if I have to use fnc handle damage advanced or just fnc handle damage?

still forum
#

The normal one

#

it calls handleDamaged_advanced by itself

lone glade
#

if it is a taser
that explains a lot

still forum
#

taser is my keyword to leave this conversation as quickly as possible

#

https://community.bistudio.com/wiki/assignItem That says If the slot is occupied by another item, it gets replaced. Does that mean old is deleted and new is put into it's place.
Or does that mean they are swapped and old one goes into inventory?

lone glade
#

second, it goes into inventory

#

that's if there's space

still forum
#

question then... Goes it into inventory before the new item is taken out of inventory?
I'm thinking if it's safe to swap a item of same mass from inventory to radio slot.
Currently I check canAdd. Then unassign old, assign new, if canAdd previously failed then addItem old again.

lone glade
#

0 idea on that

still forum
#

Better don't touch it then. It kinda works right now.

lone glade
#

i'd assume it unassigns the item first

still forum
#

unless old item == new item

lethal ingot
#

Is "EachFrame" Mission Event Handler better then while {true} and should I use it and only it?

still forum
#

It's a completely different thing. You should use it if you really need it. And not use it if you don't need it.

winter rose
#

onEachFrame can be used for UI stuff,
while { true } is... risky? depends on what you want to do.

advantage: while { sleep 0.01; true } is possible

lethal ingot
#

Hmm... I am trying to get away from my loops in a more elegant manner, cause they seem to impact server FPS.

still forum
#

onEachFrame is far worse than a bad while/true loop. A while{true} loop can't crush FPS. the onEachFrame definetly will when done incorrectly

#

you should use eventhandlers where possible. (besides EachFrame)

gleaming oyster
#

I thought the minimum you can suspend is 0.05 which essentially turns out to be no suspension?

still forum
#

It will still suspend till the next scheduler frame that executes the script

#

I think only things like sleep 0 or something really extremely small might just skip the sleep

winter rose
#

^ I think I experienced that yes

#

@lethal ingot so what is this loop about?

still forum
#

Okey. Checked it.
Sleep always suspends if the sleeptime is not over when the sleep instruction is reached.
sleep add's a new sleep instruction to the code.
After the call to sleep is done it executes that instruction. If that took long enough that your delay is already over (should be less than a microsecond) then it won't suspend. Otherwise it always suspends

#

And as soon as a script suspends. It might be gone for half an hour

gleaming oyster
#

Okay, lol

verbal otter
#

Hello, there is a problem. I change the position of the object in height, it is necessary to smoothly lift the object from the ground, I use the cycle for "_i" from 0 to 100 step 1 do {_obj setPosASL [(getPosASL _obj) select 0,(getPosASL _obj) select 1,(getPosASL _obj) select 2 + 0.015];

#

but the object instead of rising from the ground - slides down the slope

winter rose
#

can you try this? parenthesis included

 for "_i" from 0 to 100 step 1 do
{
   private _newPos = getPosASL _obj;
   _newPos set [2, (_newPos select 2) + 0.015];
   _obj setPosASL _newPos;
};
#

also, don't forget to sleep in your for loop

verbal otter
#

i use sleep

#

ty will try

#

no, nothing changed ๐Ÿ˜ฆ

winter rose
#

ok, funny - tried ATL?

verbal otter
#

yes

winter rose
#

trying on my side

meager heart
#

btw step 1 < is default

winter rose
#

...as expected, it works (in VR)

#

@verbal otter have you tried enableSimulation false?

gleaming oyster
#

In vr? ๐Ÿค”

verbal otter
#

no, but get it working

#

problem was in changing position all time

#

i take coords in variable before cicle, and then use x and y from variable

#
    _z = _posCHD select 2;
    
    for "_i" from 0 to 100 step 1 do {
        sleep 0.3;
        _z = _z + 0.015;
        _posCHD set [2,_z];
        _obj SetPosASL _posCHD;
    };```
winter rose
#

so it works? good

gleaming oyster
#

@winter rose (only in vr) :p

still forum
#

We are all just virtual! Nothing is real!

gleaming oyster
#

We're in the matrix

lone glade
#

not even on all of the VR map

#

there's a spot below 0 ASL

gleaming oyster
#

But the blue pill only takes us to the next level of simulation

#

So our reality endlessly simulates itself

winter rose
#

I doubted for a moment that my sqf-fu was off

gleaming oyster
#

Never wiki man, you know all

winter rose
#

command-wise, I still discover a forgotten one here and there :D
Cfg* is not my usual environment though

still forum
#

disagrees

verbal otter
#

@winter rose yes

#

@gleaming oyster no, on altis is working too ๐Ÿ˜„

gleaming oyster
#

@verbal otter Altis is cursed

meager heart
#
/*
    _z = _posCHD select 2;
    
    for "_i" from 0 to 100 step 1 do {
        sleep 0.3;
        _z = _z + 0.015;
        _posCHD set [2,_z];
        _obj SetPosASL _posCHD;
    };
*/

for "_i" from 0 to 100 do {
    _obj setPosASL AGLToASL (_obj modelToWorld [0,0,0.015]);
};
#

๐Ÿค”

still forum
#

modelToWorldWorld and get rid of AGLToASL

meager heart
#

modelToWorldWorld ๐Ÿ˜”

winter rose
#

running joke, but modelToWorldWorldAGLtoASLWorldASLStoATLATLReal

verbal otter
#

xD

meager heart
#

yeah... readability first! ๐Ÿ˜„

#

@winter rose btw thanks, EH page is ๐Ÿ‘Œ

verbal otter
#

@meager heart ty, is working

high prism
#

Not sure if this is the right section, but, is "script injecting" still a thing? If it is, how would I protect variables that i've assigned to players from being changed/edited? ARMA 3

still forum
#

without battleye you can't.

#

with battleye.. Dunno

gleaming oyster
#

compileFinal ?

still forum
#

you could check if the variable is still what you think it should be.

#

That could protect variables that are only set once. And also only if you run battleye

high prism
#

you mean by passing it through the server first and checking to see if it has been tampered with?

gleaming oyster
#

"Script injecting" i think was more popular and easier to do in early arma 2 than it is now. Not sure though. Yeah, essentially making sure it's within reasonable value limits. Or checking if damage is disabled for example

#

Or if your variable is static, then i guess you can use compileFinal to prevent it from being written over

high prism
#

hm

#

I see, thanks.

gleaming oyster
#

Dedmen probably has a better explanation though

still forum
#

Generally though without Battleye you can't do anything to protect against it.
And with Battleye you also can't do anything against the real hackers.
I don't know if script injectors are still that common. They are atleast alot more rare than a year back

gleaming oyster
#

Was popular with kiddies in a2 dayz mod

high prism
#

yeah, the only thing I really want to protect against is variable editing

gleaming oyster
#

Yeah, what's your variable storing values for?

high prism
#

experience points/levels etc, important values

gleaming oyster
#

Those are likely to change then, so make sure you have a sort of "max" value. If you really care, then see how much it changes over time

still forum
#

A script kiddy will most likely enter huge numbers for experience

#

just check periodically if the experience is so high that it's impossible for a human to reach that

gleaming oyster
#

"Human",
Can bots get 75 tank kills in 1 minute?
Are we talking secret terminators?

#

Arma 3 to make the next simulated matrix? I am telling you man, they talk to each other internally, they have plans we can never predict

high prism
#

Although... now that I think about it, it wouldn't really be that hard to protect against if you just literally check every value the client edits in a legit and unlegit way with the server.

gleaming oyster
#

They may follow the rails of the terrain, but an ai that travels that far has to be thinking of something.

high prism
#

in other words; just don't trust the client.

still forum
#

correct. You can never trust him

gleaming oyster
#

Koth has something like that i think.

still forum
#

you could calculate and store the experience on the server. And let the client just tell the server that he just killed something. Or most likely the server can also figure that out by itself.
Then just send back the experience to the client so he can display it. In case he wants to know his exp.

gleaming oyster
#

That works. But how much traffic might this induce? Lots? Little?

#

Or does it not matter in the scheme of things because of it's purpose?

still forum
#

well some data per kill. So.. dunno ๐Ÿ˜„

#

I don't think it matters

gleaming oyster
#

Pew pew pew

still forum
#

A real hacker can still cheat ofcause. But that should be enough against script kiddies

high prism
#

"cheating" I suppose is fine, as long as he takes his dirty paws off of my top secret values >:]

gleaming oyster
#

Lol, tips hat in dedmen's direction . I'm sure you'd know mr white hat hacker

#

@high prism You have launch codes being updated in there or something?

high prism
#

shh

gleaming oyster
#

Knew it.

high prism
#

anyway, thanks guys ๐Ÿ˜ƒ

gleaming oyster
#

:+1:

unborn ether
#

Is there some manual on how to stop using [1,2,3,4,5] call BIS_fnc_selectRandom and start using selectRandom [1,2,3,4,5] instead?

#

I cant force myself, seems to be medical problem.

gleaming oyster
#

Manual? Step one: keep calm and replace

still forum
#

What manual would you need

#

you lkiterally just replace one thing by another

gleaming oyster
#

lkiterallu

unborn ether
#

just a JOKE, I can't rid it of my mind simply.

gleaming oyster
#

No, it's not a joke. You have a serious pro blem and it needs fixing

#

To rehab with you

still forum
#

Ohhh wait.. You wanted manual.. And I gave you a automatic way...

#

For manual use please use your keyboard and fingers

unborn ether
#

๐Ÿ˜„

#

Thanks i know how to use regex

still forum
#

(are)|(is) (you)|(he) (really)|(rly) sure?

unborn ether
#

๐Ÿ˜„

austere hawk
#

anti variable cheating -> can continually check the delta if it seems fishy

unborn ether
#

?

still forum
#

Refering to conversation from an hour ago

gleaming oyster
#

Is it possible to return if a weapon a player is holding a dlc weapon? getObjectDLC and sorts don't provide the solution

#

Or, one that isn'f broken in mp at least?

#

I may just generate a static list

still forum
#

you should be able to check config entry in CfgWeapons >> weaponClassname >> dlc

gleaming oyster
#

Some of them have a dlc and some don't. It's weird, but i'll double check here soon

#

Like the RPG7 doesn't have any dlc entry :(

little oxide
#

Variable on object can kill FPS ? I have 4 variable on 1127 objects, wanted to know if this can kill fps, or only the network

still forum
#

no

unborn ether
#

@little oxide Well once they've set (globally ofc) they are part of JIP data. So if you don't update that frequently, no.

still forum
#

both no

#

unless the variables are public they won't go over the network

little oxide
#

They are in public ofc

#

I know this kill network, but wanted to know for fps impact

unborn ether
#

This doesn't kill network

still forum
#

variables that are just sitting in memory don't do anything to fps

gleaming oyster
#

Well, you didn't ever say they were global..

unborn ether
#

The frequency and data size impacts CPU, when broadcasted, since network packets must be utilized.

#

In current reality network is not an issue, since by my experience 2 mbits is kinda topmost load I've ever seen per-client.

little oxide
#

Prefer to regroup all variable in only one variable for some optimization of JIP Data ?

unborn ether
#

1x setVariable against 4xsetVariable, think so.

#

That also depends on what and when is touching that data.

#

So if its several diffrenrent spawn|execVMemed scripts, they can conflict on the same data, especially if that is different PCs.

still forum
#

moving everything into one is very bad if like 3 of the 4 variables change very rarely

#

you have to update everything if you have it in 1 variable

little oxide
#

I have 3 of the 4 that never be updated, so i can move these 3 into one, and let the one that updated in only 1 var

tender fossil
#

I'm not sure about the details (correct me if I'm wrong), but moving those variables into one wouldn't change much since they aren't updated, so there's basically no extra cost in having them in separate variables, while it would make the code more readable (which probably matters a lot more)

#

The problem in "overengineering" the little details is that when you're optimizing them, you could be doing something else that's more meaningful (a thing known as opportunity cost in economics)

#

But of course, if you have absolutely nothing else to do and/or saving even a few setVariable call costs would make a difference, then it's worth it ๐Ÿ˜ƒ

#

Usually the rule of thumb is to write human readable (human friendly) code at first, not thinking about the performance too much (ofc still avoiding the biggest performance hogs), and then, in second iteration, start to optimize the code based on the observed worst performance hogs and repeat it until you have code that's human readable and fast enough

#

(As a sidenote, I believe that BI is a great example of a company whose development process has been severely fucked up by code that does its job but that no-one can understand) cough Arma 2 AI cough RV engine cough

gleaming oyster
#

@tender fossil They can't appeal to everyone's scenarios. Just like everyone complains about performance, they can't make generalizrd optimizations for all if it impacts one aspect of the game one way or another

#

Although some bits don't make sense sure

tender fossil
#

Yes, I'm speaking on general level

gleaming oyster
#

As in? I may be a bit confused as to what you are saying sorry

tender fossil
#

About the management

still forum
#

@tender fossil three variables are three JIP messages. Instead of one.

#

And you would also need to store the variable names for them

#

which is absolutely insignifcant for 3 variables. But super not insignificant for 3 variables on thousands of different objects

tender fossil
#

@still forum Yes, naturally if the effect is multiplied, it'll quickly start to have some systemic effect

ruby turtle
#

Hello, I have a short question. Is it possible, to get custom pictures on avdertisment Walls but the picture file have not to be in the mission.pbo and could be linked from a rootserver ftp or something? We just want to change pictures for Event adverts on ad walls in our public mission but don't want to edit the mission.pbo everytime.

#

So if we update our adverts we just exchabge the png or jpeg files with new ones without editing the mission.

plucky willow
#

I have a counter adding numbers smaller than 1, is there any way to avoid the problem that gives me x.9999?

#

or the .0001 for that matter

#

nvm i just scaled it up to whole numbers

shadow sapphire
#

How would I stop AI from dying and instead place them in a wounded state?

glad venture
#

@shadow sapphire you could do an event handler

#

Also, does anyone know the command to sync units to a module?

shadow sapphire
#

@glad venture, thanks, but I need more direction than that, haha. I know I need an event handler, but I am truly a bad scripter. Anyway, gotta work right now, Iโ€™ll get back to my shit scripts later.

unborn ether
#

@[10th MntD] LiquidBlaze#0067 You can only do that with htmlLoad and this is for control only.

ruby turtle
#

So its not possible to load pictures out of the mission.pbo? Damn why? What is if we are using a database function. Could it work with that?

unborn ether
#

@DEL-J#8291 Any Arma unit dies in some specific conditions. Instant death comes with having head neck and body damaged to 1. In other cases unit dies if 3 or more of any hitpoints are damaged to 1.

#

@ruby turtle .PAA is a game texture asset, you cannot load it on-fly into a game. To be short, anything that is a picture in Arma is converted to .PAA or either a engine procedural texture.

radiant valve
#

im working on a UAV script that put marker over enemy occupied area. and its skipping the last group everytime. i can't figure out what is the problem. it's probably something stupid but i can't see it.

https://imgur.com/a/ObupFJX

target_list = [t_1,t_2,t_3,t_4,t_5,t_6,t_7,t_8,t_9,t_10];//for testing

while {true} do {
templist2 = [];
{
templist1 = [];
_unit = _x;
distance1 = 0;
{
if(_unit distance _x < 150) then {
templist1 = templist1 + [_x];
if(_unit distance _x > distance1) then {
distance1 = _unit distance _x;
};
};
} foreach target_list;
if(count(templist1) > count(templist2)) then {
templist2 = templist1;
centerpos = position _unit;
zonesize = distance1 + 10;
{
target_list = target_list - [_x];
}foreach templist1
};
} foreach target_list;
_marker = createMarker [str centerpos, centerpos];
_marker setMarkerShape "ELLIPSE";
_marker setMarkerSize [zonesize, zonesize];
systemchat"test";
sleep 1;
if(count target_list == 0) exitwith{};
};

ruby turtle
#

No that is not the problem. .paa files should be also able to load from a pre defined path everytime the mission restart, we could update the .paa file to show another picture ingame. That is what we are want to do.

#

We don't want to change it "on the fly"

radiant valve
#

also if there is a better wy to do it. i'm all ears

glad venture
#

does anyone know how to randomly spawn enemies within an area?

unborn ether
#

@glad venture createUnit

#

placement: Number - The vehicle is placed inside a circle with given position as center and placement as its radius

glad venture
#

@unborn ether thanks, also is the unit like _unit = createUnit, so _unit is the ai and not an array like you get with bis_fnc_createVehicle?

meager heart
#

also

#

bis_fnc_randomPos or bis_fnc_randomPosTrigger or _randomPos = _area getPos [<random_distance>, <random_direction>];

#

and maybe selectBestPlaces ๐Ÿ˜€

#

ez

meager granite
#

So, is there a reliable way to delete dead unit from a vehicle? ๐Ÿค”

#

As soon as body "cools down" (changes from proper unit to body), deleteVehicle, moveOut and other commands no longer work. Deleting vehicle itself leaves unit in limbo but its still there.

unborn ether
#

@meager granite crew gives you full list of all units, even dead AFAIK. The thing is that there is a visual glitch might happen if you simply deleteVehicle - visually its still occupying proxy.

meager granite
#

So far I only came up with hacky solutions like moving body into another vehicle with moveInAny, then having another unit get into that seat to push body out and then finally delete it.

#

@unborn ether deleteVehicle doesn't work on dead units inside vehicles, its not glitch, unit doesn't deletes until its out of the vehicle.

unborn ether
#

@meager granite ๐Ÿค” I had some solution, can't find it now. Try this one before deleting:

{unassignVehicle _x} forEach ((crew vehicle player) select {!alive _x});
gleaming oyster
#

That's pretty hacky there sir lol

unborn ether
#

Not sure if it worked on MP switchable units like players, or not. But Eject or moveOut should work afterwards.

meager granite
#

Nope, unassignVehicle does nothing

unborn ether
#

@meager granite dead units local to you?

meager granite
#

Of course, all in local environment as server

#

Looks like remains collector refuses to deal with such units as well

#

2018, still no moveOutDead command

#

I guess I'll have to resort to hackery then ๐Ÿค” ๐Ÿ”ซ

shadow sapphire
#

I'm curious about a way to make a client side script where any small caliber rounds (say 6.5 or smaller) doesn't do damage through armor at all. Anyone thought on this?

meager granite
#

Check material type with HitPart?

#

Though at the moment of HitPart bullet already hit and damage is already sent to another client ๐Ÿค”

shadow sapphire
#

Oh, drats.

naive estuary
#

Is the tough armor the whole object or just a part of it?

#

Because if it is the whole object you can add a handleDamage event handler to check the projectile, and the object being hit.

shadow sapphire
#

The tough armor is only on the head excluding the face, on the chest and on the back. The shoulders and sides are generally only covered by soft armor, which would stop pistol rounds, but not rifle rounds. However, for me, it would work juuuuust fine if we pretended the whole torso was protected.

#

The whole object?

meager granite
#

@shadow sapphire So far only complex solution comes to mid: Store all hits to certain entities in array with flags whether hit should register or not by HitPart check

shadow sapphire
#

Interesting. Ugh! Probably not worth it, then.

meager granite
#

Then target entity stores but not applies HandleDamage, asks shooter to report on which hits should be counted and which ignored and then manually applies that HandleDamage depending on response.

shadow sapphire
#

It just irks me that if you hit a guy wearing solid armor three times in the plates with a weak round (5.56), he dies. That's not even close to accurate.

#

@naive estuary, you're saying we could check if the armor is being hit, and if it is, tweak things at that point?

meager granite
#

Much easier in non-multiplayer

shadow sapphire
#

Haha, well, it has to be multiplayer for it to be useful for me.

meager granite
#

Actually, checking which part was hit against armor values of worn stuff could work too

shadow sapphire
#

I wrote a script once for blank fire weapons, they just delete every round as it leaves the barrel. Maybe if we could delete the bullets as they hit certain objects, it would stop the wearer from being damaged. Problem is, the victim of the projectile probably wouldn't flinch anymore, which would be wrong.

naive estuary
#

If it is executed on all clients then it should in mp just fine. I believe that the server trusts clients with hit registration implicitly.

shadow sapphire
#

IDK, I just think Arma's whole damage system should be rewritten by me, haha.

#

There are too many clients and too much going on on my server for things to go to ever client.

#

I think it would tank performance.

meager granite
#

Thinking about, does hitting plate carrier responds with flesh surface hit? Probably does. If it does, then my idea is nil.

shadow sapphire
#

Anyway, I gotta go pick up my wife from work. Thanks, guys!

meager granite
#

@naive estuary The issue is that decision whether there was actualy hit or not cannot be affected, HitPart is just an event, you can't deny a hit with it from shooter side.

#

You can deny damage from the hit with HandleDamage but not hit itself.

naive estuary
#

I know. In his case he wouldn't want deny the hit. If you get hit in a plate with anything you would feel it, but it wouldn't harm you.

meager granite
#

Yeah, shooting right into chest plate responds with meatbones.bisurf surface so my idea doesn't work

#

So yes, you'll need to check which parts are protected by helmet and vest and then apply or ignore damage in HandleDamage depending on it.

naive estuary
#

How about detecting where the shot hits? Chest head, arms, etc?

shadow sapphire
#

This all started because I was thoroughly testing the damage model for infantry in Arma 3. I was NOT impressed. I just wanted a simple, SIMPLE AI medic script. Basically an event handler that, when the AI goes down, it checks to see if the head is at max damage. If the head is not max damage and if a medic is within eight hundred meters, then it goes into a wounded state and is added to a queue, and the medic will eventually get around to healing it.

meager granite
#

Which is fairly easy.

meager heart
#

with removing dead units from vehicles, maybe something like this

private _units = (fullCrew [_vehicle, "", false]) apply {_x select 0};
_units select {!alive _x} apply {moveOut _x};
meager granite
#

moveOut, eject, etc. doesn't work

#

dead units cannot be moved out through script at all

naive estuary
#

How about setpos?

meager granite
#

Fully dead units*

meager heart
#

hmm

meager granite
#

Nope

#

The only way is to move another unit in its seat

shadow sapphire
#

Oh, shit! That would work, @naive estuary, @meager granite. If target is wearing a whitelisted armor, then they donโ€™t receive damage if they are hit in the torso. Done! Right?

meager granite
#

But that's rather hacky, you need to move unit somewhere else first

#

@shadow sapphire You can check which armor protects what on the fly

meager heart
#

maybe just setPos them... ๐Ÿค”

meager granite
#

And no, setPos*, attachTo, etc. doesn't work either

meager heart
#

nice ๐Ÿ˜„

naive estuary
meager granite
#

@shadow sapphire configFile >> "CfgWeapons" >> _vest >> "ItemInfo" >> "HitpointsProtectionInfo"

#

Just make sure to have some basic caching so you don't iterate through it on each HandleDamage, that would be lame

shadow sapphire
#

Roger. Will look into that.

naive estuary
#

@meager granite I created a hunter, killed its driver and was able to move it out with setPos

meager granite
#

Because unit is still unit, wait a little until it turns into body

naive estuary
#

Ah

radiant valve
meager granite
#

str unit will show memory addess and model name instead of group name and index

meager heart
#

just tried

0 spawn { 
    private _units = (fullCrew [cursorObject, "", true]) apply {_x select 0}; 
    _units apply {_x setDamage 1}; 
    sleep 10; //--- to make sure they dead dead
    _units select {!alive _x} apply {moveOut _x}; 
}; ```
this ^ https://gyazo.com/c214093f35eda5751dc0e538d3feab58
or i'm missed something ? ๐Ÿค”
meager granite
#

As I said, moveOut doesn't work.

#

If moveOut worked then you didn't wait long enough

meager heart
#

don't know then...

naive estuary
#

deleteCollection will hide the model. But I don't know if the object will still occupy the vehicle crew position

unborn ether
#

It doesn't care, since anyone entering his seat will kick him out.

#

7:22:31 BE protection activated for player id=977342073, name='#######', msgType=371

Can anyone tell me whats that exactly about? Happened since I used vanilla console

naive estuary
#

hideObject and hideObjectGlobal would hide the body visually, but it is still considered in the crew of a vehicle.

#

@meager granite deleteVehicleCrew on the object works when after the body has gone from a unit to a corpse.

meager granite
#

Nice, indeed it does!

#

I wish we could move bodies out too though.

meager heart
#

yeah... still no commands for that

meager granite
#

Fun thing is, first vehicle doesn't have to be actual vehicle where unit is in and it still deletes the unit

#

Not sure why do you even need to provide vehicle in the first place, its not like engine doesn't know where unit is

#

Anyway, at least I don't have to do all that mess with moveInAny to delete units, thanks for pointing me at the command I missed ๐Ÿ‘Œ

marble basalt
#

does anyone know if their is a way for a script to check for current state of weather?

wary vine
#

^^

marble basalt
#

im wanting to check if its raining for the script to do something

wary vine
#

I dont think you can get the "weather" directly

#

you get the things above ๐Ÿ˜„

marble basalt
#

any way to check if rain is active?

wary vine
#

rain > 0

still forum
#

I'm not sure when rain kicks in. I guess with rain > 0.5 it will rain

marble basalt
#

not trying to make it rain want the script to check

still forum
#

If you are running stuff like ACE weather there are probably better ways

marble basalt
#

is that what rain > 0 does

still forum
#

Yes. We are talking about exactly that

marble basalt
#

ok

still forum
#

I don't think rain 0.00001 will mean it's raining

#

there is probably some threshold

marble basalt
#

ok thanks

wary vine
#
Rain is not possible when overcast is less than 0.7. 
marble basalt
#

so need it to check for rain and overcast or just rain?

wary vine
#

0.09 and still rain btw @still forum

#

if ((overCast > 0.7) && (rain > 0.01)) then {};//Its raining
marble basalt
#

ok thanks

#

your input will be used in the future enabling of horrible things to a playerbase lol

wary vine
#

just did some testing, rain can still happen at 0.02

#

so rain > 0.02

verbal otter
#

Hi, such question, whether probably to receive the size of the control to contain the structured text, as it is made in hint?

wary vine
#

?

#

You want to force the size of a control to the size of the text ?

verbal otter
#

yes, to count lines or size image

wary vine
#

ctrlPosition

verbal otter
#

yes, i know

#

but i can't take needed size

#

to contain all text

wary vine
#

o.O

#

I dont understand quite what your saying.

verbal otter
#

The idea is that, as in the hint, there was no empty space left

wary vine
#

you want to make a hint that has no space left ?

verbal otter
#

yes, something like this

still forum
#

He wants to figure out how big a control has to be to exactly fit the text. Without overlap or empty space

wary vine
#

Correct me if im wrong, but I dont think you can edit the hint control ?

#

ctrlCreate

#

then use ctrlText height

verbal otter
#

hmm, ty i will try this

wary vine
#

they are the main 4 you will need

sonic bane
#

Is it possible to get the chat box to open in editor and be able to use it?

still forum
#

Inside editor i don't think so.

#

Inside editor preview in MP yes

#

Just host a local MP game and use the Editor there

sonic bane
#

Ha alright its just that i want to test things with exile and mp games are aids on the mod

#

Also too much effort for setting up a server

still forum
#

Too much effort? It's 4 button clicks

#

Multiplayer->serverlist->host->host

sonic bane
#

No

#

For exile mp server i would have to set up a database and create a local server on my machine

compact maple
#

Hello, does items in the game, have unique ID, so we can identify an item in an inventory or whatever ?

still forum
#

no

compact maple
#

okay thatโ€™s sad, thanks

still forum
#

If you are making a mod you can just make a thousand slightly different items which you then only spawn a single one of any of them. So that there can be at most one of any of these item types.
You can then use these to create a "unique" item.

#

TFAR and ACRE do that for their radios

#

and ACE for dogtags

lone glade
#

listed from 1 to 999 hehehehehehe

compact maple
#

Yep it could be done but, I want to work with the official items

still forum
#

Just call your mod "official items mod" then ๐Ÿ˜„

compact maple
#

ahaha that would be crappy

#

BI should work on feature like this

#

and btw on his user interface editor

still forum
#

Maybe they will for Arma 4

compact maple
#

theyโ€™re already working on a new motor but donโ€™t know when this will be out

#

and with theses ID we could do incredibles thing like if a soldier drop his weapon and someone take it, he will be able to see who dropped it

still forum
#

That is kinda already possible

#

dropping a weapon creates a invisible weapon container on the ground. Which you can set variables on

#

so as long as only one soldier dropped his weapon into it. It's pretty easy to use that variable

compact maple
#

yep thatโ€™s an idea but not that good for perfs

#

like when you want to play a 3D song u have to create an invisible helipad, lol please..

still forum
#

variables do nothing for perf

#

and to play a sound in 3D you don't need an object no.

compact maple
#

weapon container if there is so many it can be laggy, right ?

still forum
#

dropping a weapon creates a weapon container

#

nothing you can do about that anyway

compact maple
#

never saw that before, about the 3D sound, to play a song Iโ€™ve read that you have to create an empty helipad, attach it to the player, and play the song on it

still forum
#

w00t

#

If you want to play the song on the player and have it move with him. Then you can just play the song on the player directly

compact maple
#

hm okay will try but I think I forgot something

wary vine
#

What would be the best way of doing a gagged thing to go with tfar so the guy gagged would sound muffled.

#

I have tried something with canSpeak but other people around me sound muffled too xD

quasi rover
#
_position = _center findEmptyPosition [0,10];   ```
 Is the position excluded  as a return value  of findEmptyPosition, if an object, such as ammo box, is already occupied  on the empty position within area by script ?
naive estuary
#
center findEmptyPosition [minDistance, maxDistance, vehicleType] 
Searches for an empty position around specified position. The search starts looking for an empty position at a minimum distance of [minDistance] from the [center] and looks as far away as [maxDistance]. If a [vehicleType] parameter is specified, then the search will look for an empty positions that is big enough to hold that vehicle type. If an empty position isn't found, an empty array is returned.

This command ignores moving objects present within search area. 
#

So from the sounds of it, yes it will exclude the position if something is already there. If no valid positions are found it returns an empty array.

quasi rover
#

thx. @naive estuary

naive estuary
dapper path
#

Would anyone be able to provide me to a helpful link for creating a lightbar for vehicles?

#

I want to make custom police and ems vehicles

unborn ether
#

@compact maple createSoundSource is what you seek

compact maple
#

@unborn ether thanks you

past ruin
#

Does anyone have experience with in game live feed? e.g a drone or satellite feed to a monitor. I've had a look around online and most examples I can find are 4-5 years old and don't work now. I have little to no experience scripting

still forum
#

Someone asked the same question just a couple days ago

#

and the stuff that is 4-5 years old still works.

unborn ether
#

@past ruin You need to render something as a texture?

past ruin
#

I guess? Like I said, this is new territory for me. I've tried all the example missions I can find but they're outdated and don't open correctly in eden

quaint turtle
#

Quick question, is there a limit to how many elements can be placed inside an array? I've got an array of 1,000+ lines saved under a variable, and it loads, but it seems to almost crash half way. I've read the wiki on Arrays and it says it can have up to 9,999,999 elements, but that doesn't seem to be the case with me.

#

In case anyone is wondering, the array is just pure config patches.

trail epoch
#

how would u go about adding this to players? I need it in their init, for for them to exec. " this setVariable ["SKM",["P",30,50,true,2,""],true];"?

quaint turtle
#

are you putting this in the init.sqf?

#

if so, try player setVariable ["SKM", ["P",30,50,true,2,""], true];

trail epoch
#

also, if i were to addAction, would any1 new joining, would they have that action?

quaint turtle
#

if you were to put it in your init.sqf, i'm pretty sure they would

trail epoch
#

ty โค

quaint turtle
#

No problem ๐Ÿ˜ƒ

unborn ether
#

So animals like snake still can open doors in buildings. This just gave me creeps again.

plucky mauve
#

Someone know how i can put a taser gun for a medic in Altis Life?

unborn ether
#

@plucky mauve Put where?

unborn ether
#

@trail epoch initPlayerLocal.sqf if to be more precise.

plucky mauve
#

@unborn ether I need put the taser function for medic

still forum
#

Just crumble it up and throw it at the medic

tough abyss
#

Hello i need a bank robby script for 4.4r4 but it must be the same as in the a3l pm me ๐Ÿ‘Œ๐Ÿผ

lone glade
still forum
#

I'm not thinking he is offering any pay @lone glade
He is demanding someone to make that script for him.

winter rose
#

I'll do it

#

for 400โ‚ฌ

peak plover
#

I wish there was a inAreaArrayArray

lone glade
#

wat

peak plover
#

[positionsArray] inAreaArrayArray [positionsArray]

#

I wanna check if all players are in 10 areas at once

peak plover
#

@tough abyss If you explain in detail the functionality you want I'll give you a script for $399

lone glade
#

#350

strange urchin
#

Pfft

little oxide
#

How to stop a 'playAction' or 'playActionNow'

still forum
#

_unit playAction "" I guess

winter rose
#

stopActionActionWorldASLtoATLReal

modern sand
#

Usually when working with numbers in Arma, once you go above 10 million it starts turning into random crap like this '1e+006' right?

tough abyss
#

1 mil

#

Thatโ€™s not random itโ€™s scientific notation

modern sand
#

Yer, I swear it used to be 10 million.

#

Or i might just be imagining things ๐Ÿ˜›

still forum
#

it by default stringifies to scientific notation yes.
unless you use toFixed to stringify

peak plover
#

Anyone here know how to create ace action on the map?

still forum
#

No..

#

but just look how the ace actions on the map are created.. ๐Ÿ˜„

peak plover
#

ace selfactions

#

hmmm

still forum
little oxide
#

I love getMusicPlayedTime

austere granite
#

i love you

peak plover
#

I love Frontlines

austere granite
#

no you don't ;_;

still forum
winter rose
#

meee

#

raises hand

still forum
#

Probably time since the current playing music has started. As there can only be one playMusic running at a time

little oxide
#

It's right Dedmen, but if the last music finished, this will not return 0, but return the max time of the last music

#

Returning 0 if no music was played before

lone glade
#

it's also not subject to time acceleration

winter rose
#

you can actually set the speed of a sound in a CfgMusic or CfgSound (last element of sound[]= {})

โ€ฆyou can actually set it to accTime. Since OFP ๐Ÿ˜„

little oxide
#

Tested openSteamApp and ithink he do anything, he return all the time false

still forum
#

test the example on wiki

kindred lichen
#

how do I make colored text in a hint?

ruby breach
#

The first note should have anything you'd need

storm sierra
#

Hey, anyone got any experience making Modules for Eden editor?
I got canSetArea = 1, but I don't know how to fetch the "area" to use in my script.
Also is there a way to set the default size of the area for the module?

knotty mantle
#

Hey guys, can someone tell if it is possible to do the artillery support provider/artillery support requester module functionality via script at any given time?

#

I could script it myself but i would like to use the existing framework (the chat that the support stands by, the marker with the ETA for the shells and all that stuff).

#

I found a few functions like 'BIS_fnc_addSupportLink' but that still needs the modules _(

austere granite
#

not without basically scritping it yourself to let it work the same way

#

all those BIS functions are shit to use outside modules

knotty mantle
#

not what i wanted to hear ๐Ÿ˜ฆ but thanks for the fast anwser.

austere granite
#

basically go through the function, look at which variables are used, then just create a gamelogic in the proper location and set all the required variables

#

Like it's possible, but it's more effecient to just take the function and rewrite it in a way that you need the modules

#

/ logics

timber veldt
#

I'm trying to add houses to a gang base, but when I set it either, the doors won't open, I cannot place storage boxes, or the house is not even there. Anyone know why this is happening?

unborn ether
#

@RadioActiveGoat#7492 You are trying to add houses to a gang base. Which way you do it and is this life framework or so? <- Undefined is higlighted

wary vine
verbal otter
#

@wary vine nice

#

controls groups in control group? ๐Ÿ˜„

wary vine
#

yup

#

doing the bottom bar now , no idea whether I want it animated or not xD

verbal otter
#

just ctrlsetposition to group

wary vine
#

yh i know xD

#

Just dont know how I want the bottom bar animated ๐Ÿ˜„

verbal otter
#

slide from buttom ๐Ÿ˜ƒ

#

but positions on groups is really pain

wary vine
#

done

wary vine
#

is there a way to click and drag to move a controls group ?

unborn ether
#

@wary vine Yes

wary vine
#

How ๐Ÿ˜„

#

I been trying everything xD

#

tried putting an invisible slider over the top

unborn ether
#

You're not gonna like believe me

#

Your display should support MouseMoving where it locates and reports the mouse positioning, while your control is controlled with MouseButtonDown|MouseButtonUp which will recognize if you are holding a button on it, and in between all of that you do ctrlSetPosition depending on on your display reports. Probably will require some trigonometry knowledge.

wary vine
#

hmm

#

so in essence

#

ouseButtonDown|MouseButtonUp eventhandlers

#

and ctrlSetPosition

#

and make bumper bars, so it wont go off the screen.

unborn ether
#

But don't forget that this will "fall through" on anything active behind the current group

wary vine
#

?

unborn ether
#

Any active controls group will react to that events at the point where few of them intersect with each other

wary vine
#

hmm

#

feck

#

ill see what I can chuck together

unborn ether
#

About your bumper cars, its simply doable with min|max

#

so you can say like

private _thatx = (_shiftedPosition max 0.05 min 0.95) * safezoneW + safezoneX
#

Ofc thats not including widht diff

wary vine
#

ty

wary vine
#

im getting somewhere ๐Ÿ˜„

#

not sure what you meant by ```
private _thatx = (_shiftedPosition max 0.05 min 0.95) * safezoneW + safezoneX

#

thats what i got so far

unborn ether
#

@wary vine you should min and max your x and y, so they basically will not go <=0 or >=1

wary vine
#

how to do i find out min max ?

unborn ether
#

@wary vine with min and max ๐Ÿ˜„

#

Simple example:

0 max 0.05; // 0.05
0.5 max 0.05 // 0.5

1 min 0.95 // 0.95
0.5 min 0.95 // 0.5  
wary vine
#

i got some crazy shit right now.

#

but sorta works.

#

Lega_testFunction = {
  while {!(Lega_BackgroundControlMouseup)} do {
    _left = 0.427812 * safezoneW + safezoneX;
    _right = _left + 0.145 * safezoneW;
    _top = 0.2382 * safezoneH + safezoneY;
    _bottom = ((0.2382 * safezoneH + safezoneY) + (0.43 * safezoneH));
    _mouseX = getMousePosition # 0;
    _mouseY = getMousePosition # 1;
    sleep 0.001;
    if (((getMousePosition # 0) > _right) || ((getMousePosition # 0) < _left)) exitWith {};
    _difference = ((getMousePosition) # 1) - _mouseY;
    private _lastControl = Lega_xPhone_BackgroundControls # ((count Lega_xPhone_BackgroundControls) - 1);
    private _lastControlTop = (ctrlPosition _lastControl) # 1;
    private _firstControl = Lega_xPhone_BackgroundControls # 0;
    _firstControlBottom = ((ctrlPosition _firstControl) # 1) + ((ctrlPosition _firstControl) # 3);
    if !(((_lastControlTop < 0) && (_difference < 0)) || ((_firstControlBottom > _bottom) && (_difference > 0))) then {
      {
        private _pos = (ctrlPosition _x);
        _shiftedPosition = (_pos # 1) + _difference;
        _pos set [1,_shiftedPosition];
        (Lega_xPhone_BackgroundControlsButtons # _forEachIndex) ctrlSetPosition _pos;
        (Lega_xPhone_BackgroundControlsButtons # _forEachIndex) ctrlCommit 0;
        _x ctrlsetposition _pos;
        _x ctrlCommit 0;
      } forEach Lega_xPhone_BackgroundControls;
    };
  };
};
#

xD

#

but its works... sort of.

unborn ether
#

You don't like EVH do you? ๐Ÿ˜„

wary vine
#

?

#

I use a evh to init it xD

unborn ether
#

and also

#

๐Ÿ‡ต ๐Ÿ‡ฆ ๐Ÿ‡ท ๐Ÿ‡ฆ ๐Ÿ‡ฒ ๐Ÿ‡ธ

#

will easen your life ๐Ÿ˜„

#
(ctrlPosition _lastControl) params ['_lastX','_lastY','_lastW','_lastH'];
timber veldt
tame portal
#

@timber veldt enableSimulation false will also disable animations on the object

timber veldt
#

Makes sence, I will see if it works now ๐Ÿ˜ƒ

dire mountain
#

hi need some help in editor

timber veldt
#

@tame portal After i enabled Simulation I can't buy the house or open the doors.

meager heart
#

try to rent it, maybe... /s

uncut roost
#

Hello,

Using the PLP_CalmSoldier script and although testing it in MP in the Eden Editor, the AI fail to go into the animation?

E.g. When I place the WOUNDED_1 anim on the soldier, I can hear him groaning in pain but he is stood up straight on the bed?

Anyone familiar with this issue? I get no error messages.

#

Just to clarify, MP testing in Eden was successful, the AI are in their respective animations, but when i upload the mission.sqf to the server and test it. The AI are not in animation

lone glade
#

ask the script maker

uncut roost
#

I have, no answer yet so resorted to this

lone glade
#

that sounds like a locality issue

uncut roost
#

what do you mean by locality?

lone glade
#

I mean locality by locality

uncut roost
#

well obviously, but please expand on your point?

still forum
#

the locality that the animation is played on is probably wrong.

lone glade
#

as in the script executes a command that changes the animation for whoever ran it but other clients don't see it

uncut roost
#

I see what you mean, but that would then mean I would see the animations (which I don't in the mission which i uploaded to the server)

still forum
#

no.

#

That would mean you wouldn't

#

They might run on the server and thus you don't see them

#

or they only run on your client. and a millisecond later the server overwrites it and thus you don't see them

uncut roost
#

ahh I see. Any idea on how to solve this issue?

still forum
#

ask the script maker

errant jasper
#

Took a quick look at the script, 700 lines of repetitiveness, but it does not look like that script is made to work in MP.

sick gazelle
#

Anyone here know if it is possible to recreate the Vanilla Command Chat channel? I.E, everyone can send messages on it, but only certain players can send and receive messages on it?

uncut roost
#

@errant jasper it does work with MP

errant jasper
#

Well, then I guess you have no problem then...

uncut roost
#

Some animations work, some don't. It's very strange

errant jasper
#

How do you start the script?

uncut roost
#

embed the script into the mission file under the folder 'Scripts'

then place:

_nil = [this, "SIT_RIFLE"] execVM "Scripts\PLP_CalmSoldier.sqf";

in the init of the unit

errant jasper
#

So for "WOUND_1", according to the script it, for every player/server does the following:

  • waits a bit
  • disable parts of the AI brain
  • adds such that whenever an "idle animation" is done it will play another random "idle animation" - this is random on each machine, so you might see different animation!
  • adds a handler, such that if the AI is killed, it will play a particular killed animation
  • Then it stores for WOUND_1, two particular "idle animations" and a killed animation.
  • Then it randomly starts playing one of them. This is what starts the idle loop with the AnimDone event handler above.
  • Then, for WOUND_1, it starts a script they regularly plays a random wounded sound. Again the command is local so you might hear different noises each time.
  • For other modes e.g. not WOUND_1 the following is delayed until combat or AI dead. But for WOUND_1 the following happens immeidately:
  • Both event handlers are removed.
  • The AI brain is enabled again.
#

My theory is, that when the AI brain was reenabled, the AI chose another animation for the unit. Strange though that it worked during your Eden testing..

uncut roost
#

I appreciate you looking in to it, genuinely! Thank you. It is a strange one, i'll play around with it and see if I find an solution

edgy dune
#

Theres no way to get the discrod syntax highlighting for sqf for notepad++ is there?

austere granite
edgy dune
#

XD

queen cargo
#

there is also numerous other solutions for syntax highlighting including linting etc.

edgy dune
#

oh never heard of that

queen cargo
#

Visual Code, sublime, sqdev, arma.studio

edgy tree
#

I use sqf syntax in notepad ++ Google search brings it up

molten folio
#

Atom Editor

#

is good

naive estuary
#

Who needs syntax highlighting and linting? Just write everything in the default windows notepad. Or if you are feeling like a professional use Microsoft word and save as a txt and change it to an sqf.

tender fossil
#

Yeah, you can even add ClipArt effects to the code in Word to make it look more appealing

naive estuary
#

Or, if you have a Samsung phone you can use Samsung Notes.

#

That way it's easier to incorporate emojis into your code.

#
if (โ˜บ๏ธ<=๐Ÿข) then {[๐Ÿ—ผ,๐ŸŽ‘] call ๐ŸŽบ};
timber veldt
#

Can anyone explain how you set buyable houses with CG framework, I made it so far that you can buy and open doors. But when I try to place a large box it says, that I need to be in the house :/

tough abyss
peak plover
#

I don't have debug menu, even with CBA

#

What gives?

tame portal
#

@tough abyss Cursor object in the sky is NULL

#

*objNull

#

in that case you have to format that part of the string before the main part

#

with an if statement for example

#
_cursorObjectText = if (isNull cursorObject) then { "No target" } else { format ["%1 (%2)", typeOf cursorObject, cursorObject] };```
#

you could put that if statement directly into the format part aswell but i think thats a bit messy

unborn ether
#
str (cursorObject) // <NULL-Object>
tame portal
#

@unborn ether he wants to get rid of the brackets when theres no object

#

his current code results in Cursor Object: (<NULL-Object>)

unborn ether
#

cosmetics ๐Ÿ˜„

tame portal
#

id be annoyed by those brackets aswell ๐Ÿ˜›

unborn ether
#

Well they kinda simmetrical, so no ๐Ÿ˜„

#

:)

tame portal
#

eh but it would result in an additional space

#

Cursor Object: (<NULL-Object>)

#

id get the rope if my code produced that

#

i cant live like this

#

ded

naive estuary
#

I can't see that many applications for this past debugging. In that case <NULL-Object> isn't that bad of an output.

tame portal
#

he just wants his output to look nice..

#

its probably gonna get seen by someone else who throws that monitor thingy on so might aswell put in some minimal effort to make it look nicer

#

theres no information getting lost when it says No Target so i dont think its bad

naive estuary
#

I think ```
Cursor Object: (<NULL-Object>)

tame portal
#

and this is why its hard to argue over this because everyone has their own opinion ๐Ÿ˜„

naive estuary
#

But your opinion is wrong and mine is right.๐Ÿ˜€

tame portal
#

Bot

#

(insider)

#

๐Ÿ”จ

fringe yoke
#

Is there a way to trigger a steam screenshot via script?

unborn ether
fringe yoke
#

That saves to the Arma 3 folder doesn't it though? I was hoping to trigger a steam screenshot

naive estuary
#

It's not steam but it's probably the best you can get.

unborn ether
#

Steam performs screenshot with its API, so its not in your power.

fringe yoke
#

Is there a way to simulate user input though, and just simulate F12

naive estuary
#

No. If there was it would only allow you to simulate userinput within the game it's self.

tame portal
#

you could build an extension to do that ๐Ÿ˜„

fringe yoke
#

We already have an extension, so it'll be easy to add, just was wondering if a base game method existed.

#

Also, does anyone know if there is a function to get your position in a group

#

Like the 3rd member of a group, so it would return 3

#

can't find anything in the wiki

fringe yoke
#

Awesome, thanks

winter rose
#

yw

timber veldt
#

In what folder can I increase the civillian slots?

#

CG framework

tough abyss
#

hey guys

#

I have task modules setup and they work properly when synched to a player

#

but I only want the tasks to be created for the player through a script

#

I have an addAction on a unit that initiated a script to create dialogue, and then after the dialogue is done I want the task to then be created for the player.

#

how can I achieve this?

wary vine
#

@unborn ether I got a bit further with what I was doing this morning

meager heart
unborn ether
#

Code on the hastebin please?

wary vine
#

nide @meager heart

worldly zinc
#

Is there a known issue with RoadBarrier_F? My debug is not even seeing it as an object when I spawn it in.

#
nearestObjects [player,["RoadBarrier_F"],10];``` 
returns 

[1ecec9a5600# 1779946: roadbarrier_f.p3d,1ece4c0cb80# 1779934: roadbarrier_f.p3d]```

So Arma knows its there.

unborn ether
#

Well its just breaking then.

still forum
#

@tough abyss Because you have a typo in there.

still forum
#

"straight" ?

#

"from arma"?

unborn ether
#

@tough abyss Everybody is kinda pointing you to toss some code to see syntax.

wary vine
#

sounds to me like hes trying to do something like the spyglass patches check that altislife uses

unborn ether
#

@worldly zinc This was and still a issue? of arma. cursorObject command checks object presence by some specific LOD which is not present for this object. Same goes for 2D helipad, you cant find it by cursorObject but its still an existing object.

winter rose
#

cursorTarget then?

unborn ether
#

cursorTarget is is outdated version of cursorObject, as it has no ability to detect objects with no simulation and some other specific conditions. Also requires reveal most of times.

wary vine
#

nearestObject ๐Ÿ˜ƒ

winter rose
#

Ah I didn't remember rn which was which ;-) I still have my head on the pillow :-p

#

so definitely cursorObject

tough abyss
#

@lavish ocean Can we get a fatigeEnabled command?

wary vine
#

gotta bodge it ๐Ÿ˜‰

#

check if the player is running and not in a vehicle and loop

#
        while {
          (isNull objectParent player) &&
          (speed player > 0)
        } do {
          if !(getfatigue player > 0) then {
            // _nofatigue
          };
          sleep 0.1;
        };
winter rose
wary vine
#

xD

winter rose
#

and don't tag BI Minions please.

tough abyss
#

I know it is possible, not what I am saying. Aids af to loop like that when it could be checked with one line

wary vine
#

it can

winter rose
#

isStaminaEnabled @tough abyss

wary vine
#

just the naming convention was different

tough abyss
#

@winter rose Just seen that

wary vine
#

fatigue + stamina xD

tough abyss
#

why would they name diffrent

wary vine
#

why cant things be kept with the same naming convention

tough abyss
#

threw me off

winter rose
wary vine
#

dont worry about the home screen icons , i got someone making me som nice ones ๐Ÿ˜ƒ

tough abyss
#

I like that

#

UI is clean af

wary vine
#

xD

tough abyss
#

got the iphone toggles xD

wary vine
#

yup

#

when i do the tfr calling system on it im gunna set it so you can change volume with the switches

tough abyss
#

yeah

wary vine
#

still gotta do the animation for the toggles shouldnt be too hard tbh

tough abyss
#

I did an Iphone as well

#

will send pic in sec

wary vine
#

just moving it slightly in the x axis

tough abyss
#

Yeah

#

is it a picture?

wary vine
#

what ?

tough abyss
#

the toggle switch

wary vine
#

2 seperate images

#

the toggle and the background

tough abyss
#

yeah one for on and one for off

#

no I mean the switch

#

for like names and shti

wary vine
#

the names and background are on one layer

tough abyss
#

Nooooo

wary vine
#

then the switch colour and switch are on differnt layers

tough abyss
#

^ oh ok

wary vine
#

because I wanna animate the switch

tough abyss
#

oh ok

wary vine
#

so change the x position and change the toggle colour

tough abyss
#

yeah

wary vine
#

glad i passed math in school xD

tough abyss
#

hahaaa

wary vine
#
    if (((getMousePosition # 0) > _right) || ((getMousePosition # 0) < _left)) exitWith {};

    private _difference = ((getMousePosition) # 1) - _mouseY;

    if !(((_lastControlTop <= 0) && (_difference < 0)) || ((_firstControlBottom >= (_bottom - 0.09)) && (_difference > 0))) then {
      {
        private _pos = (ctrlPosition _x);
        _shiftedPosition = (_pos # 1) + _difference;
        _pos set [1,_shiftedPosition];
        (Lega_xPhone_BackgroundControlsButtons # _forEachIndex) ctrlSetPosition _pos;
        (Lega_xPhone_BackgroundControlsButtons # _forEachIndex) ctrlCommit 0;
        _x ctrlsetposition _pos;
        _x ctrlCommit 0;
      } forEach Lega_xPhone_BackgroundControls;
    };
#

for the background slider

modern sand
#

Long_Ass_Variables_Are_Very_Fun_To_Work_With

wary vine
#

xXD

#

They dont need to be called anywhere , so I just make them descriptive

winter rose
#

or make another shorter reference to them, aka

private _myList = My_Super_Long_Variable_Of_The_Death_ToWorldWorldReal
wary vine
#

meeh xD

#

I usually write everything then go back and tidy / comment etc

warm gorge
#

Is it possible to set the textureNoShortcut of a shortcut button through scripting?

wary vine
#

got it @tough abyss

little oxide
#

Same speed when you put on and off, It's like when you taking off, this is more fast than when you take on

winter rose
#

still, it's impressive - congrats @wary vine !

wary vine
#

it is the same speed

#
  private _newX = if (_x isEqualto _offX) then {_onX} else {_offX};
  private _newPos = [
    _newX,
    (_pos select 1)
  ];
  _toggle ctrlSetPosition _newPos;
  _toggle ctrlCommit 0.02;
little eagle
#

1/0.02 is 50. Unless you have 50+ fps, this will be the same as 0.

wary vine
#

hmm

little eagle
#

What's to think about?

wary vine
#

gotta think of another way to do it xD

little eagle
#

Do what?

wary vine
#

keeping the toggle slide smoth-ish

little eagle
#

As in, move it faster the farther it has to move?

wary vine
#

its always the same distance

little eagle
#

How is it not smooth then?

wary vine
#

0.02 is mooth for me

little eagle
#

Explain to me how 0.02 is different from just straight up 0.

wary vine
#

0 just insta

#

0.02 it slides quickly

little eagle
#

Yeah, I was saying that 0.02 is so quick, that it is the same as 0 in every use case. Because you never play at >50 fps realistically.

modern sand
#

commy has a point

knotty mantle
#

i want to check if a unit took a cellphone from a crate. Is there a better way to do it than the take EventHandler for each player in the mission? It is basically needed for one player (i dont know which one but there is only one cellphone) roughly every 1h/1,5 hours. But loadouts change a lot. So it would get triggered rather often for beeing used really rarely. I looked at the container opened and closed EHs but they dont seem to give me what i want.

still forum
#

Use the inventory opened handler on the crate

#

when someone opens the inventory. Then add the take handler. And remove it agian when Inventory closed

#

that way you only have the Take EH when you need it

little eagle
#

Take fires for remote units?

#

What if the player drops the thing and another picks it up?

winter rose
#

is the phone an item? if so, in items _unit?

little eagle
#

The question is what you need to know this thing for.

#

If it's some marker updating loop for example.

#

The loop could just check all objects on the map if they own the cellphone. And if they found the unit, only check the unit the next iteration. And check all objects again only if the unit lost it.

knotty mantle
#

Thanks dedmen that is probably the best way.

#

Commy i just need to check if the cellphone got taken from the crate. Then firesupport is added for the groupleader. No matter who picked the phone up. The phone is deleted afterwards.

errant jasper
#

How exact does the time need to be? Would it be enough to just add an InventoryClosed to the player and see if he has it?

little eagle
#

OK, what Dedmen said then.

#

Easiest would be if you don't use a cellphone, but a backpack.

#

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

knotty mantle
#

But i dont know if the player already has a backpack.

still forum
#

I prefer @errant jasper 's InventoryClosed idea

errant jasper
#

How is the fire support added? Depending the code, another option is to simply change the condition (if there is such a code-piece) for it only to be available if the player is carrying the cell phone/backpack

knotty mantle
#

And a backpack "calling" in artillery support or stuff is kinda strange. And as TFAR is optional for that mission i cant use a LR radio backpack.

little eagle
#

The backpack is bugged of course.

knotty mantle
#

i cant follow commy. But iยดll use muzzles idea ๐Ÿ˜ƒ Should work good. Thanks for the quick help ๐Ÿ˜ƒ

little eagle
#

If it were a backpack, you could just put it's object into a variable and use getPosWorld.

knotty mantle
#

ah okay. But i think i ยดll go with the cellphone for calling in support.

little eagle
#

This is vanilla?

knotty mantle
#

well currently not. CBA, ACE, ACE_X

little eagle
#

loadout player eventhandler?

#

That seems like the most straightforward thing to me.

knotty mantle
#

Yeah but it is a mission with an ace arsenal that gets new stuff after each wave is defeated. Therefore loadout will change a LOT. And an airdrop with the cellphone in it will roughly happen every ~1-1.5 hours. Therefore i think loadout would fire way to often for the time it would be actually used.

little eagle
#

ACE already uses the loadout eventhandler. I don't see a problem.

#

It's essentially free for you.

#
["loadout", {
    params ["_unit"];

    if ("<cellphone_classname_case_sensitive>" in items _unit) then {
        systemChat "you have a phone";
    };
}, true] call CBA_fnc_addPlayerEventHandler;
#

This check even a hundred times in a mission is nothing.

knotty mantle
#

okay. Well thank you very much ๐Ÿ˜ƒ

little eagle
#

Only works for the local player, so you need to add this in init.sqf I'd say.

knotty mantle
#

initplayerlocal works aswell?

little eagle
#

Sure, doesn't matter where.

knotty mantle
#

check

#

Other question i just stumbled upon with the new Eventhandler wikipage. I always used (_this select 0/1/2 etc.) in eventhandlers for the parameters that are available but on the new page there are actually names like "_container", "_unit". And as i know that it is available for ACE i wanted to ask if i can acces those params via those var names?

little eagle
#

The names are arbitrary.

knotty mantle
#

ah f*ck me. params. obviously

little eagle
#

Yeah, params ๐Ÿ˜„

knotty mantle
#

thanks again ๐Ÿ˜„

tough abyss
#

@tame portal - thanks. I ended up finding another solution ```SQF
["NULL-Object", format ["%1 (%2)", typeOf cursorObject, cursorObject]] select (!isNull cursorObject)

little eagle
#

I want # to work with booleans.

tame portal
#

god damn hippie syntax

#

just kidding but select is something i dont think of directly as an alternative to the ? : syntax of other languages ๐Ÿ˜„

little eagle
#

If it were me, I would've done it like this:

#

_this:0

tame portal
#

o

little eagle
#

Or even alternative unary syntax.

#

:0

#

Implying to use _this, exactly like param(s) does.

#

I wish + and - etc. would know when an ARRAY is a vector, and then use the vectorAdd, vectorDiff commands instead of what + and - usually do for arrays.

errant jasper
#

How would you tell?

little eagle
#

Idk, good question.

#

Maybe a different type.

#

Or maybe scrape the old + and -.

errant jasper
#

That could work. Would need conversion commands back and to array/vectors.

little eagle
#

Nah, all the commands that accept ARRAY, would also accept VECTOR.

#

This must be confusing for C++ people.

errant jasper
#

But + would be different depending on type.

little eagle
#

Yeah, it wouldn't be bwc.

errant jasper
little eagle
#

backwards compatibility

#

The bane of every new feature.

tough abyss
#

@wary vine looks good

merry ibex
#

thanks

drowsy skiff
#

This is probably going to be obvious to someone ... but not to me! So, I have this :
_next_wp setWaypointStatements ["true","nul = [_grp,_next_wp_mkr] execVM 'fth\object\movement.sqf'"];
But the values of _grp and _next_wp_mkr are not written out correctly; so I tried a format approach:
format ["_next_wp setWaypointStatements ['true','nul = [%1,%2] execVM 'fth\object\movement.sqf''];",_grp,_next_wp_mkr];
... no joy. What am I missing?

timber veldt
#

Hey guys, is there a way to delete the evindence. In the CG framwork?

I mean delete them for good, so they don't even spawn ๐Ÿ˜ƒ

broken forge
#
["Altis",[3678.92,12898.8,53.6434],28.1986,0.75,[-19.4925,-0.000124383],0,0,720,0.3,0,1,0,1] call BIS_fnc_camera;```
#

how to i get the positions to move to each other

#

smoothly?

still forum
#

@drowsy skiff
Variables don't carry over to other scripts. Your waypoint statement is a entirely different script.
And you can't just turn groups into strings and back.
I guess the _grp is the group the waypoint belongs to?
and _next_wp_mkr is a marker. Thus a string?

_next_wp setWaypointStatements ["true",format["[group this, %1] execVM 'fth\object\movement.sqf'", _next_wp_mkr]];
drowsy skiff
#

thanks @still forum

broken forge
#

plez help xd

little eagle
#

I didn't realize how clunky waypoints were.

#
_next_wp setWaypointStatements ["true", format ["[group this, %1] execVM 'fth\object\movement.sqf'", str _next_wp_mkr]];

Pretty sure you have to pass a marker like this into format, because you otherwise lose the quote marks that make a marker a marker and not a global variable.

drowsy skiff
#

thanks - but it turns out you can avoid that final str b/c the marker var is already a string

#

and yes, waypoints are super clunky ๐Ÿ˜ฆ

little eagle
#

The marker is indeed already a string, but if you put a string into format, it will delete the outer quote marks.

little oxide
#

yeah but he string a string

little eagle
#

format ["%1", "my_marker"];
-> "my_marker"

#

That's what I said.

#

format ["%1", str "my_marker"];
->
"'my_marker'"

#

It's not really displayed as ', but "", but w/e.

wary vine
#

is there an "easy" way to convert safeZone to pixelGrid ?

little eagle
#

Why would you break your ui?

meager heart
#

about wp's...

private _wp = _group addwaypoint [_position,0];
_wp setwaypointtype "move";
/*_next_wp setWaypointStatements ["true", format ["[group this, %1] execVM 'fth\object\movement.sqf'", str _next_wp_mkr]];*/
waitUntil {(currentwaypoint _group) == (_wp select 1)};
[_group,_next_wp_mkr] execVM "fth\object\movement.sqf";

๐Ÿค”

#

kinda more freedom...

#

(maybe)

little eagle
#

True, but now you have two loops.

#

I wish they were like triggers, objects were you can use setVariable on.

wary vine
#

so safezone is better then pixelGrid ?

still forum
#

other way around

little eagle
#

Yes, safeZone is better than pixelGrid.

#

Seems to me that if you have to ask, then you don't have a good reason to switch.

still forum
#

never change a running system

little eagle
#

Eh, disagree. We would still be single celled organisms if that were a good paradigm.

hollow lantern
wary vine
#

somone just adivsed me to switch

little eagle
#

Did they say why, ud9d-1?

wary vine
#

That way it will work flawlessly on all interface sizes and resolutions

little eagle
#

That's already covered by safezone.

#

That's literally why it exists in the first place...

still forum
#

@hollow lantern does the file that it's complaining about exist?

hollow lantern
#

yes it does

still forum
#

Nope. It doesn't exist

#

you don't have the CfgCLibLocalisation.hpp file

hollow lantern
#

I just posted a screenshot of lit lol

still forum
#

No you didn't

hollow lantern
#

cfgCLibLocalisation.hpp

still forum
#

You posted a screenshot of a different file called cfgCLibLocalisation.hpp

hollow lantern
#

eh

still forum
#

That's a entirely different file

hollow lantern
#

CfgCLibLocalisation.hpp vs. cfgCLibLocalisation.hpp

still forum
#

C != c

little eagle
#

Trust him, he has a blue name.

hollow lantern
#

ah lol

#

case sensitive

#

gotcha

little eagle
#

Armake is great (never used it)

hollow lantern
#

build succeeded, thanks for the help Dedmen

still forum
#

(โˆฉ๏ฝ€-ยด)โŠƒโ”โ˜†๏พŸ.*๏ฝฅ๏ฝก๏พŸ

shadow sapphire
#

What's the syntax if I wanted to set a script inside this event handler? Just say I wanted to set their damage to 0.9 or some such thing with a "killed" eventhandler.

    params ["_unit", "_killer", "_instigator", "_useEffects"];
}];

this setdamage 0.9;```
still forum
#

@shadow sapphire move it two lines higher

meager heart
#

3*

little eagle
#
this addEventHandler ["Killed", {
    params ["_unit", "_killer", "_instigator", "_useEffects"];

    _killer setdamage 0.9;
}];

Presumably?

shadow sapphire
#

Haha, so that's it? I just put it INSIDE and no other alterations? Dammit. I haven't tried the script at all, I just assumed it couldn't be that easy...

#

Not killer, @little eagle.

little eagle
#

Who else?

shadow sapphire
#

I am working on a script for the AI to be able to be healed the way our players are healed.

little eagle
#

The unit is already dead, no necromanzing in A3.

shadow sapphire
#

So, if they go down, we want to stop them from dying and put them in a state where the medic will know about them.

#

So, I guess I need to use "hit" then?

little eagle
#

You can't revive units in this game.

shadow sapphire
#

"Hit," rather than "killed?"

little eagle
#

Try HandleDamage...

shadow sapphire
#

I'll look at that one real quick.

little eagle
#

But even with HandleDamage, the units will die. Because HandleDamage is poop.

shadow sapphire
#

Crap. That sucks.

lone glade
#

nah commy

#

you can prevent that by capping the damage then faking the deaths ๐Ÿ˜„

meager heart
#

vanilla revive don't works for you, DEL-J ? ๐Ÿ˜€

little eagle
#

Prevent drowning with HandleDamage, I dare you.

lone glade
#

vanilla revive kills the unit

shadow sapphire
#

Yes! That's what I was trying to do, @lone glade with my dumb setdamage idea up top.

little eagle
#

It kills the unit for a good reason: HandleDamage is poop.

lone glade
#

EZ commy, insta kill if downed underwater ๐Ÿ˜„

shadow sapphire
#

@meager heart, vanilla revive doesn't work, no. Haha, we built our own casualty system for players, now I want an AI answer to it.

#

We are trying to ensure that anything we can do, our enemy AI can do as well.

meager heart
#

like if they crashed in a plane underwater... ๐Ÿ˜„

still forum
#

Ai's aren't humans. AI's can't press the "respawn" button

shadow sapphire
#

Okay?

#

The respawn button isn't available on our server anyway. But beside that, we want to get it close. That was the point. We've built systems for the AI to walk mortars and artillery onto targets, they can attack and move as company size elements and they can break contact if they know they are losing. They can also select appropriate base locations and fortify them.

little eagle
#

I'd honestly just work with respawn and just teleport the player to the corpse, copy the inventory with those handly unitLoadout commands, and delete the corpse.

lone glade
#

aka vanilla revive

little eagle
#

Or that. Same thing prepackaged.

shadow sapphire
#

Are you guys reading what I'm typing? We already have a much better medical system for players. It's done. It's complete. We don't need that.

#

I want to be able to shoot a hostile AI, have him enter a wounded state, and then have an AI medic that is near him go heal him.

little eagle
#

How is it complete and done if the most basic part isn't?

shadow sapphire
#

What are you talking about?

still forum
#

@little eagle AI respawn. Not player respawn

shadow sapphire
#

@still forum, Thank you, haha!

little eagle
#

AI can't respawn, that's true. But instead you could just create a new AI.

shadow sapphire
#

That's not a bad idea, but it would have to be done cleverly to not be obvious.

still forum
#

Problem with AI is. Their brain dies too. Where humans have a seperate brain that doesn't die together with their ingame caracter

shadow sapphire
#

I've considered this idea.

still forum
#

I don't know what else you would do.

#

creating a new unit is how respawn basically works

little eagle
#

The brain of the AI is the group, and the group survives, Dedmen.

still forum
#

except if the entire group dies at once

little eagle
#

Well, then no one can be revived anyway.

shadow sapphire
#

Well, we don't have any other respawn in the sandbox. When we have a player get wounded, he goes into a wounded state without ever dying. If he bleeds out, THEN he dies.

#

I'm looking at how we do it with players. I'll just pick through and copy this. We use handledamage and catch it at 0.95.

little eagle
#

I don't see the problem with createUnit.

shadow sapphire
#

There isn't a problem with it.

little eagle
#

Well

shadow sapphire
#

I need a way to have the medic move to and "work on" killed AI before I deleted and replaced them. Just seems more complicated.

little eagle
#

You need that anyway, don't see how it's more complicated.

shadow sapphire
#

Because if the AI on the ground is dead, doesn't their criteria change? Like often time they are marked as civilian or empty. Would that not change things?

little eagle
#

What exactly would that change?

shadow sapphire
#

Their side.

little eagle
#

And what does that change for your script?

shadow sapphire
#

I'm not sure. That's why I was asking. It wasn't rhetorical.

little eagle
#

Well, I ask, because I may be missing something.

shadow sapphire
#

Maybe, maybe not. The script doesn't exist, so everything is hypothetical right now.

little eagle
#

Different question

#

I'm looking at how we do it with players. I'll just pick through and copy this. We use handledamage and catch it at 0.95.

#

Why not do the same for AI?

lone glade
#

0.95 is not enough if the hit is on the face ๐Ÿ˜„

little eagle
#

Or the body.

shadow sapphire
#

Haha, I'm going to do that. The only reason I haven't tried that way already is because you were saying to kill and replace the downed AI, and I was discussing that with you. I was weighing it out.

little eagle
#

I guess you didn't write the original script, right?

shadow sapphire
#

@lone glade, IDK why you don't think it's enough, because it's worked for my community for years. We've never had it fail to fire.

#

@little eagle, negative. Far beyond my skills even now, but especially when it was written. This shit is downright hardcore.

little eagle
#

Really?

shadow sapphire
#

Really what?

little eagle
#

This shit is downright hardcore.
I'm intrigued.

lone glade
#

same....

#

link pls

meager heart
#

๐Ÿ˜„

little eagle
#

Don't sent it to alganthe. He will rant about some minor shit no one should care about.

lone glade
#

LIES

little eagle
#

truth

lone glade
#

see this cute little snail? <- how could it be rude?

#

and yeah, I rechecked, 0.95 is fine, it's the vanilla death treshold

#

For some reason I remembered that 0.9 was the max for the head

little eagle
#

0.9 was for vehicles.

#

HitEngine

lone glade
#

oooooh right

little eagle
#

Though, vehicles explode at 0.9,while soldiers survive up to 0.95 iirc.

lone glade
#

da

#

not all vehicles too

#

tanks and cars explobooms are handled by hitFuel now

little eagle
#

w/e

shadow sapphire
#

It's highly intertwined with our sandbox. I don't have my developer's permission to share.

Basically, if players are at less than five percent health, they are placed in a wounded state, which I think we've now changed to use setUnconscious.
While players are unconscious, it's standard stuff, they can't move, but they can look around and speak, other players can carry, drag, and drop the wounded, or load them into vehicles. Meanwhile, the wounded players bleed out, all players with first aid kits can stabilize them and restart the bleed-out, but only medics can stop the bleed-out and fix them. If the player does bleed-out, then they are added to our "redeployment" queue, and after a length of time, everyone in the queue is respawned in the back of a helicopter, which takes them to our main operating base and unloads them.

lone glade
#

i'm intrigued even more

#

because it sounds like something I wrote 2 years ago ๐Ÿ˜„

little eagle
#

Sounds cooler than ACE tbqh.

terse sleet
#

hello

shadow sapphire
#

My community's goal is to build a persistent full spectrum battlespace simulator.

terse sleet
#

I am from turkฤฑsh

#

I have a question

shadow sapphire
#

So, we have lots of overlap from ACE and the like, but we don't use the mods, we just make our own scripts. Easier to control that way. More reliable, etc.

terse sleet
#

How Can I tell if I ate from the infistar?

little eagle
#

๐Ÿค”

lone glade
#

we need some thonking in here

little eagle
#

Does not compute. Don't say I didn't try.

terse sleet
#

I'm sorry about my English.