_bed = _this select 0;
_bedPos = getPos _bed;
_playerPos = getPos player;
_playerLoadOut = getUnitLoadout player;
player setPos _bedPos;
player setDir(getDir _bed + 180);
[player, "PRONE_INJURED", "NONE"] call BIS_fnc_ambientAnim;
sleep 1;
player setPos _playerPos;
[player, "STAND1", "NONE"] call BIS_fnc_ambientAnim__terminate;
#arma3_scripting
1 messages Β· Page 575 of 1
In this, script, how can i remove all the items placed in the _playerloadout and then add them back after the animation?
Can I close the game via command?
@rustic plover closest you have is https://community.bistudio.com/wiki/BIS_fnc_shutdown
@haughty fable getUnitLoadout/setUnitLoadout
OR use switchMove as previously mentioned.
or playAction "Unconscious"
or so many other ways
anyway, I'm off π
Great, again thank you π good night
is there a way to remove the inventory icon from all objects? i know of how to prevent accessing inventories but i want to get rid of the provided inventory action all together so only our custom one shows up.
@rustic plover closest you have is https://community.bistudio.com/wiki/BIS_fnc_shutdown
@winter rose, hmmm, it's not working while mission is running
@exotic tinsel nope, unless you use simple object or mod something
@rustic plover then you cannot
anyway to make the action call my custom inventory script?
InventoryOpened Event handler can open yours and overwrite vanilla
Hi everyone, is there anyway to know if curator has placed any unit or structure yet ?
hello i need to activate a trigger one at a time is there a code or a way to make other triggers wait while the other one is playing
It is possible. MP execution just is a bit different.
@winter rose init.sqf
if (player == unit1) then {
init.sqf might run BEFORE player is initialized, meaning player can still be objNull. Thats why you so often see waitUntil {player == player} in init.sqf sleep 1 might work in most cases but is not eliable.
@rustic plover no you can't close the game, didn't you ask that already? if not someone else asked the same recently
true that, especially in JIP
Why would there even be need to close the game from mission?
To troll other players!
if you wanna close the game just use airportSidecommand π
Stahp π
π
i need a script that will add a marker after specified amount of time
spawn, sleep, createMarker
there have fun
He said specified amount of time waitUntil would be unspecified, unless you do a stupid waitUntil on time.
hehe thanks
waitUntil {this_is_over};
wake you up when it's all ooover π΅
how can i do this? when i get killed, teamswitch to next soldier in squad
selectPlayer?
we shall never know if this worked Β―_(γ)_/Β―
xD
@sacred slate you need to set other units as playable in editor, then use teamSwitch command
But if you want option in the death menu I think it matters which respawn type you set
Is there an engine variable that gets set to true when BIS_fnc_endMission is run? I'm looking to perfect some variables for a debriefing screen after the mission ends.
@worn forge exit.sqf is called at the mission's end, but check in the Function Viewer, I believe such global BIS var exists
That'll work! Thanks Lou.
I'm liking exit.sqf as the mission I'm adapting has a few different methods where endMission is called, so I don't have to bother tracking each one.
Yup, same behaviour
am I correct in understanding the wiki that addPublicVariableEventHandler only works in multiplayer? So do I need a workaround for singleplayer environment?
i.e MP mission in SP
I most likely believe you would need to tell us why/how you are using this EH and why it would not be working in SP (meaning that a player-hosted game would not either)
I want it on server to execute code when the clients publicVariableServer some stuff
but here, client and server are the same, so you don't need to "tell" the server
Yeah, but my question is, if that command doesn't work in SP, does that mean the EH will never fire?
i.e. the code will never be executed
I think it means that yes
should I just remoteExec a function then?
oh yes, much better than using the old PV system
ah ok
is there anything specific I need to do in CfgRemoteExec to allow clients to do this?
by default, all clients can. for security reason though, you could restrict that
@cosmic lichen https://youtu.be/QE4BpcKWFkM?t=185 This is what i made π ...couldn't get the listbox to work.
Looks good !
i want to get AI unit in player group to follow sqf commands (doMove), but they won't do it. seems to work okay if they are not in player group, is there some trick?
alternatively is there a perfect "recipe" for "unit go here no ifs-or-buts"?
i've seen people say disable various bits of AI or set different skills or bravery, is there a actual minimal and complete known requirement though?
Is it possible to respawn doing an animation?
what do you mean? if animation == "theAnim" then player setDamage 1?
No
When i select a respawn position, i want the player to respawn doing an animation
Is that possible?
yes
Can you tell me how, please π
use an Event Handler, "respawn" or "MPrespawn"
is it possible to change the variable name of a unit inside 3den? or better yet, create a new unit with where you define the variable name?
Or onPlayerRespawn.sqf
double click the unit, there is a variable textbox at the top?
Variable names are not available in 3DEN
my bad.. I mean in a script, woops
MyNewVariable = MyUnit
Done, you have a new variable with the unit inside
damn terminology.
when you drag a unit into 3den, you can double click it and add a variable name. the tooltip calls it a "unique system name". I want to create characters in 3den(using create3denentity) but give the unit one of those variable names.
set3DENAttribute
Is the -init param still broken?
https://community.bistudio.com/wiki/Eden_Editor:_Setting_Attributes#Object Variable Name (name) is what you are looking for @steady terrace
ooh! thanks @cosmic lichen
@worthy willow How do you know it's broken?
It doesn't fire at all
why is that list of 3den attributes not linked on the set3DENAttribute page :U
interestingly, it is linked on the set3DENAttributes page https://community.bistudio.com/wiki/set3DENAttributes
Good catch @still forum It's linked now.
Thanks β€οΈ
These lists are not even up do date =/
have fun updating them. If you have questions about stuff I'm here (from time-to-time, for example not now)
Gonna look into it tomorrow.
Does anyone already have a finished Ace Interaction for loading (Attachto) and unloading (detach) a box on a vehicle?
you mean ACE Cargo?
No, the box should remain visible, so without Ace Cargo
https://community.bistudio.com/wiki/setVehicleCargo
not a finished ace interaction, but already 90% of the way there
I don't want to interact with the Vehicle Cargo what i mean is this
http://prntscr.com/rheuj2
Yes, but it doesn't work for my project.
Because the truck does not support vehicle in vehicle.
Hence my idea to load and unload the crate using the ACE Interaction Menu on the truck via https://community.bistudio.com/wiki/attachTo
use an Event Handler, "respawn" or "MPrespawn"
@winter rose Where should i put that?
ideally in a script file
I tried it but it doesnt seem to work
is any body here know what is the code when player is taking fire playsound"takingfire";
@cyan dome it is an in-game sentence, not just a single file
sorry i am new with the scripting
totally had no idea how it works
i already have the cfg sounds ready and also the files needed.
what i need is how the trigger will activate once
player is fired upon.
define your sound in CfgSounds, play it with either aUnit say "definedSound" or playSound "definedSound"
see https://community.bistudio.com/wiki/Description.ext#CfgSounds
what i need is how the trigger will activate once player is fired upon
there is no easy trigger for this, and an Editor Trigger clearly won't do
player addEventHandler ["Respawn",
{
if (typeOf _this == "B_Helipilot_F") then
{
_this setpos (getmarkerpos "PilotRespawn");
}
else
{
hint "5";
}
]; ```
Should that work?
can some one tell me how to add the player as object and 1000 as amount: [<object>, <amount to add or remove>] call HALs_money_fnc_addFunds;
hey so uh
is there a way to get the names of the skins of vehicles
for example
this setObjectTextureGlobal [0, "A3\Air_F\Heli_Light_01\Data\Skins\heli_light_01_ext_speedy_co.paa"];
Would anyone know how to script the vision mode of my gunner optic to be Black & White instead of βNormalβ (colour)?
makes a helicoptor with a specific skin
but i cant seem to find anything about the path of skins for jets or tanks and stuff
i want to be able to respawn with a specific livery
Afaik, it's just extract everything and search by hand/with regex @faint fossil
this isn't the channel for that. See #creators_recruiting
(1) Never ping everyone in a discord with thousands of people (thankfully it is turned off here); (2) Completely wrong channel... read the descriptions and go to #creators_recruiting ; (3) if you are "dev-ing" a server and need someone to code it for you then you are not "dev-ing" a server for someone...
Hello everyone. Does anyone here may know if the BIS_fnc_taskPatrol will create an infinite patrol or the patrol will eventually come to a halt after some waypoints have been ended? Thanks in advance everyone!
@round nymph Do you mean thermal?
No, I already know how to set Vision mode to Ti, I just want the Normal vision to be B&W like a B&W tv
https://community.bistudio.com/wiki/setPiPEffect might be what you are looking for
@worthy willow thank you, now all I need to figure out is where do I place the: setPiPEffect [3,1,1,0.4,0,[0,0,0,0],[1,1,1,0],[1,1,1,1]];
@rugged acorn
//Cycle back to the first position.
private ["_wp"];
_wp = _grp addWaypoint [_pos, 0];
_wp setWaypointType "CYCLE";
_wp setWaypointCompletionRadius 20;
This is the last line of code in the BIS_fnc_taskPatrol, that means the last waypoint is set on Cycle
from the wiki
"A cycle type waypoint can be used to make the group move in an infinite loop"
reference
https://community.bistudio.com/wiki/Waypoint_types
patrol == loop, move would be a oneway path and end.
while on a similiar topic, anyone know where the addactions are defined for UAV op loiter?
@faint fossil see getObjectTexture
@faint fossil
is there a way to get the names of the skins of vehicles
I assume by "names" you mean paths, here is a way to get the current textures of a vehicle. So if you already have one that looks like what you want, use this to get the texture paths.
https://community.bistudio.com/wiki/getObjectTextures
AW cmon Lou
lemme sleep
Hi, does anyone know how to make an ai face a specific direction?
My current code is hunter1 setVectorDir [0,0,200];
This sets bearing in relation to last direction
Is there a way I can set the specific rotation?
setDir
So I got 2 things I cant figure out.
-
making a darter invisible
I used
this setObjectTexture [0, "#(rgb,0,0,0)color(0,0,0,0)"];
and it hides everything apart from the rings that protect the motors.
Same for teh ED1 it doesnt hide the tracks.
Hide object disables it so it doesnt work for me. -
can I use the attach to command to attach something to the ED1D pelters gun arm instead of the drone itself?
this hideObjectGlobal true- it's not perfect, but you can modify the exact placement of the attachment in two ways: either a manual XYZ offset:
thing attachTo [ED1D, [-0.8, 1.2346, 0.34732]]or with a defined memory pointthing attachTo [ED1D, [0,0,0], "peltersGunArmNamedMemoryPointThingy"]
- unfortunately doesnt work.
Could you explain two ? is there a namebd object for pelters gunarm?
@spark kiln try with other indexes
this setObjectTexture [0, "#(rgb,0,0,0)color(0,0,0,0)"];
this setObjectTexture [1, "#(rgb,0,0,0)color(0,0,0,0)"];
this setObjectTexture [2, "#(rgb,0,0,0)color(0,0,0,0)"];
// or
{ this setObjectTexture [_x, "#(rgb,0,0,0)color(0,0,0,0)"]; } forEach [0,1,2];
```if it fails, you can't without a mod
For setting the darter invisible, where are you running the code? If you're running it from the init box, it's far easier to just change the attributes in Eden and uncheck the box that says "Show Object" in the "Special states" section.
ooooooooh.
Only thing I can think of would be to create the vehicle locally on the server, and playSound3d of the rotors, attach to the local darter's location...?
Hello. Just wondering if anybody knows a script that recognizes the outfit a player is currently wearing and automatically switches it's texture. Like: if player has "U_B_CombatUniform_mcam" then player settextureglobal player setObjectTextureGlobal [0, "\a3\characters_f\BLUFOR\Data\clothing_wdl_co.paa"];" but on a constant loop.
why in a loop?
So when he takes it off it automatically turns into the camo when he puts it back on
would make more sense to put it on event handlers like InventoryClosed
Will that work if there are several equipments involved?
because checking every frame or second (or any time) will just kill the client/server
haha yeah I don't wanna do that
Yeah it's just there are so many different cool camouflages but I don't know how to permanently set something to that camo without causing a big frame drop. You said something about inventory close?
I checked what Lou posted: player addEventHandler ["Take", { (getObjectTextures player + [uniformContainer player getVariable "texture"]) params ["_texUniform", "_texInsignia", "_texCustom"]; if (isNil "_texCustom") exitWith {}; if (_texUniform == _texCustom) exitWith {}; player setObjectTextureGlobal [0, _texCustom]; false }]; I'll try it out.
there are different event handlers which COULD work...
Take will work best for inventory items, since it triggers the moment someone picks it up.
Put works when someone drops an item.
InventoryClosed (or Openened) is best for triggering when using "I" or a crate/vehicle
Thanks @exotic flax I'll check em out. Is there any function that immediately executes a script once it notices a specific vehicle? Thinking of doing the same camo idea but for vehicles instead. Automatically turn them into a texture when they are spawned in.
I wanted to say Init, although vanilla EH only works through configs (since you can't add a script to an object which doesn't exist).
If you include CBA XEH, you could use an init event handlers on vehicles.
Alright. Thanks a lot for the information Grezvany.
@spark kiln try with other indexes
this setObjectTexture [0, "#(rgb,0,0,0)color(0,0,0,0)"]; this setObjectTexture [1, "#(rgb,0,0,0)color(0,0,0,0)"]; this setObjectTexture [2, "#(rgb,0,0,0)color(0,0,0,0)"]; // or { this setObjectTexture [_x, "#(rgb,0,0,0)color(0,0,0,0)"]; } forEach [0,1,2]; ```if it fails, you can't without a mod
@winter rose
Thanks for the answer unfortunately that didnt work either
I am trying to make little servo skulls
@haughty steeple any idea if there is a object name i can call to attach the something to the gun arm?
Montana I stand corrected the code you wrote worked on the ED1 just not the darter
thats still helpful
It hides the texture but only if i get close to it which is somewhat weird
must have something to do with LODs, yeah
https://cdn.discordapp.com/attachments/601938788490412032/689479471484633093/20200317152452_1.jpg i managed to make one and make it fire aswell
hahaha dat look, nice π
i attached a pelter under so it fires aswell (with a second operator)
Any idea why typeOf returns "" for 158887: uwreck_fishingboat_f.p3d (terrain objects of type wrecks)
Seems to work fine for all other terrain objects like radars and so on. Are wrecks configured differently?
not all terrain objects have classnames
Any work around for that?
use the p3d filename?
Not an option. I need the display name of the object from config.
display name?
yes
example?
What is the display name of that object?
didn't know terrain objects have one, but on the other hand I remember it displaying "Tree" on a tree in A2
Most of them have, except wrecks
(Thank you so much Dedmen and Lou for helping me with getObjectTexture, it's exactly what I'm looking for!!)
@bright flume sqf configFile >> "CfgVehicles" >> "Tuna_F" >> "displayName"// Thuna
Sorry to ask the real dumb questions but how do I use getObjectTexture to get the texture, like, is there a way to display it in game so I could write it down?
hint str getObjectTextures theObject
hint str getObjectTextures theObject
// hint or systemChat
@faint fossil ^
Ah okay thanks again!
please copyToClipboard, you don't want to write each path down by hand
diag_log also for hardcopy
please copyToClipboard, you don't want to write each path down by hand
@still forum But he asked for it π
How do I calculate hit value when bullet speed is below typicalHit? Is it just speed/TypicalHit?
Is it possible to get the name of the unit (B_Helipilot_F) on a script?
Instead of 1cc15e72d00# 41: coveralls.p3d
what is typicalHit and yeyay what 'name'? player's? role name?
typeOf
what is typicalHit and yeyay what 'name'? player's? role name?
@bright flume No, the name that appears on the 3den editor (B_Helipilot_F for example)
believe if you scroll up 10 lines R3vo was talking just about that if thats what you mean
typeOf
@cosmic lichen But its posible to hint the name of the unit instead of 1cc15e72d00# 41: coveralls.p3d ?
I think eir was saying typeOf is what its gonna give
Hint typeOf OBJECT
ohh now i get it, thank you π
if there is no config class it will not report anything remember so that doesnt work on everything.
_player = _this select 1;
_PlayerUnit = typeOf _player;``` What can i do to save what's inside of the variable ("B_Helipilot_F") but without the ""?
What's the best way to determine whether a group has completed all its current waypoints and are just standing around?
Hmm may have just answered my own question: https://community.bistudio.com/wiki/currentWaypoint
That code above is saving it without extra quotes
@still forum But if i try to do_Something = _PlayerUnit_somethingis going to be "B_Helipilot_F" with those ""
no
Is there something i can do to avoid that?
that's.. how to explain that
there are no quotes in there
it just displays that to you
they don't really exist
_player = _this select 1;
_PlayerUnit = typeOf _player;
_bed = _PlayerUnit;
_BedPos = getPos _bed;``` Then, if i had a bed called B_Helipilot_F this should work?
Or is there any way to save whats inside of _bed (_PlayerUnit) as a text?
and then get the position of that object?
a classname is not a object
Thats what i mean, i cant save the "B_Helipilot_F" as a text? (B_Helipilot_F)
it is already text
No, but without the ""
If it doesn't have quotes then its not text
Yeray, you've said you want to 'save' it, where do you want to save it to
As I said, the quotes are NOT stored, they are just put around when you look at it. They are not actually part of it
I think im not explaining good π©
yup, explain the problem you want to solve, perhaps
ok
@haughty fable You might wanna read https://community.bistudio.com/wiki/Data_Types
I'll just reject your reality and substitute my own...
You want to save a object in a variable?
YER_PlayerUnit = _player
and then later get the position of it?
_playerPos = getPos YER_PlayerUnit
No idea what you want names for or classnames.
I guess he thinks the classname is a reference to the object
Give me a second
What i want to do is to set an event handler of respawn: (already did it)
true spawn {
waitUntil {player == player};
player addEventHandler ["Respawn", {
_this execVM "scripts\playerRespawn.sqf"
}];
}; ``` then, inside of playerRespawn.sqf: ```cpp
_player = _this select 1;
_PlayerUnit = typeOf _player;
_bed = _PlayerUnit;
_BedPos = getPos _bed;
_PlayerNewPos= setPos _BedPos;``` What im trying to do (TRYING, im the worse scripting) is to, if a player is the unit B_Helipilot_F, then i would only have to change the name of any bed to B_Helipilot_F and that would be his respawn point (of the soldier B_Helipilot_F). That way if i have 4 different units, i would only have to put some beds and call them the name of those units
Does that make any sense at all? I repeat, im new at this of scripting π
How many B_HeliPilot_F are in your mission?
place the beds in 3DEN?
What?
are you palcing the beds in 3den
_PlayerNewPos= setPos _BedPos; This won't work
are you palcing the beds in 3den
@still forum Yes, and calling them the way of the units
_PlayerNewPos = setPos _BedPos; that also is syntax error, check setPos wiki page
Then here
_player = _this select 1;
_playerUnitType = typeOf _player;
_bed = missionNamespace getVariable _playerUnitType;
_BedPos = getPos _bed;
then you name your bed in 3DEN B_Helipilot_F
Then here
_player = _this select 1; _playerUnitType = typeOf _player; _bed = missionNamespace getVariable _playerUnitType; _BedPos = getPos _bed;
@still forum That should work?
Why would I send you something that doesn't work?
Hahaha sorry
i removed the setPos cuz yours was broken
But whats the difference between that code and the one i did?
put them side by side and look at it
I still don't understand them, but I suppose I will when I get a little more knowledge. Anyway, thanks for the help π
_playerUnit = _this select 1;
_playerUnitType = typeOf _playerUnit;
_bed = missionNamespace getVariable _playerUnitType;
_BedPos = getPos _bed;
player setPos _BedPos;
player setUnitLoadout (configFile >> "EmptyLoadout");
player setDir(getDir _bed + 180);
[player, "PRONE_INJURED", "NONE"] call BIS_fnc_ambientAnim;
sleep 10;
[player, "STAND1", "NONE"] call BIS_fnc_ambientAnim__terminate;
``` Will this script work good on a player hosted server? Or i need to change the code or something?
how will this code be run?
true spawn {
waitUntil {player == player};
player addEventHandler ["Respawn", {
_this execVM "scripts\playerRespawn.sqf"
}];
}; ```
> how will this code be run?
@worn forge When a player respawns
So the code you have posted is found in scripts\playerRespawn.sqf
And this spawn you have, where is that run? In the player object's init field?
onButtonClick = "playMission['','\A3\Missions_F_Bootcamp\Scenarios\Arsenal.VR']"; is not work. i need help please!
amazing, what's your problem?
And this spawn you have, where is that run? In the player object's init field?
@worn forge No, in the init of the mission
@worn forge When I repaired the module code, the button to open the virtual arsenal (onButtonClick = "playMission ['', '\ A3 \ Missions_F_Bootcamp \ Scenarios \ Arsenal.VR']"; ) It stands to reason that this button will open the arsenal, but it has no effect. I do nβt know why.
Yeray, you mean init.sqf?
Yeray, you mean init.sqf?
@worn forge Yes
amazing I don't even know where to start
okey,tks!
Yeray that looks like it will work locally but I think you're over complicating it
What?
You could just pack the code in your playerRespawn.sqf file into the engine file onPlayerRespawn.sqf, which will automatically run during player respawn
And that will work on multiplayer too?
Yup
Ok, thank you! I'll try it
while (sleep 6) do {
1 cutText ["Restarting Mission.","PLAIN DOWN",1,true];
sleep 0.5;
1 cutText ["Restarting Mission..","PLAIN DOWN",1,true];
sleep 0.5;
1 cutText ["Restarting Mission...","PLAIN DOWN",1,true];
};```
is there any way to make this work?
Remove the while part and it works
ah, the good old wiki
Does anyone have a fix for Krya Nera Airstrip for AI? Is it possible to fix it using Dynamic Airport Configuration system?
What isn't working? Since the terrain config has the airstrip configured completely
not that I know of - but you could do an MP campaign?
I think Killzone Kid wrote about this - http://killzonekid.com/farewell-my-arma-friends/ ?
is it possible to load another mission from a mission
make a campaign
if your mission ends, the next one in campaign auto starts
if configured correctly
how can i do that?
see Campaign_Description.ext on the wiki, it is explained (at least the description.ext part)
thanks
The #monitor command - it's reporting more information than previously. Specifically it has readouts for "NG", and "G", does anyone know what these figures mean?
yes, dwarden posted in #perf_prof_branch I think
π
NG = non-guaranteed traffic, G = guaranteed traffic
What can i do to activate a script only if an object from a variable exists?
if (condition) stuff that happens
But how do i tell if the object is created in the map?
possibly check if its alive
you can assign it to a variable from the properties tab
and then use that to check if its not null
if (!isNull obj1) then {
do stuff...
};
how would the object not exist?
never spawned in 3den?
variable never set? object has been deleted since the variable was set?
could get deleted at some point
isNull it is
There are different definitionns of "not exist", I can think of 3 variants, that would all need different script commands
never spawned/var not set will not work with isNull
well that is not that the object does not exists just that the variable is nil
Wait
_playerUnitType = typeOf player;
_bed = missionNamespace getVariable _playerUnitType;
_BedPos = getPos _bed;
player setPos (getPos _bed);
player setDir(getDir _bed + 180);
[player, "PRONE_INJURED", "FULL"] call BIS_fnc_ambientAnim;
sleep 5;
[player, "STAND1", "FULL"] call BIS_fnc_ambientAnim__terminate; ``` If _bed exists then do the code
How could i do it?
_playerUnitType = typeOf player;
_bed = missionNamespace getVariable _playerUnitType;
if (!isNull _bed) then {
_BedPos = getPos _bed;
player setPos (getPos _bed);
player setDir(getDir _bed + 180);
[player, "PRONE_INJURED", "FULL"] call BIS_fnc_ambientAnim;
sleep 5;
[player, "STAND1", "FULL"] call BIS_fnc_ambientAnim__terminate;
};
``` assuming `_bed = missionNamespace getVariable _playerUnitType;` actually works
Yes, it does
_playerUnitType = typeOf player;
_bed = missionNamespace getVariable _playerUnitType;
if (!isNull _bed) then {
_BedPos = getPos _bed;
player setPos (getPos _bed);
player setDir(getDir _bed + 180);
[player, "PRONE_INJURED", "FULL"] call BIS_fnc_ambientAnim;
sleep 5;
[player, "STAND1", "FULL"] call BIS_fnc_ambientAnim__terminate;
};
``` assuming `_bed = missionNamespace getVariable _playerUnitType;` actually works
@tough abyss Still says varible _bed not defined
"assuming _bed = missionNamespace getVariable _playerUnitType; actually works"
If the player is B_Helipilot_F then, the bed is going to be called B_Helipilot_F
that does not look right
do you have missionNamespace variable for players unit types?
I dont know, dedmen was the one who helped me doing it
if (!isNull _bed) then { no, thats exactly what I just said above
if (!isNil "_bed") then { is correct
yes he has
he sets var name with that in 3den
if (!isNil "_bed") then {is correct
@still forum Works perfect, thank you!
but its not that the object does not exists, its that his variable is undefined
if there was an object assigned to the variable and it went null the variable would return objNull and isNull would work fine
the variable is undefined BECAUSE the object does not exist
Thats why I said he needs to define his question better, because otherwise you cannot know what he means
@exotic flax AI planes can't take off from it.
https://www.youtube.com/watch?v=odT8a4qo5aI
Hi, how force AI to switch magazine ? ( AP to HE on cannon )
@restive linden https://community.bistudio.com/wiki/loadMagazine
maybe https://community.bistudio.com/wiki/loadMagazine loadMagazine @unreal scroll
sorry, wrong tag Max's π @restive linden ^
@exotic flax AI planes can't take off from it.
https://www.youtube.com/watch?v=odT8a4qo5aI
@unreal scroll have you tried vanilla airplanes too?
Of course, the same. Without any mods. Both common and dev versions. Also, while modding, I've noticed that differnt versions have different behaviour. I.e., english and german versions can't handle this command (most of players reported about it): https://community.bistudio.com/wiki/setTriggerInterval - it just throw an error. In russian it works fine.
I wonder - if it is still unknown, maybe there'is another difference in versions?
Oops... There're no info on the page, sorry. But I switched to dev not so long ago, just because of falling weapons fix. No difference between dev (1.99) and normal version a (tested in december).
dev should be 1.97 π€
For me it is 1.99.146224
I will have to believe you on this one, I didn't visit it recently
as for the wiki page it states the Arma 3 Dev by the icon π
Aa-ah. It's hiding well. Anyway, is doesn't matter. I noticed that bug last year, as I'm making Overthrow fork, open campaign at Altis. The resistance starts from north part of Altis, so the Krya Nera Airstrip (Abdera) is the only airstrip they can have at beginning, and I wasn't able to use it with AI all the time... Can anyone confirm this bug in english version?
will try right now. so Altis, Krya Nera airstrip
Yeah, thanks.
anyone know how to activate/deactivate smoke module still cant figure if there some way script or otherwise
@unreal scroll confirmed
Thanks God. I hope we'll have an aviation soon π
how do i make a dialog open when i hit a certain key
you could make a airport in the middle of nowhere dynamically if you wanted...
@bright flume Yes, I read about it, but it's new for me, and I think if it is a bug, then it has a cause, and it should be found.
Is that the airport side bug @winter rose ? Or something else
how do i make a dialog open when i hit a certain key
something totally new (unrelated to side) @restive leaf
Ah, thanks
think it depends on the aircraft also make sure aircraft approach from bearing 53? technically its a light aircraft airfield. runway only 350m long
tried with the civilian airplane, he's all "yup, starting well" then "OH LOOK a penny to the left"
well civi planes are the worse cuz they float like forever....
not up to the point where they do a 90Β° left I hope π
I remember the first time we flew with autopilot landing in ARMA... My player character had to change uniforms after landing
you dont even wanna see the shitstorm that happens when you get 6 grouped helos being told to land...
not sure if I recorded it but I was messing with that for like 2 days I gave up cuz they just cant do it gotta issue individual orders to each guy
Best one was an Unsung helo where they'd messed up the mesh in a release and the AI basically couldn't see out and flew up, up and away π But sort of O/T
@bright flume you could place the module down with scripts:
_logicGroup = createGroup sideLogic;
_module = _logicGroup createUnit ["ModuleSmoke_F", position player, [], 0, "CAN_COLLIDE"];
and if you check \a3\modules_f\Effects\functions\fn_moduleEffectsSmoke.sqf you will see the variables you can set to make changes to it
I was hoping the old man init modules would make it appear but apparently that module is immune to working with the OM init modules
guess I can try it that way but gotta wait till later got work today
Oops already answered. Stream was slow :S
Hey there, i try to load my own loadout config with setUnitLoadout and it works well, but some items like Rangefinder, muzzles or optics won't be linked to the slot. i can only put them into the container using the items[] array. Is there another attribute for that or did i do anything wrong?
Did you get the loadout from config?
yes i tried to put the muzzles/optics into linkedItems[] but it doesn't work
class TestLoadout
{
uniformClass = "U_B_CombatUniform_mcam";
backpack = "B_Bergen_hex_F";
linkedItems[] = {"muzzle_snds_acp","optic_MRD","11Rnd_45ACP_Mag","V_TacVest_blk_POLICE","G_Combat","NVGoggles_OPFOR","H_Beret_gen_F","Rangefinder","ItemMap","ItemRadio","ItemCompass","ItemWatch"};
weapons[] = {"hgun_Pistol_heavy_01_F"};
items[] = {"ToolKit","ToolKit","ToolKit"};
magazines[] = {"11Rnd_45ACP_Mag","11Rnd_45ACP_Mag","11Rnd_45ACP_Mag","11Rnd_45ACP_Mag","SmokeShellYellow","SmokeShellYellow"};
};
The order in linked items is important
linkedItems[] = {"V_PlateCarrier2_tna_F","H_MilCap_tna_F","G_Tactical_Black","ItemMap","ItemCompass","ItemWatch","ItemRadio","ItemGPS","NVGogglesB_blk_F","muzzle_snds_65_TI_blk_F","","optic_ico_01_f","","","","",""}; ```
See the empty string "" between muzzle and optic
is there a wiki site for that information? how do you know? xD
I don't know, I just checked the format and made a wild guess.
If my assumption is correct I am gonna create a biki page
i tried it but it didn't work :/
I believe the main issue is that using configs requires a fully named weapon class (with attachments?), while getUnitLoadout/setUnitLoadout have the attachments separated.
To add attachments to a unit you need an entry in CfgWeapons for it to work, eg.
class CfgWeapons {
class rhs_weap_m4a1;
class TAG_rhs_weap_m4a1_acog: rhs_weap_m4a1 {
class LinkedItems {
class LinkedItemsAcc {
slot = "PointerSlot";
item = "rhsusf_acc_anpeq16a";
};
class LinkedItemsOptic {
slot = "CowsSlot";
item = "rhsusf_acc_ACOG_RMR";
};
};
};
};
otherwise the attachments will simply be added to your inventory and NOT the weapon
oh okay, well maybe i stay with sqf switch cases then. the getUnitLoadout array just works fine π
Why does parseText on this only generate the first sentence?
<t font='EtelkaMonospacePro' align='left'><t color='#AAAAAA'>The enemy is resupplying a location with building resources. Intercept the transport, or attack the location they are headed to once they have arrived, and capture some building resources.</t><br><t color='#FFFFFF' font='EtelkaMonospacePro' align='left' underline='1'>Schedule</t><br><t color='#FFFFFF'>1</t><t color='#AAAAFF'>Saint Louis</t><br><t color='#AAAAAA'>Saint Louis</t><br><t color='#FFFFFF'>2</t><t color='#AAAAFF'>Larche</t><br><t color='#AAAAAA'>Larche</t><br><t color='#FFFFFF'>3</t><t color='#AAAAFF'>Arudy</t><br><t color='#AAAAAA'>Arudy</t><br><t color='#FFFFFF'>4</t><t color='#AAAAFF'>Saint Jean</t><br><t color='#AAAAAA'>Saint Jean</t><br></t>```
br tag never closed
<br> is fine according to docs
not fine according to my rememberance
well i can try it, the docs are clear tho
But I guess I'm wrong then
i would expect it to be <br/> tho
as the short version
well you right, switching to <br/> worked, docs are wrong
thanks
hate to ask a stupid question but ive been here for awhile trying to figure this out, but can anyone else find a duplicating group or classname? https://pastebin.com/3h6DZtLK
Why does case require a colon afterwards but not default? I hate switches
Because case is an unary command, preparing the following value for the actual colon
Aka: colon is the actual operator
And default needs nΓΆ value
Thus nΓΆ colon
Could be implemented with a colon though... That decision is on BI
yeah, I know, I just spent 15 minutes looking for where I made a mistake
but it was just a colon next to default
Can I lock e. g. driver seat only for the unit locally?
I mean remove all actions with current seat only for player X
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#GetIn check who's getting in what seat?
nvm doesnt check seat changes...
actually that would work add in a check for locality change as if someone else starts driving vehicle locality will switch?
@worthy willow they are works locally?
Top left on wiki π
I see that it's global. I looking for local way
It is both
If it is called on the player while on a dedicated server it will only effect that player
@ebon ridge Which docs are wrong?
ooooooh this one might be on me
I batch replaced line returns but it has impacted the structured text examples too! <br> vs <br />
@jade abyss I need an :angrypepe: please
I knew I would be quote-mined π
π
okaaay you're both awesome
I mean, i know i am. That's no news.
bruh
I'm editing structured text⦠and looking for potential examples I broke. Thanks for the report @ebon ridge
@ebon ridge examples should be fixed now
(@cosmic lichen)
No need to mention me, I trust you with that π
Blame Lou for any inaccuracies
Liiies!1!
is there any way to define macros with variable arguments such as __VA_ARGS__ in c?
no
that is a shame, i am trying to pass an array to a macro but you cannot have commas
you can
#define COMMA ,
MY_MACRO([a COMMA b COMMA c])
#define ARR_3(a,b,c) a,b,c
MY_MACRO(ARR_3([a,b,c]))
the most common (ACE,CBA,TFAR,ACRE) is the ARR_N variant
π―
Parenthesis works, no?
does lbAdd doesn't work dynamically on CT_TOOLBOX (GUI) if you use it in sqf? it just adds a new entry but no text or image - instead the text will be shown in a tooltip box
@viral basin https://community.bistudio.com/wiki/DialogControls-Toolbox
lbAdd - adds a string to cleared toolbox table
The toolbox is only modifiable via config
We use ARG instead of COMMA, at some point we tried [foo]+[bar] as well. In the end though we just use parameter count macro variants as the readability is better
(SQF-vm catches our macro parameter count mismatches, thanks @queen cargo !)
Np
It also caught dozens of them in ACE π
If some one just would craft corresponding unit Tests using sqf-vm π€ π€
@distant oyster a pitty that they didn't make it more dynamic via SQF...i really liked the onToolBoxSelChanged EH π
any documentation or features or theories that exist to enable me to submit data from in game to a web based API?
i know we can execute urls and i am currently sending simple data from the server to our website but id like to submit more complex data to the website and some stuff you cant do via the URL.
na dont need a db for the server. just wanted to be able to send more than player count and players names. would like to be able to send player states in a list. but cant do that via url only post.
you could, one query/player for example
yeah that was an example. you are correct for the scenario i provided. being about to post lists/data chunks would be nice.
its all good ill just do the one/query per thing for simple things that arent too big.
Technically you can send everything over an url (GET data)
params ["_array", "_number"];
if (_number > (count _array)) then {
_number = count _array;
};
private _selection = [];
while {count _selection < _number} do {
_selection pushBackUnique (selectRandom _array);
};
_selection
};```
is there a faster way to do this?
this function selects x objects at random from an array
would like to be able to send player states in a list. but cant do that via url only post.
huh? why not? base64 encode and plug in as url param.
@uncut sphinx
if (_number > (count _array)) then {
_number = count _array;
};
->
_number = _number min count _array;
Anyone know of a technique which will reveal if a config value is explicitly set in a class (vs being inherited)?
compare with configClasses which doesn't support inheritance, and you are good
thanks both
hello when the player get killed, he should automatically team switch to the next squad member, but i dont know how to syntax it.
player addEventHandler ["killed", {teamSwitch;}]; and some how: do _from selectLeader player
Anyone happen to know a good way way of accomplishing the code array[i] = array[i] + num; in sqf? Using select syntax as a replacement for array[i] directly apparently isnt valid. Im hoping to avoid requiring an additional temp variable if possible.
array = array apply {_x + num}
apply?
assuming you are iterating the whole array?
negative, singular index
if only single element then
array set [i, (array select i) + num]
sorry should have clarified that
huh, thought i had tried that
guess not
Thanks
hi, im trying to get into arma scripting (rpg in particular). i download the framework from altisliferpg.com and i've seen that databases are used for almost everything. should i learn how to use them before start scripting? also, do i need to run a server via steamcmd and all that stuff before testing my scripts or i can just go to -> multiplayer -> server browser -> host server -> <<new 3d editor>> and put my scripts into mpmissions? any tip to get started?
Before trying any framework you should probably learn the basics of vanilla scripting.
or i can just go to -> multiplayer -> server browser -> host server -> <<new 3d editor>> and put my scripts into mpmissions?
You can do that too, you can even go in the editor, make you script here and launch the server from the editor
you can run your scripts everywhere where you've written them to work for.
If the script is written such that it can only run on a dedicated server, then you obv can't test it locally. I don't know why anyone would do that though.
But considering they are your scripts, you should already know where they run
ok, thank you. do you guys have any good guide to suggest me to get started?
and what about databases?
is it ok if i post now??? dont wanna interrupt u guys
//init.sqf
end_time = {
0 = [] spawn {
private ["_eastTickets", "_westTickets"];
while {true} do {
_eastTickets = [east] call BIS_fnc_respawnTickets;
_westTickets = [west] call BIS_fnc_respawnTickets;
if (_eastTickets < _westTickets ) exitWith {
if (side player == east) then {
"lose" call BIS_fnc_endMissionServer;
} else {
"win" call BIS_fnc_endMissionServer;
}
};
if (_westTickets < _eastTickets) exitWith {
if (side player == west) then {
"lose" call BIS_fnc_endMissionServer;
} else {
"win" call BIS_fnc_endMissionServer;
}
};
Sleep 0.1;
};
};
};
//initServer.sqf
private "_endtime";
[] spawn {
_endtime = _this select 0;
_endtime = 600;
while {_endtime > 0} do {
_endtime = _endtime - 1;
if (_endtime < 1 ) exitWith {call end_time;};
Sleep 1;
};
};
_endtime = _this select 0;
_endtime = 600;
first thing is useless as overwritten by second thing
if (_endtime < 1 ) exitWith {call end_time;};
huh? just put it after the while loop
private ["_eastTickets", "_westTickets"];
don't do that
private "_endtime"; don't do that either, thats bad in every possible way to look at it
while {_endtime > 0} do {
_endtime = _endtime - 1;
//if (_endtime < 1 ) exitWith {call end_time;};~~
};
call end_time;```
spawn end_time is better
cuz while true loop runs for ever anyway
also why not just sleep 600? instead of 600 times sleep 1?
*uiSleep 600
or do stuff like that:
_endTime = diag_tickTime + 600;
waitUntil{uisleep 1; (_endTime < diag_tickTime)};
call end_time;
make me :coronapepe:
where the f is my coughing pepe
ok thanks guys i will be right back gonna try it ...the problem im having is that it doesnt end correctly for each player side.
Alright gents, I need a little help correcting an error in whatever im doing wrong.
So, the first video of me flying, is what i'm trying to achieve from an AI pilot. The second video at 0:41 was me trying to have AI do it. I set a "Move" waypoint behind the drop zone. Right about where i turned the aircraft while I was flying. I then had an invisible helipad on top of the DZ with a "Transport unload" marker attached. This mod doesnt have a proper transport function so i gad to go into the init and set an attachto script. On transport unload, i had detach on the init although the pilot would prematurely drop the transport then go in for it.
In the third video at 1:30, i set limitspeed on the first move waypoint, exchanged "Transport unload" with another move waypoint with limitspeed 0. Then on top of that was a third move waypoint with detach. Played scenario and as you can see, the pilot dropped transport early again but didnt move this time. There is a 4th move3 waypoint out of map for the aircraft to move to.
What am I doing wrong? How do i get the pilot to drop the vehicle right where i want it? https://youtu.be/4cB_1EEu8LY
Hello there, i'm currently having a problem with a Diary:
I have added the line in the Init.sqf, i have also added the "Briefing.sqf" file and called it from init (i wan't it to be shown since the start of the mission)
Yet, when i test the mission, it won't be shown, here's my code:
@tough abyss Had this problem today, seems that when they use different kind of seats or there's too many in the vehicle, the leader will constantly issue the 'Disembark' order, hence, forcing the vehicle to stop and drop units.
Try to play from the Squad leader slot, you won't have the issue, i had to disable AI (MP Mission) and delete the AI altogether for it to work in SP
@golden storm Why would the leader try to disembark if he still has waypoints to hit? And shouldn't disembark be separate from dropping the vehicle since I have the vehicle scripted (attachto /detach) to the aircraft?
Arma 3 is so weird lmfao
Try to add a new Waypoint for the Squad leader at the LZ to "Get Out", that might help him
i'll give it a try. Is there a way to force the landing gear up? When detaching the tank with the landing gear down, the tank will hit the landing gear and both vehicles will explode
Yes, search for the action in the Config Viewer of the Heli, there you'll find all the posible actions to set it up the way you want
Right Click the Helo -> View in Config Viewer -> Actions -> Landing Gear
Awesome. I'll give it a try in a little. clan wars going on in World of Tanks lol
How can I check whether a value is SCALAR NaN?
@golden storm Do you know how to add to the quick scroll menu? So instead of having to use the init to attachto and detach, I can just use the mouse scroll?
Or is that a lot more complicated
Also, why doesn't this work?
// ...
_player = _this select 0;
_side = _this select 1;
_uid = getPlayerUID(_player);
missionNamespace setVariable [format ["WFBE_CO_VAR_SIDE_UID_%1", _uid], _side];
When I try to read the variable, it has value <NULL> in debug line in RPT
The script above is execVM'd when player joins the game, and the local variables are used elsewhere in the script where they work normally, so I think the error can't be caused by the local variables
"[WFBE (INFORMATION)] [frameno:9376 | ticktime:181.918 | fps:45.4545] Server_PlayerDisconnected.sqf: Player [Net_2] [76561198053533958] has left the game"
"[WFBE (INFORMATION)] [frameno:9376 | ticktime:181.918 | fps:45.4545] OnPlayerDisconnected.sqf: Player [Net_2] [76561198053533958], side [<null>] disconnected from game, OLD_SCORE_UID...: [8], CURRENT_SCORE_UID...: [8], TOTAL score sent to database: [84]"
"[WFBE (INFORMATION)] [frameno:9376 | ticktime:181.919 | fps:45.4545] Server_PlayerDisconnected.sqf: Player [Net_2] [76561198053533958] units are now being removed for AI Team [B 1-1-A]."
The rpt error we're getting with @tender fossil
Or not error
but it just makes the side <null>
That's from another script @amber basalt
But yeah, the value of variable is <null> there
π€ k
well maybe the variable is not set then?
ah, just re-read the code.
Uh.. Β―_(γ)_/Β―
How is that Code working at All? Should error like hell
I don't see error if _this is correct
Is it possible to only allow "Fast travel to seized sector" for sectors that are linked to the base and let both sides only spawn outside of the sector when fast traveling to a contested sector (so that the defenders can't just fast travel into the middle of a sector but have to walk in just like the attackers) or disable "Fast travel to contested sector" completely?
how do i decrease AI damage to players?
Depends. There is a difficulty setting for reduced damage
@thorn shale Literally the first google link https://forums.bohemia.net/forums/topic/198136-reducing-player-damage/
Bohemia Interactive Forums
Hi guys I have this script that I put in a units init.. this addeventhandler [HandleDamage, { _unit = _this select 0; _selection = _this select 1; _passedDamage = _this select 2; _source = _this select 3; _projectile = _this select 4; _oldDamage = 0; _damageMultiplier = 0.5; s...
setBehaviour vs setBehaviourStrong what is the difference? They both set the behaviour on the group as per the docs.
Thanks
Guys is there a possibility to make a script wich checks wich side is controling more sectors/triggers and define winner of mission. I am ussing sector modules from game, but i dont want to use ticket bleeding system, i want mission to be time limiter, and to define winner in the end.
Is it possible to only allow "Fast travel to seized sector" for sectors that are linked to the base and let both sides only spawn outside of the sector when fast traveling to a contested sector (so that the defenders can't just fast travel into the middle of a sector but have to walk in just like the attackers) or disable "Fast travel to contested sector" completely?
Hello there ! I have a little question .. π
Basically, I want to make sure I fall into unconscious state rather than my character dying. I thus trigger the "handleDamage" event except that in certain cases, I die before even going through the handleDamage event. Do you have some leads on this? thank you π
@hot hull ```sqf
_unit addEventHandler ['handleDamage',
{
params ["_unit","_selection","_handleDamage","","","_hitIndex"];
if (_handleDamage < 0.1) exitWith {0};//From BIS Revive
if (!alive _unit) exitWith {0};//From BIS Revive
if (lifeState _unit isEqualTo "INCAPACITATED") exitWith {0};
if(_selection == "" && _handleDamage >= 0.95) then
{
_unit setUnconscious true;
_handleDamage = 0;
};
_handleDamage min 0.95
}];```
Oh perfect, it worked ! Thanks a lot π€©
hi guys - anybody have an idea how to hide only the HUD-cursor, while leaving the rest in place?
using showHUD 's 'hud' or 'cursors' values disables all drawn 3d icons
if i'm not mistaken the control is within (configfile >> "CfgInGameUI"). I am struggling finding a way to adress that specifi control. I found a bit of code that can catch the "RscIngameUI" controls but I can't seem to adapt that to "CfgInGameUI"
//-- works
_classes = "true" configClasses (configfile >> "RscInGameUI");
{
private ["_rsc","_idcs"];
_rsc = configName _x;
_idcs = [configfile >> "RscInGameUI" >> _rsc, 1, true] call BIS_fnc_displayControls;
{
((uiNameSpace getVariable _rsc) displayCtrl _x) ctrlSetTextColor [1,0,0,1];
} forEach _idcs;
} forEach _classes;
//-- does not work (empty IDC's)
_classes = "true" configClasses (configfile >> "CfgInGameUI");
{
private ["_rsc","_idcs"];
_rsc = configName _x;
_idcs = [configfile >> "CfgInGameUI" >> _rsc, 1, true] call BIS_fnc_displayControls;
{
((uiNameSpace getVariable _rsc) displayCtrl _x) ctrlSetTextColor [1,0,0,1];
} forEach _idcs;
} forEach _classes;
You might be able to use the "allControls" command and then loop trough each of them and find the one you're searching for
i tried this: sqf [] spawn { sleep 1; { _d = _x; {_x ctrlSetTextColor [1,1,0,1]} foreach (allControls _d); } foreach alldisplays; } no dice
What is the cursor you trying to hide?
picture with red pointy arrow might be useful to understand the context
I am trying to hide the main movement cursor - if I identified it correctly it's configfile >> "CfgInGameUI" >> "Cursor"
i used the 'iconMove_ca.paa' image to find that
movement cursor?
sorry i should not be making up names >> this thing https://imgur.com/a/XvOViju. the cursor comes up when you have squad-units selected and consists of the circle (move_ca.paa) and a context dependent center icon
if i understand correctly, the context based icon in the middle is defined in the configs of configfile >> "CfgInGameUI" >> "Cursor"
iconMove = "\A3\ui_f\data\igui\cfg\cursors\iconMove_ca.paa";
iconRepairVehicle = "\A3\ui_f\data\igui\cfg\cursors\iconRepairVehicle_ca.paa";
[...]
So I was told something like this was required for arma 2 DB stuff.
private _positionasl = getPosASL _object;
private _position = getPosATL _object;
private _positionType = 1;
if ((_positionasl select 2) < (_position select 2)) then {
_position = _positionasl;
_positionType = 0;
};```
Does anyone know if "problem" still exists, or can I just use ATL only?
(This is position that gets saved to DB)
(And yes, http://killzonekid.com/arma-scripting-tutorials-float-to-string-position-to-string/ is going to be used)
@cosmic lichen You seem to know a lot about scripting so do you know a way to disable any fast travel to a warlords sector when it is contested, sort of like with BLUFOR Base and OPFOR Base which neither the attackers nor the defenders can fast travel to once it gets targeted?
No clue actually π Might be possible if you dig through the warlords code, but that's probably a lot of work.
@cosmic lichen Ok, thanks.
@vague geode in the warlords init module I think
I haven't looked at the mission file on my wl server inawhile so i might be wrong (lazy ik) but this is more of a #warlords_discussion topic
@tough abyss I only know that you can disable all fast travel in the warlords init module but I only want to disable all fast travel to contested sectors but for the others fast travel should work like usual...
Look again im pretty sure you can disable to contested sectors independantly of seized
On one of my maps i have it disabled and no one can fast travel to contested but to seized they can
@vague geode
@tough abyss There's only an option to prevent the attackers from fast traveling to a contested sector but I would like to disable it for the defenders as well so that they can't fast travel into a seized sector while it is targeted by the enemy...
Ohh i see what your saying thats a bit difficult
@tough abyss What is currently happening and what I would like to prevent is that when you kill a defending player he/she will just reappear in the same sector 30 sec. later and will spawn on the groud which gives you no window of opportunity to attack him/her or prevent him/her from getting into the sector and hide there.
I see what you mean, that is difficult to script(impossible at least for me) IMO your best off looking at the warlords files and taking inspiration from there to achieve what you want to do with a script
Anyone know an easy way to automate changing a group from careless to aware after they take fire?
make them "SAFE" instead, and ```sqf
waitUntil { sleep 1 ; behaviour _theGroup != "SAFE" };
_theGroup setBehaviour "AWARE";
Well, if they're on Safe, they'll switch out to combat automatically anyway when it starts.
The problem is a somewhat scripted event, I'm looking to keep them passive even when they see enemies, until they take fire.
use maybe a "FiredNear" EH, but it only triggers as far as ~50m iirc
Hmm. DisableAI has an "autotarget" option. I wonder if that could be worked into what you suggested.
you can't really know when there are bullets flying around them ("shot at" being very wide definition)
you could add a "Fired" EH to the attackers, for example
Yeah, that might be a better way to do it, from the other end.
Hello, I start in the script and I don't know how to call DB information to output it on a dialog. Can you help me?
Hi, I'm trying to run a script in onPlayerRespawn.sqf
but it works only when spawning the first time and not when respawning after being killed
What am I doing wrong here?
Trying to return the offset of a object. Hovever vectoriDiff doesent get the real position.
B attachTo [A, [0,-3,3]];
offset = ((position A) vectorDiff (position B));
// offset = [-0.000732422,2.99976,-3.25736]
Does anyone know what "position" type, attachTo uses?
B attachTo [A, [0,-3,3]];
offset = (A modelToWorld [0,0,0] vectorDiff (B modelToWorld [0,0,0]));
// [-0.000732422,2.99976,-3.00016]```
This was the closest i could get
Is it possible to create a visible area like a trigger or module in the 3den editor (https://i.imgur.com/tyfdjE7.jpg ) through scripting?
I found the .p3d's and was able to create them as simple objects (https://i.imgur.com/5VYJM29.jpg ) but I hit a roadblock of how to scale them and change their color.
Ive tried now almost everything
@lean furnace cant scale objects
@grim coyote I dont understand what you are oing there
why do you need the offset?
Do save it to DB
:/
I need to read the value from the object, then i need to save the value to DB. On restore I need to read the value FROM db, and then apply it
But I guess the only way for now is to create its own function and save it as a variable
you could save the attachTo offset value to it when you use the attachTo command
yeah but the idea is that the server admins dont have to do that for their own system
if you get A modeltoworld (getposWorldVisual B) what does that give you
or using the other modelToWorld commands
Why can I skin a backpack and not a vest?
vests and helmets are item types that cant be accessed with script commands
they require modded classes for new textures
I keep getting a Generic error in this expression
...
_vehicle setVariable ["tcw_laat_is_boosting",true,false];
_isBoosting=_vehicle getVariable["tcw_laat_is_boosting",false];
while {{_isBoosting}} do...
I can post the rest if it might be caused by something else
why {{ ? Just while {_isBoosting} do... should work
and the above does not work
Can I get an example of something similar that should work?
was already posted above
ah I see. Well must be another issue. still getting a Generic error.
If (!Local (_vehicle)) ExitWith {};
_vehicle setVariable ["tcw_laat_is_boosting",true,false];
_isBoosting=_vehicle getVariable["tcw_laat_is_boosting",false];
_fuel=fuel _vehicle;
if(_fuel<.05) exitWith {hint"gfuel";};
while {_isBoosting} do
{
_vehicle setVelocityModelSpace [0,100,0];
if ( fuel _vehicle > 0) then {
_oldFuel = fuel _vehicle;
_fuelDelta = (1 / _fueldrag) * (_throttleSetting * _fuelUsageMultiplier *_frametime);
_vehicle setFuel (_oldFuel - _fuelDelta);
};
_vehicle setVariable["tcw_laat_is_boosting",true,false];
hint "Activated impulse";
}
else
...
this is a lovely example of a generic error... 18:47:32 unable to save config variable to: repeated over and over... π wish I could find that thing...
yes hence why I said example of a generic. wasnt being specific sorry for the misunderstanding there. script error that is just generic I was saying and logs dont help.
he meant literally "generic error" not "some generic error"
The log message "generic error"
yeah I got that after you said 'unreleated'
I've been using the Extended Debug Console for this. Where can I find the logs? Same path as the Crash logs?
yes
ok yeah there was more than one
16:49:53 Error in expression <int"gfuel";}; while {_isBoosting} do { _vehicle setVelocityModelSpace >
16:49:53 Error position: <do { _vehicle setVelocityModelSpace >
16:49:53 Error do: Type Array, expected code
16:49:53 Error in expression <int"gfuel";}; while {_isBoosting} do { _vehicle setVelocityModelSpace >
16:49:53 Error position: <do { _vehicle setVelocityModelSpace >
16:49:53 Error Generic error in expression
do: Type Array, expected code
aha
you do{} else {}you can't do that on a while
is it possible to switch to next squad member on player death?
switch to next unit would suffice
Hey everybody, been at this for hours on what seems super miniscule to my overall project. I'm trying to have an AI walk up to a guardhouse and have the door open so they can go in. I cant seem to get it to open using a trigger or the open/close module. Any suggestions?
so i might be stupid but idk where to ask this.
I read somewhere (cant find it now) that in the dev build you can edit configs in game, is this true? and if so how is this accomplished
Filepatching and diag exe from dev build
ty
anyone know why when opening the menu it doesn't update me with the first double click https://gyazo.com/bafd27ea1c2912f38d46c119a72acbb8
private _player = param [0];
private _iU = getItemCargo uniformContainer _player;
private _aU = getWeaponCargo uniformContainer _player;
private _mU = getMagazineCargo uniformContainer _player;
private _iV = getItemCargo vestContainer _player;
private _aV = getWeaponCargo vestContainer _player;
private _mV = getMagazineCargo vestContainer _player;
private _iM = getItemCargo backpackContainer _player;
private _aM = getWeaponCargo backpackContainer _player;
private _mM = getMagazineCargo backpackContainer _player;
_return = [_iU, _aU, _mU, _iV, _aV, _mV, _iM, _aM, _mM];
_return
this get items
_items = [player] call dev_fnc_itemsplayer;
{
} forEach _items;
Speed of the bullet, Im trying to calculate how much damage a bullet will do at a certain distance
believe mass is involved...
Theres no mass property listed in the ammo configs
@dark ocean Do you get the items then remove it?
theres hit, caliber and speed
velocity[m/s] * caliber * penetrability / 1000. Penetrability is a material property (for RHA steel it is 15, for concrete 80, for meat 250). ? atleast for armor pen?
and the object itself can have X amount of mass thats not listed anywhere
and once they are removed, the ctrlgroup cleans me and returns to get it clear, if you look the second time I double click if it updates but with one delay @worthy willow
fine found
so ive been looking at this and i feel slightly confused
https://community.bistudio.com/wiki/CMA:DevelopmentSetup
i scrolled down to Develop with unpacked data
but it dosent make much sense
all you need is the diag exe from dev
and unpacked data in your Arma 3\ folder
so what your P:\yourstuff\ becomes arma 3\yourstuff
and then you load diag exe with -filepathing and your mod
do i have to restart arma each time i make an edit?
i'm trying to have an ai shoot the vorona missile launcher at a vehicle... but he always overshoots it. anyone has any ideas for how i can fix this?
i've set the ai to watch and to target the vehicle
he looks into the general direction, but he's not pointing the launcher directly at the vehicle, thus the missile will miss
@west grove BIS_fnc_EXP_camp_guidedProjectile π
problem is the player can see the ai shoot
so i can't just spawn a missile out of the air
I think this will worked fine with an fired EH
Delete the old missile and spawn the new one at muzzle position
That's how it's done in APEX campaign
meh. i still remember a time where all this fuzz wasn't necessary
It might be possible without, but it's certainly not reliable, otherwise they would have done it without function.
It would indeed be nice if you could just give the AI a target and they'd not behave like idiots
as far as i can tell, the issue is the same i have in my old mission - for some reason dotarget / dowatch doesn't work reliable anymore if the object is > x away
they will not point their guns at the target anymore, only in its direction. really makes me wonder what caused the change
Did you use reveal command?
yes, but it won't change a thing
and if you use a position instead of an object?
old thread now :p
spawning the red dot works for missiles that can track em, at least
sadly it doesnt work with the vorona
guess i will just spawn the missile. i've already spend more time on this than i originally wanted
ok, works.
so much stress for such a little detail
Hello, I am looking for a script that will check if playing as west and if yes it would allow them to play siren on any vehicle, would this be possible?
If yes can someone help me?
Hello, we're trying to make multiplayer units get insignia programmatically by their UID.
We have an array of UIDs and then we check if the player UID is in the array.
_usPlayers = ["21312321312313"];
if((getPlayerUID player) in _usPlayers) then
{
[player, ""] call BIS_fnc_setUnitInsignia;
[player, "us"] call BIS_fnc_setUnitInsignia;
};
We first unassign and only then reassign the insignias because there's something weird with insignias where you can't assign the same insignia if it was already already assigned.
We run this code in onPlayerRespawn.sqf.
It works when first joining the server, however when respawning players can only see their own insignias.
If a player goes back to the lobby and reloads the mission, he'll see the insignias of those who respawned.
I hoped you'll be able to help me figure it out.
Is it possible to set an ACE unit trait to a whole class of units? Like for example whenever a "B_Soldier_F" is on the server he'll be a medic.
Yes it is.
@Dedmen so how? B_Soldier_F setVariable ["ace_medical_medicclass",1, true];? in what file would I put that?
You crossposted, I don't help crossposters. Just wait I'm sure someone will tell you soon.
I'm new to this discord and deleted my message as soon as someone told me? Kinda rude for no reason.
Funny it doesn't mention crossposting
uhuh, yeah yeah. It doesn't.. sure.. Somehow it never does for the people who violate the rules..
how can i disable channels? i tried to put this disableChannels[] = {0, 1, 2, 6}; into description.ext but its not working.
@polar anchor it does, but there is a bug where it doesn't apply to JIP players
@still forum (interested?)
use https://community.bistudio.com/wiki/enableChannel
ticket, someday
https://feedback.bistudio.com/T117205 exists ^^
since at least 1.62 apparently
@polar anchor you ok with this?
@winter rose not really, i started yesterday learning how to script and im not sure where everything goes. i put 0 enableChannel false; 1 enableChannel false; 2 enableChannel false;
into my init.sqf, disableChannels[] = {0, 1, 2}; into description.ext and the side and side and command channels are gone, but global channel its still there
try maybe (in init.sqf)
[] spawn {
sleep 0.1;
{ _x enableChannel [false, false] } forEach [0,1,2];
};
else, I don't know another solution.
should i remove disableChannels from description.ext?
also note:
If the user is admin, global channel is fully enabled, regardless of this command.
oof .. so i think thats the reason
should i remove disableChannels from description.ext?
you could, but it doesn't matter - I would keep them
yes the admin has to talk to everyoneβ¦
so he has to play along π
thank you @winter rose π
you're welcome! GL
Can you use manual scripted enableChannel in initPlayerLocal to get around the JIP failing?
yep
13:26:53 Error in expression <speed), (_vel select 2) ]; }; sleep 0.5; }; >
13:26:53 Error position: <sleep 0.5; }; >
13:26:53 Error Generic error in expression
```What does this mean by suspension. I've assumed it's the sleep for 0.5 seconds, but any way to get around it?
sleeping is suspending
you cannot sleep in some types of scripts
put a spawn around it, generally is the solution
The sqf is being spawned by a UserAction class. Is there a different way to spawn this?
as I said above
or as lou already demonstrated in the last properly colored sqf snippet here
Anyone able to shed some light on the cause of this? It appears to not see the string as a string?
Error:
if (!(_color isEqualTo [])) then {
drawIcon3D [
"\a3\ui_f\data\map\vehiclei>
14:23:47 Error position: <drawIcon3D [
"\a3\ui_f\data\map\vehiclei>
14:23:47 Error Type Any, expected String```
Relevant Code Block:
```sqf
if (!(_color isEqualTo [])) then { //Not a player group so draw
drawIcon3D [
"\a3\ui_f\data\map\vehicleicons\iconvirtual_ca.paa",
_color,
[(getPos _leader select 0), (getPos _leader select 1), (getPos _leader select 2) + 2],
1,
1,
0,
_text,
0.5,
0.02,
"EtelkaNarrowMediumPro",
"center",
false
];
} else {
not relevant code block
show code before relevant code block
_text is probably undefined
_leader = leader _x;
_color = [];
_name = "";
_name = (_x getVariable [QGVAR(OwningClient), "None"]);
if (typeName _name == "STRING") then {
if (_name == "Server") then {//server
_color = [COLOR_SERVER, ICON_TRANSPARENCY];
_text = "On Server";
};
if (_color isEqualTo [] && _name == "None") then {//none
_color = [COLOR_UNTRANSFERRED, ICON_TRANSPARENCY];
_text = "Untransferred";
};
} else {
if (_color isEqualTo [] && str _name == (str player)) then {//local
_color = [COLOR_LOCAL, ICON_TRANSPARENCY];
_text = "Local";
};
if (_color isEqualTo [] && _name in GVAR(HeadlessArray)) then {//HC
_color = [COLOR_HEADLESS, ICON_TRANSPARENCY];
_text = "On: " + str _name;
};
if (_color isEqualTo [] && _name in GVAR(ZeusArray)) then {//Zeus
_color = [COLOR_ZEUS, ICON_TRANSPARENCY];
_text = "On: " + name _name;
};
};
your leader getpos stuff should be a simple vectorAdd
yep. _text is undefined
your typename thing there has been replaced by isEqualType
how is _text not defined? If _color is filled, _text should be also
_text variable goes out of scope
Additional Question. If I have a remoteExec on a list of clients all of which need to put there data in the same array. What would be a good way to make sure there is a delay between them so as prevent the overwrite of data on top of each other?
Im trying to use publicVariableClient and publicVariableServer. But even with publicVariable, if they are all executed at the same time, some data will be overwritten by other clients broadcasting.
just broadcast from the server?
@potent depot what are you trying to do? it will be faster
HC system. HCs need to report their local unit counts
currently using publicVariableClient and publicVariableServer to send data firectly between the two as clients dont need it.
and using remoteExec
And I wish to store the local unit counts in a singular array
wouldnt it just be simpler to actually count the units when that info is needed by what needs it only instead of relying on something stored that might be not even accurate?
^
Thats what im trying to do?
count (allUnits select { owner _x == _HCid });
That works
should Β―_(γ)_/Β―
Yeah it should
Thanks
fortunately, I already have an array of HC units and client IDs for this purpose
@still forum Do you have an example database implemented with Intercept?
Ight so
I got a question, how do you spawn weapons inside a crate in game via the debug console?
Particularly the M76 from one of the RHS modpacks
https://community.bistudio.com/wiki/addItemCargo ? and see also:
Thanks. Would you happen to have some sort of list of all the names of RHS items or something along the lines of that?
all that would be in your config viewer
Waaaaaaa this is so cool
Hmmm, so the process of doing it in this situation, sorry for being an absolute noob but how would you go about doing it?
I will dm you a picture
@tender fossil there is the DB plugin for intercept ( https://forums.bohemia.net/forums/topic/222595-intercept-database-sql-database-extension/ )
Just Look in #arma3_tools
Bohemia Interactive Forums
Here we go with my next Intercept based mod. (This post is WIP, I need to clean this up more. Just wanted to get the word out first) I actually had this idea in my head back when I started contributing to Intercept but never build it. So here it is, a tightly integrated databa...
Hello, i keep getting this error on antistasi, and it is messing up the zone placement. I have been going through and fixing things in it for my takistan port of it, and this does not make sense why it is getting this error.
The code that is throwing the error is this
lados setVariable [_mrk,malos,true];
And malos = west
and it is saying the error is that there is a reserved variable in the expression setVariable
So I have a script and it runs fine in the debug console. but within the user class (that shows up on the custom vehicle), it doesn't seem to want to work. nothing happens
Any idea why?
@tender fossil its just SQL code. No I don't
Can I make it so people won't swim and instead walk on the sea floor?
@sharp stirrup Star Wars?
@sharp stirrup unfortunately these mods are illegal so supporting or even mentioning them will not be seen kindly here, on the official Discord.
@reef grove not that I know of⦠maybe a heavy anim and pos override but nothing I heard that already exists
damn
@winter rose do you have any suggestions of where I can start? I'm sure theres gotta be some way to do it
@sharp stirrup ANY Star Wars mod is illegal, actually
Intellectual Property issue - see #ip_rights_violations for more details.
@reef grove see setPosATL for "sticking" to the ground⦠and switchMove ? to force the anim
then IDK; do you mind if I ask a mod here?
@sharp stirrup star wars is illegal, not just SWOP.
Disney cares
who cares? It violates disneys copyright.
and said Legion base was fine.
Hah. Certainly not.
therefore, it's legal!
Why are the police not preventing serial killers from killing people hm? Serial killers being a thing must mean its legal
-_-
As you were told, any star wars mods are illegal and their discussion is not permitted here
sorry for respecting IP and the #rules dude
setPos/getPos should help
yep, looks like a teleport issue
VCΒ ?
oh! no sorry, I'm working rn (and also usually only do text support)
see the wiki, an (almost) infinite resource of Arma knowledge
https://community.bistudio.com/wiki/getPosATL
As you were told, any star wars mods are illegal and their discussion is not permitted here
again, any Star Wars mod is illegal because Disney is a PITA about IP. I am not happy about it, but again that's how they roll.
and you're welcome here for Arma scripting.
Β―_(γ)_/Β―
(though he gone)
are they ever really?
!purgeban @sharp stirrup 90d IP rights violations, trying to deceive people and telling them wrong facts about IP rights
*fires them railguns at @sharp stirrup* Γ_Γ
stares and blinks after waking up more and scrolling back
btw anyone know how to find the right angle intersection of a point if extended to a known ray/line/plane?
That's just a math question right? I know there is a math answer to that.. somewhere
Ive searched I was hoping someone in coding/scripting might know it off hand. it is kinda a difficult topic alone for that. if it was 2 points yeah but only one and knowing its perpendicular to the target at the intersection is where Im getting totally stumped
Anyone know how I might be able to disable fall damage?
unit allowDamage false
@winter rose why would malos be restricted?
@mint sand what is the value of _mrk?
lados setVariable [_mrk, malos, true];
@mint sand?
How would i make a decon shower activate with [this, 4, 3, 1] call BIN_fnc_deconShowerAnim;(spray) on trigger actvation and turn off again on trigger deactivation
Destiny are you in the Contact environment? The BIN functions will only work (assuming they're fully working, some aren't) if you're running the Contact DLC
some of them are in enoch
[this, 4, 3, 1] call BIN_fnc_deconShowerAnim; is working in the init of the shower but thats constant my issue is how to sync an activation and deactivation trigger to it so its only running when an entity is close
put the decon shower into a variable
use that var instead of this
the use trigger onActivation/onDeactivation
that seems to work when it comes to activate it but not deactivation
_mrk is a marker @winter rose
didn't answer the question I think.
He asked about value not type
Yeah, I read up on your issue. What is the value inside _mrk
Hmm, one second Iβll go look
@mint sand any update? ^^
here we go
_mrk = createmarker [format ["%1", _nombre], _pos]; _mrk setMarkerSize [_size, _size]; _mrk setMarkerShape "RECTANGLE"; _mrk setMarkerBrush "SOLID"; _mrk setMarkerColor colorMalos; _mrk setMarkerText _nombre; _mrk setMarkerAlpha 0; ciudades pushBack _nombre; spawner setVariable [_nombre,2,true]; _dmrk = createMarker [format ["Dum%1",_nombre], _pos]; _dmrk setMarkerShape "ICON"; _dmrk setMarkerType "loc_Ruin"; _dmrk setMarkerColor colorMalos; if (_nroads < _numVeh) then {_numVeh = _nroads}; lados setVariable [_mrk,west,true];
and the error comes from the end at lados setVariable blah bblah
can you hint/systemChat/diag_log the marker name to make sure it actually contains something valid?
and basically what this script does, is it spawns a patrol to go investigate when you attack bluor forces
is that in the arma 3 directory?
diag_log would go into RPT
im sorry, what would the file directory be for that?
C:\Users\YOURNAME\AppData\Local\Arma 3
what is _nombre value yes?
_nombre = [text _x, true] call A3A_fnc_fn_location;
i am trying to find what you said @still forum but i do not see any file called diag_log
value plz
there is no cache for this, as i have been running it in the editor, so there it did not save a log file for that mission
i am trying to find the value of the _x there
In 3DEN trigger areas are visible in 3D.
Is there any way to create this effect ingame by script?
systemChat _mrk should do
So _x is chosen from spawnPoint with a number from 1-10 after, or aeroporto with a number, or airSpawn with a number
@mint sand you cannot setVariable [aNumberAsString, value]
So if you remove all the variable names and just ise their values, the code should be
Lados setVariable [[spawnPoint1,rest of marker data],west,true]
Iβm not sure
@mint sand your possible issue is that you are trying to setVariable something like "155" - which is not a proper identifier
https://community.bistudio.com/wiki/Identifier
The variable being setVariabled is not a number as string though
"155" is actually valid.
wait, wha'?
@mint sand if it equals a command name it won't work (should not work?) anyway
I assume its empty string
I am surprised about the "155" being valid though.
I did check "_var" and it worked hehe
I will run it in mp so it saves a log in mpmissioncache and investigate the diag_log logs
ooor use systemChat format ["_mkr = %1", _mkr] ?
What would that do? As far as i understand, _mkr in this goes through a ton of different values as it creates all the zones
so rpt it is
RPT has nothing to do with MP or mpmission cache
anyone have an idea for how to remove the dead body in a vehicle ? because when i delete the dead body i see always the dead body in the vehicle
@faint oasis have you checked the big red note @ https://community.bistudio.com/wiki/deleteVehicle ?
Right, but before i was running it in the editor and it would not save the file that has the file with diag_log. But all the mp missions save a file that has diag_log
Will get back soon with it
can someone explain the difference between pushback and append?
pushback returns index, at wich the entry was added in
append returns nothing
Also check the Examples. append adds the entrys of an array to the existing array, while pushback would add the whole array to the existing one
yeah append adds a element regardless what the element is why I didnt grasp why there a difference unless its just an arma thing.
nono
append needs an array
pushback can add anything
array pushBack element
array1 append array2
Also: You can add this page to your favs, you can easily check on every command for yourself:
https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3
I got the page up I didnt see exactly the difference other then one supporting appending lists and append didnt mention why I asked.
so append 4 strings only, pushback is for appending arrays. got it.
wat?
append in my world dont matter what the element is, appending is appending. list string matrix or otherwise.. python for example.
append combines 2 array together, pushBack pushes the add the elements to the array.
yeah I got it append here only supports adding the whole array at the end of an array, pushback allows an array appending into another array as a new element (ie subnested).
yes
yeah I didnt see nothing stating append was only for that why I asked cuz there def other languages this dont apply. ^_^ thanks everyone.
@bright flume Just forget/ignore everything from other languages π
yeah... thats the hard part. π
Running into a problem with my respawn portion of description.ext:
I am using respawn = 3; and have the marker down named respawn_west. I am also using respawnTemplates[] = {"MenuInventory", "MenuPosition"}; When I respawn (either via death or via menu) , the death animation plays, and the inventory/location select UI shows up. After the timer, I can click the respawn button. When I do that, a random unit from the group the player was in becomes the focus in spectator mode and a message appears saying "Respawn in progress" but then nothing happens. Any ideas?
did you set it for custom respawn point
I am not sure, but I think the respawn_west marker is not automatically added to the menu's respawn position.
see https://community.bistudio.com/wiki/BIS_fnc_addRespawnPosition @devout brook
@bright flume I did, and there was no change.
@winter rose Interesting. The marker does show up in the menu but Iβm not sure I have this function anywhere. Iβll have to look.
What are the full set of requirements for making a mission persistent? Specifically the requirements for the mission.sqm and sqf if there are any. We got reports that our mission is ending as soon as the last player leaves, even though autoinit and persistent are being used.
//Hey im Trying to REMOVE individual respawn position for each units.
//for example...
//if theres an enemy within 50m of the player then remove respawn position and add back repawn position once enemies are out of range ...
//[west,_this select 0] call BIS_fnc_addRespawnPosition; // this adds respawn position for all units.I think.
//This is a WORKING example:
myRespawn = [west, HQ, "Mobile HQ"] call BIS_fnc_addRespawnPosition; //car i placed on the map
new = {
myRespawn = [west, HQ, "Mobile HQ"] call BIS_fnc_addRespawnPosition; // this is the line i use to add back the respawn position on the car.
};
Check_Trigger = createTrigger ["EmptyDetector", position player, FALSE];
Check_Trigger attachTo [player, [0, 0, 0]];
Check_Trigger setTriggerArea [50, 50, 0, FALSE];
Check_Trigger setTriggerActivation ["ANY", "PRESENT", TRUE];
Check_Trigger setTriggerStatements [
"{(side group _x) != side group player && (side group _x) in [EAST, WEST, RESISTANCE]} count thisList > 0",//this line checks if enemies are in trigger range.
"hint 'respawn disable',myRespawn call BIS_fnc_removeRespawnPosition;", // this line removes the respawn position on the car when enemies are within trigger range.
"hint 'respawn enable ready to spawn ', call new;"// this line adds back the respawn position on the car once enemies are out of trigger range.
];```
i tried organizing but discord dont seem to like that βΉοΈ
initserver,sqf
dedi ?
player is null on a dedicated server
you could also simplify with ```sqf
MAR_createHQRespawn = { [west, HQ, "Mobile HQ"] call BIS_fnc_addRespawnPosition; };
MAR_respawnPoint = call MAR_createHQRespawn;
oh sorry ...its nondedicated
do the hints work?
Is there an way of using getMissionConfigValue with config paths? ("class">>"subclass">>"value")
Or another way of knowing what type the config entry is with for example typeName.
typeName and then config path just shows "CONFIG" which is correct π But I want to know what the entry of that config is. (Array, String, Number)
isText*, but works like an charm thx!
there is no configType command
@still forum what about https://community.bistudio.com/wiki/BIS_fnc_getCfgData
@winter rose Yes, everything works in the script above ...i sent that as an example
Still no configType command
a script function that does isArray, isNumber, isText like I wrote above yes.
hi guys - i am having issues selecting multiple entries of a CT_Tree with tvSetCurSel - what's the procedure here? I am trying to open the tree with certain rows having the highlighted/selected color
I can only manage to select one entry - but not multiples
multiselectEnabled = 1; is what i'm using π
I know that for CT_LISTBOX there is https://community.bistudio.com/wiki/lbSetSelected but for CT_TREE?
wait I might have a general misundrstanding here
ah nevermind - i was hoping the difference between say lbSetCurSel and lbSetSelected would hold a clue
there is https://community.bistudio.com/wiki/tvSetCurSel - But it can only select a single entry unless I'm using it wrong
The CT_Tree has two different shades of 'selected-color' - there's the full orange that corresponds with tvCurSel - but then there's also a less bright shade of orange for the 'other' selected entries - those are the ones I'd like to autp-select when opening the interface
//---Target hostage
_x = bis_target
{
waituntil {player distance _x < 5 }; then
player addAction [
"Hands Up",
{ if (side _x == east) then
{ _x switchMove "Acts_ExecutionVictim_Loop";
};
};
}forEach allUnits;
];````
I had found it in the pinned message, but thanks! Thats all or is there more wrong?
Dont use _x as a variable. It will only get overwritten by the magic variable
Well there is acutally quite a lot more wrong with the script. Give me a minute
just in case somebody knows, i'd like to open a dialog with a CT-Tree and get a pre-selection like this: https://imgur.com/a/gB7WEJa
@tough abyss ```sqf
//_x = bis_target
{
_x addAction [
"Hands Up",
{
params ["_target", "_caller", "_actionId", "_arguments"];
if (side _target == east) then
{
_target switchMove "Acts_ExecutionVictim_Loop";
};
},
[],
1.5,
true,
true,
"",
"alive _target && alive _this",
5
];
} forEach (allUnits select {side _x == east});
@distant oyster Thanks!
@burnt cobalt It seems that there is no command for that :(
What impact does supression have on Ai's abiliity to aim? I cant seem to find what effect it has on AI
I know supression is a value between 0 and 1 but I cant seem to find how that value affects ai
@distant oyster seems so, kinda unexpected - thanks though, I appreciate the help!
seems that https://community.bistudio.com/wiki/tvSetCurSel just doesn't do the multiselection bit. Strikes me as odd but hey, it's the game we love π
Why does a group sometimes have an extra waypoint and sometimes not? I know that all groups have to have 1 waypoint minimum, but surely if I add an explicit waypoint then that extra one should be consistently removed. Yet it sometimes seems to remain such that the first real waypoint is waypoint 2 instead of one.
This is messing with my ability to determine what the real current waypoint target position is
Does BIS_fnc_addRespawnPosition need to be called in Description.ext?
you⦠can't call anything in Description.ext?
Sorry, confused myself.
You linked that function to me but I'm not sure if I need to call it since my respawn point already appears in the respawn UI.
and you can click, etc it's interactable?
Yeah everything works as expected until the player actually presses the respawn button. Then the UI goes away like normal, but then the player enters spectate mode on a random group member and nothing happens.
and a message is displayed saying "Respawn in progress"
then IDK; try using only a "normal" added respawn point, not respawn_west maybe?
either that, or your respawn template combination is not valid and "interfere", but I am absolutely not knowing about what I am talking about here π
π¦ This same script worked in another mission I wrote it for, I'm not sure what step I've missed
indeed, the issue lies in the (config, most likely) difference between these two missions
Anything obvious I should check first?
Description.ext:
respawn = 3;
respawnTemplates[] = {"MenuInventory", "MenuPosition"}
marker "respawn_west"β¦
hmm, respawnDelay maybe? or Eden attributes, too
Yeah they're all the same:
respawn = 3;
respawnButton = 1;
respawnDelay = 15;
respawnDialog = 0;
respawnOnStart = 0;
It's the Description.ext itself that I am re-using
Can you can change compileFinal in another addon? Addon with dependency from addon that defines something with compileFinal, you can redefine that in subsequent addon with another compileFinal?
hmm
or setting up a compileFinal before the original addon's compile