#arma3_scripting

1 messages ยท Page 513 of 1

digital hollow
#

Look at Example 2

high marsh
#

Returns base entry of config entry.

#

inheritsFrom (config).

still forum
#

isKindOf checks if a config class inherits a specific other class

#

typeOf returns the classname of your class

#

you can use ANY class in isKindOf, tank or car are not special

high marsh
#

anything you target outside of CfgVehicles with isKindOf needs to use alt syntax correct?

astral tendon
#

Is there a easy way to check if is "car" or "tank"?

high marsh
#
if(car isKindOF "car") then
{

};
if(tank isKindOf "tank") then
{

};
astral tendon
#

or better say what "kind" he is?

high marsh
#

??

#

He's a freaking tank, what more do you want?

still forum
#

That's not how isKindOf works no.

#

You don't understand how it works

astral tendon
#

Yup, I dont.

still forum
#

It checks if the class inherits a specific other class

#

There is no "one" isKindOf

digital hollow
#

Look at the picture in inheritsFrom. Every class "isKindOf" everything above it

still forum
#

Let's take the prowler.
The prowler's inheritance is like this
All -> AllVehicles -> Land -> LandVehicle -> Car -> Car_F -> LSV_01_base_F

For every one of these isKindOf will return true

astral tendon
#

@high marsh maybe anything else the thing im looking at might be?

high marsh
#

Look at dedmen's example

still forum
#

Just make a list of types that you want to check, and check them.

high marsh
#

prowler will return true with isKindOf in the targetS: Land, LandVehicle, Car, Car_F, AllVehicles, All, etc

still forum
#

Like if you want all tanks use isKindOf Tank.
And so forth

astral tendon
#

So, is just impossible to know what kind is my object im looking at with out have to compare to a already know one?

high marsh
#

What..?

#

You can compare whatever you're looking at to whatever exists in the entire scope of arma.

#

That being, every possible type of vehicle.

astral tendon
#

Yes but I want to known what kind he is

high marsh
#

What exactly are you trying to do?

#

What do you mean what kind? We suppose you were trying to find what TYPE the vehicle was

astral tendon
#

Im looking at a object and I need to know what kind he is, I need to know if he is a "tank","car","atackHellicopter" or watterver with out have to compare.

high marsh
#
params
[
    ["_yourThingyMabBob",objNull,[objNull]]
];
{
    if(_yourThingyMabBob isKindOf _x) then
    {

    };
} forEach ["tank","car","air"];
astral tendon
#

๐Ÿ™„

high marsh
#

and if you want to do something different for each type, then you simply remove the forEach and add your own checks

still forum
#

That's just not how it works

#

you have to compare

high marsh
#

Explain.

ruby breach
#

He's not talking to you

#

He's responding to Roque_THE_GAMERToday at 9:23 AM I need to know if he is a "tank","car","atackHellicopter" or watterver with out have to compare.

high marsh
#

"Without having to compare", what's the point then? You need to compare.

digital hollow
#

"tank", "car", "air" are all arbitrary steps along the inheritance path that are deemed useful, they aren't special properties of a class. I think this is what he's not getting

high marsh
#

why is the words tank car and air not enough?

astral tendon
#

because there might be not only car, tank and air objects

still forum
#

what else might there be?

tough abyss
#

Is there any better way to broadcast a variable on server when run locally other than publicvariable? IE:

//replace 
Variable = false; 
publicVariable "Variable";
//with 
false remoteExec ["Variable", 2]; 
astral tendon
#

weapon holders, other editor placed objects, dead bodies, blood spill, many things.

still forum
#

Look them up in config viewer. It shows you the inheritance, and then just choose one of the parents and check for that

#

what you are thinking of doing is simply not possible because that's just not how it works

#

@tough abyss publicVariableServer

#

or missionNamespace setVariable ["Variable", false, 2]

tough abyss
#

An object can be many things a car for example is also a Landvehicle. Unless you have something to compare it to there is no single kind to return because it could be many kinds. @astral tendon

#

You can always return what it is with typeof but it will be specific

#

@tough abyss remote exec takes command name or function name, it makes no sense what you wrote

sturdy cape
#

@robust hollow just wanted to thank you guys again,worked instantly and is THE mega awesomness ingame.now events like a brain toasting wave make finally sense^^

high marsh
#

Brain toasting wave.....?

still forum
#

Also called microwave

#

You usually toast food in that though, not your own brain

high marsh
#

I mean. If you're willing to push the buttons I can try Ded.

wet cobalt
#

Have anyone here found a solution to how Arma 3 objects kill players with such a high frequency?
Is there a way to configure a servers collision damage to be more forgiving or whatever could solve it?
Trying to have hardcore servers online. And im starting to see why so few others attempts it since persitence of characters gets F'd by Arma 3 glitches..

#

I have Enhanced movement activated and would like to see if I can lower the amount of deaths due to climbing.. (and please refrain from answering "yes uninstall the mod")

#

Iirc Arma 2 used to have same issue in dayzmod and they made getting stuck in doors and on top of objects nonlethal

tough abyss
#

@tough abyss yeah I was trying to show an example. A human would understand it, but PC wouldn't ๐Ÿ˜‰

spark turret
#

@wet cobalt have you tried solving it by yourself yet and now you re looking for help or are you just asking generally if someone has a script for it?

wet cobalt
#

Im asking for a general direction in where to look for a possible solution. Not a copy paste answer.

#

less general then the wiki landingpage hopefully ^^

spark turret
#

well an idea might be to look at what objects kill players and figure out why that is. maybe the physx size is crappy

#

and then dont use these objects

wet cobalt
#

any object pretty much. The problem is that Arma 3 kills players that gets stuck

young current
#

glitching into things cant really be helped

wet cobalt
#

like even if the foot gets inside a object

young current
#

Arma characters geometry is just a blob

wet cobalt
#

Ye in arma 2 they never stopped the glitching it self. They somehow stoped it from setting damage to 1 though.

young current
#

well there are commands for that

spark turret
#

maybe a script that disables damage for anything else than weapon fire and teleports the players when hes stuck for like 5 seconds?

young current
#

and damage and collision events

spark turret
#

anyone know it the collision events dont fire up during a glitch or fire up to late?

young current
#

no idea

#

sometimes glitching occurs due lag

#

when your movemnt is nor processed correctly

#

in those cases the collision doesnt probably fire correctly

#

but when your position then gets updated inside an object

spark turret
#

something like if (lag) then {disalbe movement and firing} might help?

young current
#

that causes collision and you dies

#

Im not sure if you can detect lag

wet cobalt
#

ye would be awesome if I could somehow nerf that event to bits when you get stuck. In arma 2 the only downside was that cars had a harder time running over people :p

spark turret
#

try to reduce lag in the first place to avoid glitches probably also helps

wet cobalt
#

But I am willing to do big tradeoffs to solve this one.
Problem is that it does not only happen due to lag. I would need a more abstract solution.

spark turret
#

make a list of when and with what object it happens and then write a script for each object to either avoid the glitch or prevent the player dying if the glitch occurs

wet cobalt
#

I liked the idea of having like a array of what can kill you. Should not that be possible?

still forum
#

Don't remember ever dying from glitching into objects, And through enhanced movement i glitch into objects ALOT.
only thing that hurts me is when I fall down after glitching, like when I climb into a roof or smth

spark turret
#

though i dont know if a collision glitch can be detected with a vanilla command

still forum
#

Could use handleDamage to just ignore damage unless it comes from a projectile.. But what about nearby explosion damage

wet cobalt
#

it happens to everyone on my server pretty much. Cant get them to stay more then 3h

spark turret
#

yeah thats what i would do @still forum

still forum
#

You could teach people to not climb onto objects that moost likely cannot be climbed upon

spark turret
#

and maybe form physx contacts iE cars

wet cobalt
#

ye people dont want to get teached sadly. They want to play instantly.

spark turret
#

vehicles use a diffrent kind of collision check so they should be able to be excluded

wet cobalt
#

Would it be possible to set the damagehandling when server is initialised?

#

I'll read up more on handleDamage.
Any more places I should look?

spark turret
#

not sure how well it works to overwrite vanilla damage handlers

still forum
#

Easy. Just add HandleDamage eventhandler. done

#

Problems arise when mods try to do the same, like ace

spark turret
#

something along those lines

still forum
#

oof.... yeah.. kinda

spark turret
#

maybe do a check if a surface is directly above the player to detect when he falls through a floor

#

and only then disable the fall damage

wet cobalt
#

Sounds very promising. Thank you guys. Now I can stay busy for a while.
Apreciate the help.

young current
#

@wet cobalt do you run lots of mods?

#

with custom objects?

#

because custom objects can also be made badly which causes engine issues

spark turret
#

we run like 50 mods on our server and i never had any bad glitches except with a frigate and the gunboat

young current
#

there are a lot of poor quality assets out there

wet cobalt
#

I run quite a few mods and script-modules. But its mainly the enhanced movement that seams to be the problem. But I would still love to get it going.
But not impossible that in all those lines that I have included something not quite robust enough :p.

#

If I change map and remove enhanced movement and make my server a lot easier to survive on (mainly the pve) then this would not be a big problem

spark turret
#

what map are you on?

wet cobalt
#

Chernarus Redux

still forum
#

ah yeah there's lots of "bad" clutter on there that you cannot walk on but people would try to climb onto

young current
#

it migth not be enchanced movement but something else you run that messes it up

spark turret
#

same houses as chernarus 2035?

young current
#

also objects that you can get on with it are not usually designed to be walked on

wet cobalt
#

ye and climbing through windows. Had a player that died when climbing over a small fence.. only grass on the other side. Was the last I saw of him for a while probably :p

young current
#

dangers of using the engine in ways that its not intended to be used.

wet cobalt
#

Indeed. Its my headache now :p

young current
#

you should also test different mod combinations and different terrains if the issue is as noticeable

spark turret
#

yeah find out what the cause is

#

map or enhanvced movement or else

#

otherwise try to make an eventhandler that notices when a player dies from a glitch and then respawn them with all inventory nearby

wet cobalt
#

It is possible that im trying to fix the symptoms instead of the sicknes, ye

spark turret
#

probably easier

#

since arma has a lot of hardcoded dumb stuff

#

lokking at you AI

#

Ah, anyone got a recmmendation for a nice immersion EOD/IED script or even a mod

#

i saw something online but cant find it again that had randomized different kinds of IEDs and each had a GUI to disable it with cutting diffrent wires etc. But im open for all suggestions

silent bough
#

Huuum do you have ACE3 ?

wet cobalt
#

20 minutes of trying to kill my self looks really promising so far with setting the damage eventhandler. I get marked as in combat but no damage delt and then pushed out of the objects. Falldamage seams to be reduced as well which is a nice bonus

#

Thanks again guys

sturdy cape
#

@high marsh its like the brain scorcher in S.T.A.L.K.E.R

#

someone still got that fired eh where you have chicken projectiles? want to show that to a buddy

silent bough
#

Hi, does someone know how to add a locking ability to a vehicle ?

young current
#

target locking?

silent bough
#

Yes, I made some researches and it appear that I want to to do exactly is add a sensor to a vehicle.

young current
#

that would likely do it yes

#

also you might need a weapon that can use it

silent bough
#

I want to use a laser tracker, and the missile that will lock on will be an ATGM LG

#

I see that I can add a sensor editing it class but I need to do this with a script.

young current
#

nope

silent bough
#

Nope ?

young current
#

cant do it with script

#

sensor are tied to the configs

silent bough
#

Not very convenient... My goal was to use a script to edit the vehicles I will have to spawn. If I make my config with the class system, will I be able to copy/paste the vehicle to keep my configs ?

digital hollow
#

If you want to add sensors to a vehicle that doesn't have it, you'll have to mod it. After that you can use it like any vehicle.

silent bough
#

And can I hade a missile camera to follow the ATGM ? Like the driver/gunner one.

#

@digital hollow So if I copy/paste it with Zeus, my new vehicle will keep my configs if I understand well ?

digital hollow
#

If it's modded, yes.

silent bough
#

What do you mean by "modded" ?

digital hollow
#

Like how CUP or RHS has vehicles in their mods

#

Or how ACE alters vanilla vehicles with its mod

silent bough
#

Ok, modded like this, I hopped something easier x)

digital hollow
#

Easy, just use a vehicle that does what you need =p

silent bough
#

I'm already working with CUP.

#

That I try to do is adding the new ATGM to a CUP vehicle ^^^

digital hollow
#

You can try just adding the weapon. I think it has LOAL mode

silent bough
#

Yes and.. no

#

It's very uneffective.

#

If I just add the weapon, it'll lock on only if I aim at the laser.

#

And that I need is more a form of mobile artillery.

spark turret
#

@silent bough sure got ace. any recommendations for the EOD script?

silent bough
#

I don't know any script that can do the job, but now you know that you already have EODs.
If you script a little and you've got the time, I think you could do that yourself.

#

What do you want want the script to do exactly ?

crystal schooner
#

Hello is there anyway to make it so set a argument on an addaction so the script will check for what the argument the addaction had

#

_actionID = this addAction ["Picture", "BriefingPictures.sqf"]; This the current action and i would like to so the script to check what argument the action had to select which pic

winter rose
#

yes, passing arguments is detailed on the wiki page

tough abyss
#

3rd param

crystal schooner
#

_actionID = this addAction ["Picture", "BriefingPictures.sqf", "Pic1"];

#

so like that

tough abyss
#

yeah and in script if (_this select 3 == "Pic1") then {......}

crystal schooner
#

Great ty!

spark turret
#

@silent bough ideally having a GUI with randomized wires to be cut so its difficult every time again. I havent done anything with GUIs yet so i doubt i can just create something like that myself

crystal schooner
#

Hello im having issues attaching texture global on objects through a script on my dedi, but when i did it on my pc it worked perfectly

mellow obsidian
#

Im trying to spawn a weapon on the ground but I would like attachments to be on the gun aswell. The approach Im currently taking is spawning a unit then putting the weapon with attachments on the unit and after that deleting the unit. Does anyone have another/better idea of an approach?

tough abyss
#

Nope

crystal schooner
#

@tough abyss Do you have any idea of the issue

robust hollow
#

does _argument equal "Default"?

mellow obsidian
#

And also if so does _target equal the thing your trying to set texture to?

crystal schooner
#

Ye

#

Ye it works fine in MP hosted on PC

robust hollow
#

what is the target

crystal schooner
#

Whiteboard (Altis)
Variable name:Screen

robust hollow
#

cant really help much with that snippet cause it doesnt show where the variables are set.

crystal schooner
#

Ill edit it now

#

There

#
_target = Screen;
_caller = _this select 1;
_argument = _this select 3;
_Briefer = "76561198131470785";
_Gate = Gate;
_Texture1 = "Images\cityBW.jpg";
_Texture2 = "Images\MRAPPic.jpg";
_Texture3 = "Images\presslocationBW.jpg";
_Texture4 = "Images\SahraniNorth.jpg";
_Texture5 = "Images\SahraniSouth.jpg";
_Default = "a3\structures_f\civ\infoboards\data\mapboard_altis_co.paa";

if (getPlayerUID _caller isEqualTo _Briefer) Then {

if (_argument isEqualTo "Picture1") then {
_target setObjectTextureGlobal [0, _Texture1];
Hint Format ["Picture 1 Enabled:%1", _Texture1];
};

if (_argument isEqualTo "Picture2") then {
_target setObjectTextureGlobal [0, _Texture2];
Hint Format ["Picture 1 Enabled:%1", _Texture2];
};

if (_argument isEqualTo "Picture3") then {
_target setObjectTextureGlobal [0, _Texture3];
Hint Format ["Picture 1 Enabled:%1", _Texture3];
};

if (_argument isEqualTo "Picture4") then {
_target setObjectTextureGlobal [0, _Texture4];
Hint Format ["Picture 1 Enabled:%1", _Texture4];
};
if (_argument isEqualTo "Picture5") then {
_target setObjectTextureGlobal [0, _Texture5];
Hint Format ["Picture 1 Enabled:%1", _Texture5];
};

if (_argument isEqualTo "Default") then {
_target setObjectTextureGlobal [0, _Default];
Hint Format ["Picture 1 Enabled:%1", _Default];
};

if (_argument isEqualTo "Gate") then {
_Gate setVariable["bis_disabled_Door_1",0,true]; 
 
_Gate setVariable["bis_disabled_Door_2",0,true]; 
 
_Gate setVariable["bis_disabled_Door_3",0,true]; 
 
_Gate setVariable["bis_disabled_Door_4",0,true];
Hint "Gate Enabled";
};

}
else {
Hint format ["You are not the mission host %1", name _caller]
};
robust hollow
#

how is Screen defined?

crystal schooner
#

Variable Name of the whiteboard

#

Yeah so basically none of the commands work when the mission is on the dedi. The addactions is on a laptop on a table having all actions on them.

robust hollow
#

the gate doesnt work either?

crystal schooner
#

Nope

#

With watch the cursortarget command return the gate as Gate

robust hollow
#

u wanna add this in the script to see what it says?

hint ([
    format["_caller: %1",_caller],
    format["_argument: %1",_argument],
    format["_target: %1",_target],
    format["_Gate: %1",_Gate]
] joinString "\n");```
crystal schooner
#

Yes

#

give me a sec

#

Took a while had to do a win update

#

launching server now

high marsh
#

@robust hollow why don't you just use parseText ?

hint parseText format["Caller %1 <br/>
Argument: %2 <br/>
Target: %3 <br/>
Gate: %4 <br/>
",_caller,_argument,_target,_gate];
robust hollow
#

๐Ÿคท just a debug log so didnt really care about doing it properly

crystal schooner
high marsh
#

Easier on the ๐Ÿ‘€

tough abyss
#

\n should work in text hint too

high marsh
#

Yeah it does, parseText is nice and clean ๐Ÿ˜ƒ

robust hollow
#

@crystal schooner Screen isnt defined

crystal schooner
#

Gate is though and it isnt working :&

robust hollow
#

what does the hint say the argument is for gate?

tough abyss
#

Screen is undefined

crystal schooner
#

_Gate: Gate

#

Ye ik

robust hollow
#

whats the argument tho

tough abyss
#

Why though if it is object variable?

crystal schooner
#

Idk tbh

#

argument is Gate

#

..

#

and variable name is Gate

robust hollow
#

define Screen and then try again

crystal schooner
#

Fuck simple object makes it so it cant be a variable right...

tough abyss
#

What?

#

You checked simple object?

crystal schooner
#

If its a simple object you cant have a variable name or am i wrong

tough abyss
#

Oh dear

crystal schooner
#

It isnt my mission ok

robust hollow
#

๐Ÿคฆ

crystal schooner
#

Chill

#

im just fixing someones mission

#

๐Ÿคฆ

high marsh
#

why don't they try and learn themselves?

crystal schooner
#

Because the mission we are doing starts tomorrow

high marsh
#

Maybe you should have also made sure it was ready before planning it? ๐Ÿ˜›

crystal schooner
#

Well the mission is ready but now its just fixing the details (:

high marsh
#

dmg control? ๐Ÿ˜ƒ

crystal schooner
#

But Connor the gate should work

#

Sort of ๐Ÿ˜ƒ

robust hollow
#

is gate a simple object? ๐Ÿค”

crystal schooner
#

NOOO ๐Ÿ˜ฆ

tough abyss
#

But you disable 4 doors how gate is related to them?

crystal schooner
#

What

#

Gate is the variable name of the gate

tough abyss
#

Wait is disabled door true false or 1 or 0?

robust hollow
#

1 to disable

#

0 to enable

crystal schooner
#

Ye i've done that

tough abyss
#

So what is Gate?

crystal schooner
#
This setVariable["bis_disabled_Door_1",1,true]; 
 
This setVariable["bis_disabled_Door_2",1,true]; 
 
This setVariable["bis_disabled_Door_3",1,true]; 
 
This setVariable["bis_disabled_Door_4",1,true];
#

That is the init of the gate

#

Thank god map works now

high marsh
#

Map? Are you having an issue with the terrain now?

tough abyss
#

Yeah but what is it?

crystal schooner
#

I believe its a CUP Gate

tough abyss
#

What kind of gate has 4 doors?

crystal schooner
#

It probably doesn't i just added multiple doors to get it working

#

And it did on my PC

tough abyss
#

Never put global command in init

#

Init the gate from server

crystal schooner
#

Its in the init of gate is that a big nono

tough abyss
#

Or from local instance

#

If you use init add if (isServer) then {...your set vars..};

#

But it will be broken for JIP

crystal schooner
#

Well you dont need it for JIP

#

its just for mission start

tough abyss
#

Actually no should be fine for JIP

crystal schooner
#

to lock the gates so players cant drive away before briefing is done

spark turret
#

what kind of orc horde are your players that they will try to run away from the briefing lol

crystal schooner
#

Well..

#

Lets just say last mission we had 40 casualties before mission start

spark turret
#

nice. just disable simulation for them during briefing lol

crystal schooner
#

OMG i'm a retard.... Fixed it all. They had disabled simulation on the gate.

tough abyss
#

Great, check all other attributes for every object then, this looks like tendency

crystal schooner
#

Well everything else is just standard objects in the base. They can just stay like that i guess.

#

Gotta teach them what to enable/disable simulation on.. Thanks for the help though really appriciate it. ๐Ÿ˜ƒ

high marsh
#

I've discovered something very strange when using set/get variable on a location. The Size y and x must be greater than zero.

spark turret
#

not a surprise since the map coords start at 0/0

high marsh
#

Thought it'd still keep a reference. ยฏ_(ใƒ„)_/ยฏ

robust hollow
#

i do recall the say3D distance parameter not working for me in the past, had to set the distance in CfgSounds. I assume say2D suffers from the same problem (what ever it may be).

high marsh
#

yeah jus set it in cfgSounds

velvet merlin
#

is there a way to capture ingame chat via sqf?

#

(or any status message in that "element")

robust hollow
#

dont think so, the best you can do for chat is get the message from the text box as they hit send.

velvet merlin
#
class RscDisplayChat
    idd = 24;
    class controls
        class CA_Background: RscText
        class CA_Line: RscEdit
            idc = 101;```
#

one can parse the input at least

robust hollow
#

yea thats the kind of thing im meaning

velvet merlin
#
class RscDisplayChannel
    idd = 63;```
#

this should be the output

robust hollow
#

isnt that just the display that says which channel ur in and if you are VOIP activated or not?

robust hollow
#

oh sorry, i was thinking output as in the actual chat log

still forum
#

@velvet merlin is there a way to capture ingame chat via sqf? yes CBA has it.

velvet merlin
#

thanks but i meant the display on clients

#

to manipulate/filter/hide/redirect it

tough abyss
#

Intercept it and modify if necessary?

#

Might as well make own chat system

#

Less of a headache, full control

remote basin
still forum
#

squadleader?.. I assume that slot is also the group leader, you can just check by
leader player == player and done.
If the player is the leader of his group, then he is a squadlead

velvet merlin
#

@tough abyss custom chat and kill message system would be a fallback indeed, but less desirable if can be done by other means

west venture
#

@still forum The Leader could turn out to be the JIP'ng rifleman in a dead group

still forum
#

well if he's the only guy in his group, he leads the group. Maybe that's enough?

#

I guess the problem with his check is that if any of the leads is not present in the mission, the variable will be nil and it will error out @remote basin

#
isNil { //make sure undefined variables don't trigger errors
    squadleader = player in [platco, alphalead, bravolead, charlielead, deltalead, echolead];
};

how about that?

remote basin
#

I have tried it with 5 players in the dedi server, all of which were different roles. When they were in the squad lead roles they still did not return a true or false for squadleader

#

That looks great @still forum , will try it now and get back to you ASAP. Cheers for the help!

tough abyss
#

@velvet merlin if by other means you mean hacking displays and controls I will go with custom chat any day

#

@still forum that will trigger undefined var error in scheduled as soon as you try to use undefined var

#

And initplayerlocal is scheduled right?

#

@remote basin use roleDescription instead of variables

velvet merlin
#

@tough abyss whats so bad about reading out chat, hiding/filtering out some stuff, and display it by other means?

still forum
#

@tough abyss yes. That's why I made it not trigger that error by moving it to unscheduled...
I also already said that the undefined var is probably his error. Just read what I'm writing...
if any of the leads is not present in the mission, the variable will be nil and it will error out It's literally right there.

remote basin
#

@tough abyss roleDescription is a good shout, I will give that a go if the other fix doesn't return any results. However bear in mind that I have some squad leader specific addActions down that have the conditions set to "squadleader" So unless I can get a "true" out of a (player = {certain_role}) then it doesn't really do much for me unfortunately

tough abyss
#

@still forum chill out man, I am still making my coffee ๐Ÿ˜‚

still forum
#

Better make a espresso :triggered:

tough abyss
#

Thatโ€™s what I am making

remote basin
#

@still forum You are a champion, cheers mate. That worked perfectly

still forum
#

throws ๐Ÿฉ at @remote basin

remote basin
#

catches

still forum
#

Funny how commy came up with the exact same solution, in parallel to me on reddit.

next scaffold
#

Hi! I want to use the "playerConnected" missionEventHandler but I don't see any param for the unit the player is playing as. Does arma consider players connected as soon as they get into the lobby or after they chose slot and got into the world?

addMissionEventHandler ["PlayerConnected", {
    params ["_id", "_uid", "_name", "_jip", "_owner"];
}];
robust hollow
#

it fires after receiving data but before they have a unit

next scaffold
#

I see... Is there anything I can use that fires after the player chose slot and is already playing?

still forum
#

I guess you can use the EntityRespawned handler

#

That might fire if the unit spawns by "respawning"

tough abyss
#

forceRespawn + EntityRespawned maybe?

next scaffold
#

alright, I will try that. Thank you all!

cursive whale
#

has anyone here tried to use weaponDirection to determine point of aim (small arms) and found it utterly unreliable? i always imagined it pretty solid (pretty sure i've seen ppl use it for all sorts of things that would require reasonable accuracy i.e. ace_laserpointer_fnc_drawLaserpoint). My experience with it; https://imgur.com/a/OxsbKYq

low birch
#

Hi. Is there a way (script command) to save a MP mission progress, user's collections and so on before a planned server restart and to restore al saved items after server's start if it was not implemented in mission iteselves?

winter rose
#

Not that I know of. The mission should be in charge of saving indeed

tough abyss
#

@cursive whale maybe try to calculate all positions in world coordinates and convert to AGL only when passing to drawLine3D

#

@low birch save variables in server profile namespace or use database extension

cursive whale
#

@tough abyss dunno , the origin coordinate (getpos player) isn't really the issue it's that the weapondir vector doesn't match the weapon's pitch. suspect weaponDirection might pre-date IK and always assumes the unit is on a perfectly level surface. probably it needs a weaponDirectionVisual command.

spark turret
#

@next scaffold we use a: foreach allunits command that checks if (typeof _x == "Classname" && iskindof Player) to give all players a new loadout according to the class they play

#

might be what you are looking for. fires up whenever you want and you can set the sleep command long enough to not cause lag

tough abyss
#

@cursive whale I didn't know that was unreliable, damn it I rely on that for some stuff. Going to have to look into it deeper when I get the chance. Thanks a lot for sharing.

spark turret
#

@cursive whale maybe modded weapons dont work? but honestly ive seen a lot of stuff using it, works well

low birch
#

@cursive whale sorry, but how exactly to do that using the prifile nameSpace?
Can i just run in a Debug Console saveProfileNamespace; before and loadProfileNamespace; after server restart?

digital hollow
#

Ironsight, how come you don't useallPlayers

spark turret
#

@digital hollow is refits all units with new loadouts, allows us to place zeus units and create custom factions without mods

digital hollow
#

Ah, not just players then, ok.

spark turret
#

yeah but theoretically you COULD add that condition very easily

still forum
#

@low birch call saveProfileNamespace after you save a variable to it (profileNamespace setVariable [...]). You don't need to load, Arma does that by itself

low birch
#

@still forum thanks, will look on it

tough abyss
#

@cursive whale have you tried what I suggested?

cursive whale
#

@tough abyss No, not sure what you mean. Could you revise this along the lines you suggest?

#

AddMissionEventHandler ["EachFrame", {
_v = player WeaponDirection (PrimaryWeapon player);
_a = (GetPos player) VectorAdd [0,0,1.5];
_b = _a VectorAdd (_v VectorMultiply 100);
DrawLine3D [_a, _b, [1,0,1,1]];
}];

digital hollow
#

try using eyePos

tough abyss
#

@cursive whale

addMissionEventHandler ["Draw3D", 
{ 
    _v = player weaponDirection primaryWeapon player; 
    _posWorld1 = getPosWorld player vectorAdd [0, 0, 1.5]; 
    _posWorld2 = _posWorld1 vectorAdd (_v vectorMultiply 100); 
    drawLine3D [ASLtoAGL _posWorld1, ASLtoAGL _posWorld2, [1,0,1,1]]; 
}];
cursive whale
#

@tough abyss Cheers, will give it a whirl.

tough abyss
#

It works

cursive whale
#

dang, it does, but i confess i don't understand the difference

tough abyss
#

It is simple, drawLine3D wants position AGL. when you extend vector and add it to position AGL with vectorAdd you get Position3D not PositionAGL

#

PositionAGL depends on terrain, Position3D does not

#

Hence discrepancies. In VR the terrain is flat so you will get it working either way

#

this is also the reason vectorDistance was added because distance was calculating wrong distance for Position3D

cursive whale
#

right so i was doing DrawLine3D [PosAGL, Pos3D... (or vice-versa?

spark turret
#

great stuff m242 will try and use it for my "point a gun at a civilian to make it surrend" script

still forum
#

render position is terrain height + the z component in your position.
If terrain stays the same, then the only difference will be your z component. But if terrain changes, the difference will be terrain AND your z position. That's the issue
What M242 did was do all the calculations at 0,0,0 base first and then move them up to terrain level later

tough abyss
#

yeah something like that @cursive whale

cursive whale
#

Thanks man ๐Ÿ‘

#

As you were everyone, weaponDirection not broken ๐Ÿ˜Š @tough abyss

cursive whale
#

bit bonkers though that DrawLine3D is relative to terrain height

spark turret
#

wdym the code m242 posted does not depend on it

#

well i should say it works around the draw 3d dependency on posAGL

slim oyster
#

Anyone have experience with editing the 3den dialog display scripts? I am trying to hide specific attributes from a generated list, data fetched from config. The base game behaviour already has the ability to conditionally show categories depending on the condition state of the selected object, but I cannot find this script anywhere.

quartz oracle
#
if(isServer) then
{
    for [ {_i = 0}, { _i < count _allPlayers }, {_i = _i + 1} ] do 
    {
        _PlayerName = name _allPlayers select _i;
        player addAction [format["kill %1", _PlayerName], "mySkrip.sqf"]
    }
};```
i dont know what im doing wrong it says ```Error name: type array, expected object location```
in line 6
still forum
#

name _allPlayers select _i;
commands that take one parameter have higher priority than commands that take two parameters.
You are executing
(name _allPlayers) select _i; and you can't plug array into name

ruby breach
#

That's also a superly overcomplicated way to do {} forEach allPlayers

still forum
#

And superly bad performing. That's the worst kind of loop you can choose if you want performance

#

Also why do you get _allPlayers variable even on non servers, when you are only gonna use it on server?

quartz oracle
#

so how can i fix it ? by type name (_allPlayers select _i)

#

it should only be execute for the host

still forum
#

You shouldn't use the for loop at all

#
if (isServer) then {
    {
        player addAction [format["kill %1", name _x], "mySkrip.sqf"];
    } forEach (call BIS_fnc_listPlayers);
};
#

I assume that action is supposed to kill a certain player.. How do you want to know which player was chosen if you don't store that info anywhere?

quartz oracle
#

i havent thought that far ๐Ÿ˜„

still forum
quartz oracle
#

k thx

daring vault
#

is there any way so set ammo in a mag that is not in a weapon?

#

to set#

ruby breach
#

Don't believe there's a setMagazineAmmo style of command. You can do ```sqf
_unit removeMagazine "30Rnd_556x45_STANAG"; // _unit must be local
_unit addMagazine ["30Rnd_556x45_STANAG", 15];

daring vault
#

missed that thank you!

tough abyss
#

Can any of you guys see why this isn't working?

_fNames = [
    "Mohammed",
    "Omar",
    "Ahmed",
    "Ali",
    "Youssef",
    "Abdul",
    "Yasin",
    "Hamza",
    "Haziq"
];
_sNames = [
    "Abdullah",
    "Khan",
    "Al-Ghamdi",
    "Alaoui",
    "Khan",
    "Ahmad",
    "Ali",
    "Khoury"
];
_fName = selectRandom _fNames;
_sName = selectRandom _sNames;
_sName2 = [" ", _sName] joinString "";
_wName = [_fName, _sName2] joinString "";
unit setName [_wName, _fName, _sName];
#

describe "isn't working"

ruby breach
#

My immediate guess is that unit isn't what you think it is

#

Or that you're not seeing the change because the effect is local

tough abyss
#

Oh, no it's some ACE3 issue. It works if I do name cursorTarget but not if I check responsiveness of the unit (using ace medical).

#

I'm testing in non dedi MP so I see all the effects!! ๐Ÿ˜„

still forum
#

ace has a special name variable

#

so that they can still retrieve it after unit died

tough abyss
#

Do you know if I can refresh that after changing the name of a unit?

tough abyss
#

Yeah, I found it too. Probably should learn to search before asking lol. Thanks! ๐Ÿ˜ƒ

still forum
#

It's just a variable

#

just set it

daring vault
#

will this work?

#

//init
restart_time = (36060) //(3 hours)
restart_time_warning = restart_time - (15*60) // 15 minute restart warning

//restart script
if(isDedicated)then{

waituntil {serverTime > restart_time_warning};
systemchat "server restarting in 15 minutes!!!"; // will be set to public var
waituntil {serverTime > restart_time};
serverCommand "#restartserver";
};

#

restart_time = (36060) //(3 hours)

#

restart_time = 3 x60x60

#

idk why thats not shoing up right

tough abyss
#

really? x for multiply

daring vault
#

just for discord

tough abyss
#

oh

daring vault
#

its right on the script

#

the warning worked

tough abyss
#

restart not working?

daring vault
#

i dont have a dedi to test atm

tough abyss
#

you need password for serverCommand

daring vault
#

but it is posible to restar a server that way?

tough abyss
#

why not

daring vault
#

ok thank you

tough abyss
#

but it is not the best way to go about it

daring vault
#

for what im doing it will work

#

im making a database script that warns player of a save befor restart

tough abyss
#

you basically checking serverTime > restart_time_warning every frame for 3 hours

#

this is stupid

#

and wasteful

#

but it will work

daring vault
#

i will change it i just wanted to know if it would work

still forum
#

@daring vault
```sqf
<code>
```
For proper code highlight, then you also don't need to replace any characters

daring vault
#

ok thx

#

still new to discord

rancid pecan
#
_uid = getPlayerUID player;
"hello" remoteExecCall ["hint", _uid]; 
#

why don't working ?

still forum
#

because wrong parameter

#

read wiki

#

_uid wrong

#

Actually.. Your code doesn't make sense at all

#
hint "hello";

Here use this.

tough abyss
#

Why people attempt to use remoteExec for everything like it is some sort of magic answer to everything

still forum
#

There are atleast 3 things wrong with your code... okey 4.
Who can find more? the game is... Okey 5..
Who can find more than 5! The game is on!

tough abyss
#

"Why don't working" not is right

#

Yeah it is not JIP compatible should set 3rd param to true!

#

there is 1 thing wrong, _uid should be player, then it works

still forum
#

"works" is not "right" tho ^^

tough abyss
#

works is not wrong though either

winter rose
#

no need to remote exec if it is for the actual player, so hint only

still forum
#

Not wrong.. But still stupid retarded

copper raven
#

For some reason fired event handler returns null projectile when you launch flares from a jet, right now using nearestObjects as a workaround, has anyone else encountered this issue? maybe there is a better workaround than nearestObjects.

winter rose
#

@rancid pecan if you just want to hint locally, drop remoteExec

still forum
#

@copper raven yep. Happens with grenades too

tough abyss
#

You could make one of those memes with the progressive brain images and the different ways of coding a way to hint hello to yourself lol

copper raven
tough abyss
#

flares are scripted I think

rancid pecan
#

@winter rose i don't want hint locally just example

#
private["_uid"];
_uid = [_this,0,"",[""]] call BIS_fnc_param;
if (count pb_spieler==0&&pb_spielstatus==0) then {
 [[],"TON_fnc_game",false,false] spawn life_fnc_MP;
 pb_spielstatus = 1;
};
if (pb_spielstatus==1) then {
 _uidarr = [_uid];
 _geld = [_this,1,0,[0]] call BIS_fnc_param;
 if (_geld>=5000) then {
 pb_spieler = pb_spieler + _uidarr;
 [[5,"Du wurdest erfolgreich fรผr das kommende Spiel angemeldet!"],"life_fnc_pb_response",_uid,false] spawn life_fnc_MP;
 } else {
 [[1,"Du hast keine 5000 Dollar bei dir!"],"life_fnc_pb_response",_uid,false] spawn life_fnc_MP;
 };
};
if ((pb_spielstatus==2&&count pb_spieler>=2)||(count pb_spieler==pb_maxspieler)) then {
 [[1,"Leider hat das Spiel bereits begonnen oder die Lobby ist bereits voll, versuche es spรคter noch einmal!"],"life_fnc_pb_response",_uid,false] spawn life_fnc_MP;
};
#

[[5,"Du wurdest erfolgreich fรผr das kommende Spiel angemeldet!"],"life_fnc_pb_response",_uid,false]

still forum
#

Ew what the frick is this garbage... OH.. It's life code..

#

That explains it..

tough abyss
#

BIS_fnc_param ๐Ÿคฆ

copper raven
#

๐Ÿคข

rancid pecan
#

[5,"Du wurdest erfolgreich fรผr das kommende Spiel angemeldet"] remoteExecCall ["life_fnc_pb_response",_uid];

#

yeah

still forum
#

you cannot remoteExec with a uid

rancid pecan
#

this wrong how working ?

#

yes i know

still forum
#

why don't you use the script like it was given to you?

rancid pecan
#

because new version life scripts remove life_fnc_MP

still forum
#

On point 3 on the forum

#

Just remove the getPlayerUID

#

And then have fun with your shit script garbage ^^

high marsh
#

lol, not only is it life, it's german life.

still forum
#

Yeah german lifers are the worst

high marsh
#

is life_fnc_mp a rehash BIS_fnc_MP?

still forum
#

yes

high marsh
#

LOL

tough abyss
#

_uid is string, life fnc supports _uid?

high marsh
#

lifers actually doing work? Doubts.

tough abyss
#

Doesn't seem so, something RealQuae invented

#

I feel dirty after reading this thread

#

RV devs should get a monument for making an engine that can take so much crap and still function

tough abyss
#

I saw someone else attempt to use serverCommand and it reminded me of my failed attempts at doing so.

I'm trying to make the server shutdown by script. So far I've got this

//adminPass.txt located in the arma 3 directory along with .exe, addons folder etc etc
test123
//My sick code
_pass = loadFile "adminPass.txt";
_pass serverCommand "#shutdown";

I'm able to do "#login test123" and successfully log in as admin on dedicated.
I'm able to watch "loadFile 'adminPass.txt'" using CBA debug console and it says "test123".
I'm able to do "#shutdown" in the chat box as logged in admin to shutdown the server.
I'm NOT successfull at shutting down the server when running my sick code on server, or local in dedicated.

I run client and server with -filePatching.
In server.cfg allowedFilePatching is set to 2.

All I get is the false output indicating wrong password and Failed attempt to execute serverCommand '#shutdown' by server.

Has anyone had success using the alternative syntax of serverCommand?
Does anyone know why it's not working for me?

still forum
#

In server.cfg allowedFilePatching is set to 2.
Don't do that, that essentially allows ever player to cheat

#

did you put a diag_log into your server code to make 101% sure that the _pass is correct?

tough abyss
#

It's just a test server ๐Ÿ˜‰ Thanks for the heads up though.
I'll log and see what it says.

#

RPT says "test123" for _pass :/

#

even if I write "test123" serverCommand "#shutdown"; and execute globally it just returns false on debug console. I think something's fucky with serverCommand itself.

still forum
#

The password for #login is not the same as for server command. You know that right? Just making sure

tough abyss
#

I should have servercommandpassword set to the same as adminpassword

#

otherwise.. This will be a massive misstake by me lmfao

tough abyss
#

and execute globally why would you do that?

#

it has to be executed on server it says so on the wiki

#

Thanks @still forum
serverCommandPassword wasn't defined.

@tough abyss to remove any doubt that it's not executed correctly?

#

you want to see the result from server, exec global returns result from client, you are shooting yourself in the foot

#

at that point I was attempting to suicide bomb the whole thing

#

serverCommandPassword wasn't defined. From biki: password : String - password defined in server.cfg with serverCommandPassword param

#

Yep. That is correct.

finite cloud
#

Is there an easy way to batch unpack PBOs and unbinarize configs from a downloaded addon? Or do I need to do it all manually?

robust hollow
#

mikero tools probably deraps automatically

still forum
#

yeah they do

finite cloud
#

Awesome, thanks!

still forum
#

If you really need a lot of files unpacked you could use DokanPbo, that way you don't need to unpack anything shill

tough abyss
#

I'm getting a "type number, expected Bool" error on this, is my comparison messed up or something?
waitUntil {(endingTriggers == 2)};

still forum
#

are you sure you are getting the error on that?

tough abyss
#

wait no lol

still forum
#

maybe you are off by one or two lines

tough abyss
#
waitUntil {(endingTriggers == 2)};
if ((leloup_captured == true) && (militiacmdr_captured == true)) then 
["End1",true,5] call BIS_fnc_endMission;
still forum
#

== true that is absolute nonsense

#

comparing a boolean to true does literally nothing

tough abyss
#

it giving me shit about it not being a bool

#

I had it set to 0 at start, then go to 1

still forum
#

true==true -> true
false==true -> false

#

you cannot compare boolean to boolean

#

because that's just retarded bullshit that makes no sense, so the game doesn't even let you

tough abyss
#

so what am I missing here?

still forum
#

I just told you

tough abyss
#

not really

#

you told me I'm retarded lol

still forum
#

comparing a boolean to true does literally nothing

tough abyss
#

lemme try something

still forum
#

it returns the same as the input

tough abyss
#

oh gotcha

still forum
#

x==true is exactly the same as just x

#

x==false is the same as !x

#

Also your then is missing it's right parameter

#

read the wiki and look at how a if/then statement should look like

compact galleon
#

@still forum x == true wasn't valid last I checked

still forum
#

Yep.. That's what I just said

tough abyss
#

"error && type number expected bool"

if (leloup_captured && militiacmdr_captured) then {
["End1",true,5] call BIS_fnc_endMission};```
#

Oh, it Arma doesn't read 0 as false and 1 as true does it?

still forum
#

No.

#

0 is a number. false is a boolean

tough abyss
#

do the need quotes around them, like
militiacmdr_dead = "true";
or without quotes?

robust hollow
#

without... with quotes its a string

tough abyss
#

that's what I thought

compact galleon
#

Also, the Earth isn't flat

#

Just in case you're gonna ask that next

still forum
#

I just sent you the wiki page

#

just read it

#

text with quotes around it is a string already, how would it ALSO be a boolean? that doesn't make sense

tough abyss
#

Arma doesn't make sense

robust hollow
#

it does for the most part if u read the wiki ๐Ÿ˜ฆ

still forum
#

"I don't understand this" == "This doesn't make any sense"

tough abyss
#

Ok, got it working. Thanks for the help, even though it's like pulling teeth with some of you people

gleaming cedar
#

Anyone knows if it's possible to download animations for blender somewhere and use them in arma 3

still forum
#

yes

still forum
#

#rules no links without description

tough abyss
#

== true that is absolute nonsense You lie! Look at the channel description example

still forum
#

Error: undefined variable here

tough abyss
#

you cannot compare boolean to boolean because that's just retarded bullshit that makes no sense, erm C++ lets you do that

still forum
#

Arma

tough abyss
#

why retarded

still forum
#

And it's still bullshit and makes no sense in c++

#

the result doesn't change

tough abyss
#

it makes perfect sense and it has its uses

still forum
#

I meant comparing boolean to a constant like true and false

#

You can do that in Arma too

#

still makes no sense

tough abyss
#

yeah comparing literals makes no sense but bool to bool is ok

still forum
#

ofc comparing a variable to a variable makes sense

compact galleon
#

Could be worse

#

bool == true == true

still forum
#

I have seen people try to do that...

tough abyss
#

me too

still forum
#

Even worse.. I've seen people helping them because it caused an error for them. The solution was to use bool isEqualTo true

languid tundra
#

bool to bool is ok ... why not stick to logical operators as anyone would do?

still forum
#

Because you are an idiot maybe? Or too lazy to read the wiki or to learn how the basics of the basics work?

compact galleon
#

bool == false != true

tough abyss
#

I cant remember at this moment but I have seen some elegant uses in C++ where you compare bool to bool, if I remember I will post @languid tundra

languid tundra
#

If you find it, let me know ๐Ÿ˜„

still forum
#

if (shouldEngineBeRunning != isEngineRunning) then ...

#

There you have a elegant use that makes sense

#

if (valueThatShouldBeTrue == (true==true)) then.. //Just wanna REALLY make sure it's true

languid tundra
#

Ok, right, we don't have an XOR operator, so != comes in handy^^

compact galleon
#

someBool == someOtherBool is common, and needed. bool == true is stupid, and shows that someone either has some pretty shitty conventions, or don't understand evaluations.

#

The only time it makes sense, is in a language like C# where a var may be of type Object, thus not necessarily either true or false

#

Eg. object lol = 5; if (lol == true)

still forum
#

but at that point you aren't comparing bool to a boolean literal.
You are comparing a "thing"

languid tundra
#

Well, isn't something like bool == true used in hardware for amplifying the signal? ๐Ÿ˜„

queen cargo
#

technically, yes @languid tundra

#

practically, that makes no sense in programming

languid tundra
#

I know, was more of a fun fact

queen cargo
#

||new features are cool /spoiler TEST||

languid tundra
#

The irony that you spoiled it with a spoiler

astral dawn
#

In C if statement accepts non-bools... so there are non-intuitive things everywhere

languid tundra
#

Well, bool is not even a real type in C

astral tendon
#

How to find this object in the editor? copy and paste it does not find it

#

Land_A_Pub_01

robust hollow
#

im assuming so you can place it?
class Land_A_Pub_01 in the search bar on the right panel

astral tendon
#

Found it! thanks.

compact galleon
#

@languid tundra It is in C++, though

languid tundra
#

Yeah, that's true for C++ and 0 for C ๐Ÿ˜„

tough abyss
#

#include <stdbool.h> check mate!

languid tundra
#

That doesn't make it a real type though. Just a hacky solution.

tough abyss
#

is there a variable for ACE's Take Prisoner? Captive doesn't seem to register for me

tough abyss
#

found it, but I can't get a waitUntil to trigger on it:
(militiacmdr getVariable ["ace_captives_isHandcuffed",false])

#

Nevermind

#

hello i have a problem i wanted to make a money pickup system for my server my i have a script error like that _amount is not a defined variable

_moneyObject = "Land_Money_F" createVehicle position player;
_moneyObject setVariable ["cashAmount", life_cash];

[_moneyObject, ["pickup money", 
{
player playMove "AmovPercMstpSnonWnonDnon_AinvPercMstpSnonWnonDnon_Putdown";
_amount = (_this select 0) 
getVariable "cashAmount";
hint format ["Money Taken: %1", _amount];
life_cash = life_cash + _amount;deleteVehicle  (_this select 0);}, [], 6, false, true, "", "_target distance _this <2"]] remoteExec ["addAction"];
languid tundra
#

Your second line only sets the variable for the local machine...

tough abyss
#

@languid tundra second line ?

languid tundra
#

_moneyObject setVariable ["cashAmount", life_cash];

tough abyss
#

yea ?

#

I do not understand what does not work ...

#

_moneyObject setVariable ["cashAmount", life_cash, true];

#

That's what you need for it to be publicly available

languid tundra
#

You spoiled it ๐Ÿ˜„

tough abyss
#

Ya, my bad lol

#

lol

#

Been like 8 months since I've touched any sqf

#

@tough abyss thanks

#

@languid tundra sorry the next question I would seek

tough abyss
#

good i ask a question when i pick up the money from the players i kill it is still on it how to remove it?

languid tundra
#

The easy solution would be just to add an additional condition that checks whether _target is alive.
The more cleaner way would require some restructuring.

tough abyss
#

how could I start?

languid tundra
#

What about this part "_target distance _this <2"?

tough abyss
#

this part is used to see the target of the cash on the ground

languid tundra
#

not really...

#

it's the condition for the action to show up. Currently it shows up when the distance between _target and _this is less than 2 meters.

#

so just add an and plus your check that _target is alive.

tough abyss
#

@languid tundra

life_cash = life_cash + _amount;deleteVehicle  (_this select 0);}, [], 6, false, true, "", "_target distance  _target alive life_cash = life_cash + _amount _this <2"]] remoteExec ["addAction"];
robust hollow
#

wtf is that condition

languid tundra
#

Are you sure you know what you are doing? ๐Ÿ˜„

tough abyss
#

lul

#

i start scripting on arma ^^

languid tundra
#

Well, at least you found the right command already: alive

tough abyss
#

okey ๐Ÿ˜ƒ

languid tundra
#

_target distance _this <2

#

this is your first condition

#

your second one is the one with alive

#

you can look up the syntax in the Wiki.

tough abyss
#

alive cursorTarget; ??

languid tundra
#

I have the feeling you don't know what _target and _this are referring to

#

Checkout Parameters>Condition

tough abyss
#

okey

#

@languid tundra _this alive

#

is good ?

robust hollow
#

no

#

the wiki shows the syntax and examples

#

Syntax:
alive object

SQF:
if (alive player) exitWith {};

tough abyss
#

i'm french not english i just translate...

#

sorry

languid tundra
#

Syntax is alive <object> not <object> alive

#

and _this refers to the unit that executes the action, while _target is the one to which the action is attached to.

#

So you got it wrong twice.

tough abyss
#

hoo okey

robust hollow
#

does an alive check even matter? life servers usually have a death screen so you cant use scroll actions anyway

tough abyss
#

so _this alive life_cash is good ?

#

i dont have life serveur

#

i create my custom KOTH

#

_this is refers to the unit

#

_target is my unit

#

so _this alive _target ?

robust hollow
#

no

#

alive _this

#

_target refers to _moneyObject cause thats what the action is attached to

tough abyss
#

ho okey

#

hi see

#

why alive goes before _this?

robust hollow
#

because the syntax says so

tough abyss
#

okey

robust hollow
#

generally if a command only has one argument its on the right side. unary commands or whatever u call them.

tough abyss
#

and to take money out of the kill man i can do life_cash = life_cash - _amount ?

robust hollow
#

yes

languid tundra
#

Weird though that it's a global variable and not part of the unit's namespace...

robust hollow
#

what, set on the unit? if it dies u have to transfer it over to a new unit then... as a missionNameSpace variable it just works.

tough abyss
#

when the unit dies it must lose the money that it has on it

languid tundra
#

Agreed, it's actually a smart way to circumvent the need to handle respawns, but the disadvantage is that another client can't retrieve your value without implementing some kind of getter function.

robust hollow
#

when would someone else need to know how much cash u have?

languid tundra
#

Dunno, maybe an admin.

robust hollow
#

if it isnt meant to be public information he wont need to plan for it. anyway based off the variable being called life_cash i assume he is working off a life mission as a framework anyway so thats how its built

languid tundra
#

Damn life missions

robust hollow
#

what ever works for him ๐Ÿคท

tough abyss
#

no for my script

#

lul

#

I can have you test my server if you wan*

#

no life mission

#

my private mission KOTH

languid tundra
#

Would be probably quite a lot of work to reconstruct the server side part of a KOTH mission ๐Ÿ˜„

tough abyss
#

@languid tundra ok

#

you have arma launched ?

languid tundra
#

Nope

tough abyss
#

ok

#

if you want to test my mission say the month i show you i really work on a koth mission

languid tundra
#

I know code from life servers can get you quite some hate here, but as long as you are willing to learn coding, it shouldn't matter.

tough abyss
#

yes I took the arms shop and atm of life but it's really a mission koth

languid tundra
#

And you definitely need some basic background about scripting in general before we can really help you how to proceed.

#

but the server side is still closed source, isn't it?

tough abyss
#

is code good?

life_cash = life_cash + _amount;deleteVehicle  (_this select 0);}, [], 6, false, true, "", "_target distance alive life_cash = life_cash - _amount _this _this <2"]] remoteExec ["addAction"];
robust hollow
#

no, no it is not

tough abyss
#

hoo

#

okey

robust hollow
#

he is adding the action to all players though so doesnt technically need a target.

tough abyss
#

i just understood something explained to me @robust hollow that alive _this was to find out if my player was screwed then to take away the money i can do life_cash = life_cash - _amount

robust hollow
#

yes, thats correct but ur doing it in the condition of the action

#

the condition is the wrong place to be doing it

tough abyss
#

@tough abyss okey

languid tundra
#

And probably don't start with addAction and remoteExec right from the beginning. These are rather the trickier ones.

tough abyss
#

I start with what?

#

remoteExec is love remoteExec is life

languid tundra
#

What did @still forum call it again? Magic Wand of life servers? ๐Ÿ˜„

tough abyss
#

@languid tundra ?

languid tundra
#

Nvm, I got something mixed up.

#

Well, that version would give you access to the return value, but a cfgFunctions version would be cleaner ofc.

robust hollow
#

Well, that version would give you access to the return value what?

languid tundra
#

I meant the issue with [A,B] remoteExec ["addAction",<target>]; is that you can't get the return value, while with @tough abyss solution you could.

#

That last sentence sounds like chemistry class. I'm way to wasted for this.

robust hollow
#

im still not following. remoteExec only ever returns a string or nil?

languid tundra
#

return value of addAction is what I mean, not remoteExec.

robust hollow
#

ahh

tough abyss
#

Lol good thread

tough abyss
#

thanks you @robust hollow @languid tundra @tough abyss i have solved my problem you are very good ๐Ÿ˜‰

robust hollow
#

@tough abyss you got it figured out by now?

robust hollow
#

which part, the scroll bars as a whole or using a control group with ctrlCreate?

tough abyss
#

Make controls group, make structured text passing group as param, why the problem?

robust hollow
#

yea thats how it works.

#

using rsccontrols as the example you would do this:

private _ctrlGroup = (findDisplay 46) ctrlCreate ["RscControlsGroup",-1];
private _ctrlText = (findDisplay 46) ctrlCreate ["RscStructuredText",-1,_ctrlGroup];```
still forum
#

@languid tundra I probably called it retard club of bullshit garbage nonsense life server scripts written by idiots who don't understand a thing about scripting.

tough abyss
#

Life is pain

tough abyss
#

No ctrlCommit?

#

controls inside ctrlgroup have relative coords

robust hollow
#

controls inside a ctrl group use coordinates inside the ctrl group. so x=0 and y=0 will line up with the top left corner of the ctrl group. if that makes sense

tough abyss
#

also those floats you add subtract will bite you in the butt later when you have displays with different UI size

robust hollow
#

it should be fine no matter the size unless ur doing some weird af positioning

tough abyss
#

well if you aim for inside viewport controls then it is ok it is just if someone has UI set to small it will be tiny in comparison with someone with large UI size where it will be huge

robust hollow
#
QS_ctrl_13 ctrlSetPosition [
    0,0,
    ((ctrlPosition QS_ctrl_1) select 2) * 0.305,
    ((ctrlPosition QS_ctrl_1) select 3) * 0.7
];

should do it

#

make the height of the text control more than the height of the control group

#

i recommend just using ctrlTextHeight QS_ctrl_13 once you have set the text to it

#

๐Ÿ‘

tough abyss
#
disableSerialization;
_disp = findDisplay 46 createDisplay "RscDisplayEmpty";
_ctrlGroup = _disp ctrlCreate ['RscControlsGroup', -1];
_ctrlGroup ctrlSetPosition [0.5, 0.5, 0.5, 0.1];
_ctrlGroup ctrlCommit 0;
_ctrlText = _disp ctrlCreate ['RscStructuredText', -1, _ctrlGroup];
_ctrlText ctrlSetStructuredText parseText format ["1<br/>2<br/>3<br/>4<br/>5<br/>6<br/>"];
_ctrlText ctrlSetPosition [0, 0, ctrlPosition _ctrlGroup select 2, ctrlTextHeight _ctrlText];
_ctrlText ctrlCommit 0;
robust hollow
#

might want to reduce the width on the text ctrl by the width of the scroll bar so it doesnt cover the last letter. other than that, looking good imo ๐Ÿ‘Œ๐Ÿป

#

the x and y might visually shift on different ui scales. personally i use pixelgrid coords.

#

you could just do the safezone scaling like you have for the base ctrl. so whatever the result of 0.01 / safezonew is, for x you would do ((ctrlPosition QS_ctrl_1) select 0) + (n * safezoneW) and then it should move properly with different sizes ๐Ÿค”

tough abyss
#

Have you tried changing UI size? Try and see if it misaligns

#

it takes 3 seconds to go into options and change then change back

#

take a picture

#

what everything or just newly added ctrlgroup?

#

yeah so you need to start from scratch and rethink the whole approach

robust hollow
#

i say think pixelgrid, never had a problem with it (excluding 4:3 being a bitch to me a few days back)

tough abyss
#

?

astral tendon
#
_WoundedPlaces = (synchronizedObjects Bodybags); 
//  _WoundedPlaces returns 
[Bodybag_1,Bodybag_10,Bodybag_11,Bodybag_12,Bodybag_13,Bodybag_14,Bodybag_15,Bodybag_16,Bodybag_17,Bodybag_18,Bodybag_19,Bodybag_2,Bodybag_20,Bodybag_3,Bodybag_4,Bodybag_5,Bodybag_6,Bodybag_7,Bodybag_8,Bodybag_9]
 _WoundedPlaces sort true;
_WoundedPlaces;
//_WoundedPlaces returns
[Bodybag_19,Bodybag_10,Bodybag_11,Bodybag_12,Bodybag_13,Bodybag_14,Bodybag_15,Bodybag_16,Bodybag_17,Bodybag_18,Bodybag_1,Bodybag_2,Bodybag_20,Bodybag_3,Bodybag_4,Bodybag_5,Bodybag_6,Bodybag_7,Bodybag_8,Bodybag_9]

I forgot something? the array still not sorted

still forum
#

how do you expect it to sort objects?

#

how do you determine if one object is smaller than another?

astral tendon
#

by the number

still forum
astral tendon
#

So what does support?

still forum
#

Read the wiki

astral tendon
#

๐Ÿ™„

spark turret
#

go with boundingboxreal if you want to sort by siz

tough abyss
#

They are identical objects will be the same size

rigid plover
#

Is it possible to force view the lowest LOD

#

even from close up?

tough abyss
#

Probably not. What are you trying to do?

knotty sun
#

How can I in a script create an array of object variable names? I think it might be a bad practise in itself but manually writing the array with names all the way to _num1000 seems a bit of work

#

Or... What's the most efficient to check an object's variable name in a mission, e.g. Catch all objects named "specialname_x" in an array

winter rose
#

@knotty sun why would you need so many variables to begin with?

languid tundra
#

How about vehicleVarName?

knotty sun
#

Can you elaborate?

languid tundra
#

If you assign a global variable to an object in Eden, you can return it with that command.

knotty sun
#

And @winter rose it's a bit of an exaggeration, but might need at some point array with quite a number of mission objects

#

I'll research that one, thanks!

languid tundra
#

Catch all objects named "specialname_x" in an array
for that one you will gonna end up with call compile I fear

knotty sun
#

Hm. Could've sworn I saw something before that allowed partial match of the varname

#

That was years ago though

winter rose
#

@knotty sun use an array?

still forum
#

just getVariable for all possibilities? ๐Ÿ˜„

knotty sun
#

I want to use an array Lou but I need to fill it, rather not manually

#

MATLAB made me a bit lazy in that regard

languid tundra
#

How are the variables set in the first place?

knotty sun
#

Object varnames

#

In Eden

languid tundra
#

Well, then allmissionobjects + vehicleVarName and check if string is in string.

agile anchor
#

hi guys I'm trying to get a unit to fire at more than 1 target on a range and have the following that works but only fires at 1 target (t1 = target, s1 = unit & gl = game logic) null = s1 spawn {_this dotarget t1; sleep 0.5; while {alive t1 and alive _this} do {sleep 4; gl action ["useweapon",vehicle _this,_this,0]; }};

#

any ideas please

#

i've tried t1, t2 etc and ["t1", "t2"] but no joy

knotty sun
#

What 'in' command would I be looking at? The wiki for in doesn't say anything about strings or partial match

#

Only full match

languid tundra
#

find?

knotty sun
#

Ehhh... That finds something in an array does it not?

#

Which needs to be 100% match for what I can see

languid tundra
#

There is an alt syntax for strings

knotty sun
#

Ah never mind found that! Let's see if that works

languid tundra
#

||it does||

knotty sun
#

Which IDEs support SQF by the way? Been using notepad++ so far. Would like to use something that gives some more info on the code :P

still forum
#

vs code is the best so far imo

knotty sun
#

Ermagerd spoiler alert

#

I'll try that then

#

Any specific plugins?

#

Saw a few for sqf

astral dawn
#

I use Raven't SQDev plugin for Eclipse

languid tundra
#

Where is love for vim? ๐Ÿ˜„

astral dawn
#

... or nano

knotty sun
#

Atom!

#

If it doesn't crash I mean

tiny wadi
#

if the object variables are sequential then you could use a for loop

knotty sun
#

Well they're supposed to but the find way is the safer option. Never know if a mission maker fucks up

ember verge
#

allright i want to change my escape menu like when i press escape i want an other dialog to pop up and when i press settings i want to view the settings
any ideas how ?
something like this https://www.youtube.com/watch?v=Du76sXPA764

still forum
#

the sqf thing by skacekamen

ember verge
#

ive been breaking my head about it ๐Ÿ˜ฆ

tough abyss
#

@ember verge you asked that before and I told you already

ember verge
#

yes modifying the keypress

#

but how can i get to the settings

tough abyss
#

overriding

ember verge
#

pressing a button

tough abyss
#

Game settings?

ember verge
#

yes

#

like in the video there are buttons where you are able to get in to the settings and stuff

tough abyss
#

You need to hack game menu, what you asked is not what you actually want

ember verge
#

nah not that i have a life server

#

and when the players press escape they will be able to choose a button

#

like a settings button

#

and when they press on it they would get directed to the settings

tough abyss
#

Not a simple task though

ember verge
#

yep ๐Ÿ˜ฆ

#

i didnt even get it to make it so far to open that menu when you press escape instead of the normal one ๐Ÿ˜›

astral dawn
#

What's the current state of the BIS tasks framework? I know that sometimes it gets desynchronized for JIP players. I guess it was never fixed.? Should I implement my own tasks framework?

tough abyss
#

does anyone know why a drone that is spawned via a script has no gps access? or is it normal for drones to not have a map?

ember verge
#

nvm figured it out

tiny wadi
#

Nighstalker, If its a one time thing you could loop through all mission objects at the start of the mission and check if their vehicleVarName contains a substring you define

ember verge
#

any idea of adding pictures to rscbutton ?

#

how can i add a animation to a dialog like using ctrlCommit ?

robust hollow
#

any idea of adding pictures to rscbutton
you can use RscActivePicture and RscActivePictureKeepAspect

how can i add a animation to a dialog like using ctrlCommit
Apply the changes you want to do (position, fade, angle, whatever) and then ctrlCommit with a transition time greater than 0.

ember verge
#

thanks do u know if i can test my dialog in the editor too like testing a ctrlMenu ?

robust hollow
#

yes you can

ember verge
#

well, how ? ๐Ÿ˜›

robust hollow
#

set up a test mission with your dialog and any resources it uses. then load into the test mission and open the dialog...

ember verge
#

okay last question should i have it in a .hpp or a .sqf ?

robust hollow
#

depends... if it is a dialog created with ctrlCreate then sqf, if it is creates as a config then .hpp

ember verge
#

thanks

ember verge
#

it says Resource player_inventory not found when i try to launch my dialog in typing []execVM "script.sqf" the script.sqf contains disableSerialization and createDialog "player_inventory";

#

Dialogs.hpp goes with this class player_inventory
{
idd = 1;
movingenable = false;

class controls
{
    class escapeback: IGUIBack
#

.......

robust hollow
#

did you include Dialogs.hpp in the description.ext

ember verge
#

yes

robust hollow
#

is the dialog written properly? the only reason that error would show up is if the dialog class isnt in the config

maiden warren
#

how would one press a button and add text to rscedit? ctrlsettext only adds wanted text once and can't be repeated

#

how would I repeat it

robust hollow
#

_ctrlText ctrlSetText (ctrlText _ctrlText + _newText);?

#

@maiden warren โ˜

maiden warren
#

That just sets the text once

#

I need to be able to keep adding new text without deleting the previous one

#

basically dial a number

winter rose
#

Read more carefully, the last part

#
ctrlSetText (ctrlText _ctrl + _newText)```
maiden warren
#

I'm not following

robust hollow
#

it appends new text to the current text on the control

ionic orchid
#

he's probably meaning setting up the whole keypress event part

maiden warren
#

I'm kinda confused with this part, basically what I want to do is when you click a button #1 it will add #1 to a RscEdit, ctrlSetText adds #1 but only once, not repeatable, I need to be able to keep pressing the button and keep adding the numbers

robust hollow
#

yea, use what i posted.
first press will essentially do "" + "#1"
Second press will do "#1" + "#1" and so on

#

it will add more text to the rscedit instead of overwriting the text already there

copper raven
#

The code Connor gave is exactly what you want.

robust hollow
#

ctrlText _ctrlText gets the current text from the control, and + will append ur new text to the end of it.

maiden warren
#

I'm not sure how to define the variables?

robust hollow
#
private _display = findDisplay <idd here>;
private _ctrlText = _display displayCtrl <idc here>;```?
maiden warren
#

yep working thank you ๐Ÿ˜ƒ

astral dawn
#

This might be a weird assumption
If I add an array to the JIP queue, is it still being referenced from the queue, or does arma perform a deep copy?

robust hollow
#

a client cant refer to an array in the servers memory, so it is a deep copy in the sense that it is a new array in the clients memory

astral dawn
#

I mean in server's memory

#

So I add an array to JIP queue at the server. Modify the array. Someone joins. Which value will the client get? New one or the original one?

robust hollow
#

original

#

you would need to rebroadcast it to update in the jip queue

astral dawn
#

Got confused a bit... Do I get it right that the JIP queue exists only on the server (makes no sense another way) ?

#

You meant 'If you called remoteExec at client, you would need to rebroadcast it to update the server's JIP queue', right?

maiden warren
#

Is it possible to show entered text as hidden? For example in the rscedit I enter 1234 but it shows it as ****?

robust hollow
#
// on server
myArray = [1,2,3];
publicVariable "myArray";
myArray = [1,2,3,4];

// server: myArray returns [1,2,3,4]
// jip client: myArray returns [1,2,3]

does that make a little more sense?

astral dawn
#

Yeah makes perfect sense, thanks

robust hollow
#

@maiden warren it is possible but there isnt a setting for it no

maiden warren
#

It just has to be so complicated right ...

robust hollow
#

its not terribly hard to do

maiden warren
#

they couldn't just do it so we can do like "textHidden = true/false" ๐Ÿ˜„

#

Would you be able to give me a hand please?

robust hollow
#

@maiden warren here is an example. im sure it can be done better but this is the best i can come up with right now just to visualize the concept. run the code in editor to see it working https://pastebin.com/hYC67G49

fringe yoke
#

Is there anyway to draw 3d areas? or walls or anything similar. Something maybe like the editing restriction for Zeus maybe

queen cargo
#

I think that is also a Model @fringe yoke

#

Try using simple objects

#

Wich reminds me..

#

I wanted to check out what one can di with simple objects ๐Ÿ˜‚

drifting copper
#

So I have

Condition
Player in thislist
Activation
[objNull, player] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;

Running in a trigger area over a hospital. My question is if I can run the same thing or something similar on a specific vehicle? SO basically a CBPS or something like? Idea is that the truck/ambulance can be driven to a point and be set-up with the same or similar function running. Note this is for a mp dedicated server.

peak plover
#

@drifting copper

#

There is an event for getting in vehicles

#

You can check the type of the vehicle and then heal

drifting copper
#

I have tried this ^ Did not seem to work with ACE3

radiant needle
#

Is there a way to take weaponDirection and turn it into vectorDirAndUp

drifting copper
#

@peak plover just placed down a trigger and used attach too with acemed fnc activitation. Seems to work fine

tough abyss
#

I have a script that's called in InitPlayerLocal.sqf,
[] execVM "assignLoadouts.sqf";
and then in assignLoadouts I have

//give NVGs just in case you don't spawn with them
if (paramsarray select 5 == 0) then  {
    _unit addItem "NVGoggles";
    _unit assignItem "NVGoggles";};```
But I'm getting _unit not found. I'm guessing I need a different method to get the unit running the script?
robust hollow
#

_this is an empty array...

#

--> [] execVM

tough abyss
#

oh, this is an old mission I was working on and I'm trying to get it running

#

so it should be [_this] execVM

#

?

robust hollow
#

_this execVM

radiant needle
#

Can setWeaponReloadingTime not be over 1?

tough abyss
#

really? huh

robust hollow
#

[player,didJIP] execvm "initPlayerLocal.sqf";

tough abyss
#

Interesting, thanks

robust hollow
#

so no, no it cant be more than 1

#

actually not sure tbh, the way i read that is it cant.

radiant needle
#

Says it accepts number though, I would have thought that would allow over 1

robust hollow
#

well, it has to accept a number because 0-1 is numbers

#

i would assume between 0 and 1 is the range though

radiant needle
#

Well I guess that makes sense, as setting it to 0 works, but setting it to 10 doesn't

#

Weird that it would have that limitation

tough abyss
#

what's the easiest way to see if a side is dead for a Team Last Man Standing?

robust hollow
#
(playableUnits select {side _x isequalto <side here>}) isequalto []

๐Ÿคท

#

depends what happens to dead units after they die but playableUnits doesnt include dead units so if there are any of a side in the array theyre alive

tough abyss
#

They should be in spectator when they die

#

Is there a "OPFOR/BLUFOR wins!" end mission event too? I was just going to use the standard endings you'd put in description.ext and change it depending on who's still alive at the end

#

I usually do co-op missions, so this is pretty different for me

robust hollow
#

there are generic winner/loser debriefing classes not but side based i dont think

drifting copper
#

New question. Most of the things I have found on forums either does not work or as usual I have no clue what I am doing.

I want to make a vehicle a mobile spawn point using the respawn_west method. (do not like the respawn modules) Is it possible to attach the respawn_west to a vehicle to follow it or can I set the vehicle as a respawn point? And if so how would I implement it?

tough abyss
#

I would just update the spawn point to move with the vehicle maybe?

robust hollow
#

you would need to repeatedly set a new marker position @drifting copper

tough abyss
#

Do something like "every x seconds, getpos of the vehicle, setpos of the respawn"

drifting copper
#

Ref to my last question And if so how would I implement it? I am new to scripting and still very dumb with it

tough abyss
#

Oy vey

#

look up getpos and setpos, it's pretty simple

robust hollow
#
// run on server only
while {game active or whatever condition you want} do {
    "respawn_west" setMarkerPos getPos myVehicle;
    uisleep 1;
};
``` something to that effect
tough abyss
#

would this work for "all of BLUFOR is dead"?

["End1",true,2] call BIS_fnc_endMission};```
robust hollow
#

no because units doesnt take a side

#
waitUntil {({side _x isequalto west && alive _x} count allPlayers) < 1;};```
would do, though its just a different way of the same as what i pasted above with playableUnits
tough abyss
#

ahh gotcha

radiant needle
#

So I have a variable created inside the "Then" code of an "If" statement, how do I access it outside of that scope?

robust hollow
#

set the variable (or atleast initialize it with private) before the if statement

radiant needle
#

So even if it's just something like Private _Obj = [];

drifting copper
#

@robust hollow does this go in the vehicle ini or init.sqf file?

    "respawn_west" setMarkerPos getPos myVehicle;
    uisleep 1;
};```
robust hollow
#

yea @radiant needle

#

i cant say exactly cause i dont know ur mission setup, but after ur spawn vehicle is created you can spawn that code to run on the server only.

drifting copper
#

cool, will get some more googling done on implementing it. TYVM

tough abyss
#

wait, are players "units"?

robust hollow
#

yea

tough abyss
#

ok good, because I'm testing this thing out with AI, so I swapped the waituntil to allUnits

robust hollow
#

allUnits includes AI

tough abyss
#

cool

#

Is there a way to allow a loadout selection before the player actually spawns? I'm using default loadouts. I can randomize them just fine, just not sure how to let players choose them

robust hollow
#

you cant delay spawning but you can put the respawn marker out of the way somewhere and once the player chooses their loadout move them to the proper spawn area.

tough abyss
#

Ohhh that's a good idea.

#

I'm not too familiar with multiplayer. Right now I have units for the players slots. I'm assuming if I get rid of those units, the players won't spawn in until they choose a loadout and choose they're Respawn marker, right?

#

^their, it's 2am here lol

robust hollow
#

not entirely sure what u mean tbh

tough abyss
#

I know when you join some multiplayer games, you have to select your respawn point and loadout

robust hollow
#

yea, if ur talking about what i think ur talking about thats the BIS respawn system

tough abyss
#

In my unit's co-op games, we have our unit slots predefined, so we have to have AI there to spawn

#

we have to have AI there for us to spawn in as

robust hollow
#

you can disable AI so the unit slots are still there for players to use but wont have an AI unit spawned ingame

#

is that what ur getting at?

tough abyss
#

So for this multiplayer deathmatch thing, I don't need ANY AI on the map, just the respawn points

#

Negative

west venture
#

You need the base units for players to slot in as

tough abyss
#

Ok, Teizan understands me

#

How would you force a loadout selection? Just insta-kill them and let them respawn?

robust hollow
#

up to you really. dont need to kill them, just open the loadout ui when they load in

tough abyss
#

Oh, that's the answer I was looking for lol, how do you even do that?

robust hollow
#

uhh...... you open the loadout somewhere in the player init, probably near the end of it.

tough abyss
#

I'm looking for the command for opening the ui

robust hollow
#

createDialog

tough abyss
#

oh thanks

#

Wait so I have a bunch of loadouts set already in my random loadout script, it looks like I need to add these to my description.ext too, or can I reference them somehow? Also not sure how to find what the createDialog string needs to be for the loadout menu

    case 0: {bluforloadout = ["B_G_Soldier_F","B_G_Soldier_TL_F","B_G_Soldier_AR_F","B_G_Soldier_M_F","B_G_Sharpshooter_F","B_HeavyGunner_F"]        };
    case 1: {bluforloadout = ["B_Soldier_F","B_soldier_AR_F","B_soldier_M_F","B_Soldier_TL_F","B_sniper_F","B_support_MG_F"]                        };```
robust hollow
#

...or can I reference them somehow
Depends on how ur system works but in theory you can put them whereever you want. there is no reason a switch like you have there wouldnt work

how to find what the createDialog string needs to be
its the name of the dialog class in your description.ext

little ether
#

Quick question all...

I want to have a civilian injured (using ACE Advanced Medical) when he is spawned in. I have the spawning handled (AIS Caching) but what I've found that should work doesn't.

[this] call ace_medical_fnc_handleDamage_advancedSetDamage```

That's in the INIT for the civilian I want injured, any pointers?
tough abyss
#

Connor, is there not a default loadout selection dialog built in I mean? I guess since I already have the loadouts laid out in that switch, I could just make a simple menu with the 5 different classes laid out on it

#

^ I'm gonna try that tomorrow, gotta get to bed. Thanks for the help

robust hollow
#

@little ether i think you might be missing a parameter in the first function call

#

ace_medical_fnc_handleDamage_advanced:

 * 0: Unit That Was Hit <OBJECT>
 * 1: Name Of Hit Selection <STRING>
 * 2: Amount Of Damage <NUMBER>
 * 3: Shooter <OBJECT>
 * 4: Projectile <STRING>
 * 5: Hit part index of the hit point <NUMBER>
 * 6: Shooter? <OBJECT>
 * 7: Current damage to be returned <NUMBER>

you go from 5 to 7, skipping the shooter object

little ether
#

ah okay so I need to define the weapon they're being hit by?

#

or the round I would suppose?

robust hollow
#

no, just another objNull should do cause the parameter isnt actually used in the script by the looks of it

#

[this, "body", 0, objNull, "Bullet", 0, objNull, Random 0.6]

little ether
#

Even easier! I'll report back in a second

#

No warning anymore however the AI is not being damaged, I'll have another look at my addon options maybe

pale sundial
#

Hello all. Does anyone know a way to unattach a waypoint from a vehicle via a script? I'm scripting some AI to get into a helicopter, then jump out and get into a boat, but it seems that even if I try to attach the subsequent waypoint to the boat it stays attached to the helicopter and that makes the AI get back into the helo again.

#

I've tried asimple "_wp waypointAttachVehicle ;" to reset it, but that obviously doesn't work. I'm not really sure why I thought it would, really...

young current
pale sundial
#

Well this is the odd thing. They get into the helo fine, and if I don't tell them to get into the helo they get into the boat fine as the scripts stand. It's only if I try to combine the two in sequence that things much up.

pale sundial
#

Now that code is something I've not seen before. I'll give that a shot.

young current
#

How i've understood it is that when you order them into a vehcile, that vehicle becomes "their target vehicle"

#

and it does not get overwritten and has to be unassigned

#

you can check what vehicle they are assigned to with this

pale sundial
#

That sounds right, yeah. I also think that perhaps the waypoint doesn't complete. I have another scripted waypoint for the helo to sling the boat and then drop it off at another location and I did notice that the AI likes to give constant orders to move to the boat it's already slung until I add in the next waypoint.

#

Regardless, I'll give leaveVehicle a quick try.

#

For the record, how do I use assignedVehicle again? hint assignedVehicle <group>?

blissful sand
#

tell me this thing is working

young current
#

@blissful sand and is that somehow arma related link?

blissful sand
#

well it works and yes the link is related to arma I want to make a zoo for arma and was wondering how to skin the models with a script

young current
#

skin the models?

pale sundial
#

Isn't that essentially just "setTexture"?