#arma3_scripting
1 messages ยท Page 471 of 1
Is there anyway to tell when a player is looking at a drawIcon3D? basically something like cursorTarget but for 3d ui elements?
Hi everyone, I use a3log, but I can only save logs to 1 file. I want to save in different files.
X3KJ, nice arty there ๐
ty
Anyone know the best method to get the rotational value of objects linked to a gamelogic? (ie we have airport marker A but station 1 is linked to it, and we want station 1's rotational value) anyone? ๐ฎ
get world orientation of both objects, then make the difference...
just as you would with position
got'cha, thank you ๐
Need a second pair of eyes on this one, unit doesn't return anything
/*
Author: Midnight
Description: Finds player object from uid or name
Paramter(s):
0 - STRING OR NUMBER: Player UID or Player Name
Returns:
OBJECT: Unit object
*/
params[
["_id","",["",0]]
];
switch (typeName _id) do {
case "SCALAR": {
{
if((getPlayerUID _x) isEqualTo _id) then {
unit = _x;
true
};
false
} count allPlayers;
};
case "STRING": {
{
if((name _x) isEqualTo _id) then {
unit = _x;
true
};
false
} count allPlayers;
};
};
unit
PlayerUID is a string
Doh. ๐คฆ
Never watched, I feel it has to do with shame
Maybe 
is possible to use sqf missionNamespace setVariable ... on headless client?
params[
["_id","",[""]]
];
{
if((name _x) isEqualTo _id) then {
unit = _x;
true
};
false
} count allPlayers;
unit
This seems to be returning undefined as well. I'm curious if it has to do with defining unit inside count
Use select/findIf
allPlayers select {getPlayerUID _x isEqualTo _id} param [0,objNull];
^ this is what I was using initally.
params [["_id","",[""]]];
_index = allPlayers findIf {name _x isEqualTo _id};
if (_index > -1) then {
_unit = allPlayers select _index;
} else {
_unit = objNull;
};
_unit
xD
I understand the concept, it just seems convoluted .
I am calling it like so:
private _unit = [_name] call mud_fnc_findUser;
still no _unit definition
I thought it may be my input, but testing it ingame it does not seem like that is so
Chew, just define _unit in params with objNull as default value (or use my method and if undefined itโll default to that anyway)
Gnashes, i don't see select command with code parametr usage ๐
select expression
Array select expression
_unit remoteExec ["setFace",-2,true] _face What's the problem here?
@outer scarab wrong syntax, https://community.bistudio.com/wiki/remoteExec see examples in syntax description
how do i change the name of a unit. say i place a survivor, it shows survivor when looking at that character in game. what if i want that to show brother bob?
@fair drum use this: https://community.bistudio.com/wiki/setName
ah ok i was trying setidentity
@strong shard Only reason I'm posting about this here is I can't wrap my head round what the syntax should be in this instance. Would [_unit,_face] remoteExec ["setFace",-2,true]] be correct?
@outer scarab remove last bracket โ]โ
params [["_id","",[""]]];
/*
_index = allPlayers findIf {name _x isEqualTo _id};
if (_index > -1) then {
_unit = allPlayers select _index;
} else {
_unit = objNull;
};
_unit
*/
allPlayers param [allPlayers findIf {name _x isEqualTo _id}, objNull];
``` maybe ^
@fair drum sorry i was wrong, you need to change โNAME TAGโ, but it is impossible via scripts, you can hide this in difficulty settings and draw own name via drawIcon3D
hmmmm i wonder how they do it in the campaign...
@fair drum in campaign devs using special characters from โNATOโ (Or CSAT, AFF and etc) >> โMen (Story)โ
@strong shard I've been beating my head against the wall for the last hour with this. The bracket was a typo; [_unit,_face] remoteExec ["setFace",-2,true] produces no script error unlike other attempts, but still breaks the script somehow. Let me know the answer if you can see it.
@outer scarab if you testing in editor or SP or Hosting in MP, than โ-2โ, because you are server, -2 = everywhere, but not server
This is embedded in a script to assign gear, but that entire function's now.. dysfunctional. Point being, the locality of that remotexec shouldn't matter in regards to the rest of the script. I'm checking now to see if I broke something else though.
Looks like that might be the case
@meager heart (allPlayers select { (name _x) isEqualTo _name; }) param [0, objNull]
you lost _id there ๐
anyone have familiarity with the ravage mod?
@meager heart Just rename _name ๐ also it would be good to use ==, not isEqualTo, because isEqualTo is case sensitive
wut
@meager heart example, player name = โBobโ, _id = โbobโ... isEqualTo = false; == = true. But if _id always has proper case, use isEqualTo
i hope you understand difference between select and findif... ty for tips and tricks with == ๐
@meager heart ๐
๐
Hi, I need one condition with for a mission that I get a archive, "if(take archive) then {objetive succeeded}" anyone help me with this?
is possible to use playSound3D on headlessClient?
just getting into this, any advice on places to learn the commands? and was also hoping someone could help me with something
I do not think it's something difficult, because it's just a condition, I just do not do it because I'm still learning.
I'm trying set it so a waypoint appears on another player every 5 minutes or so, but does not follow them
Anyone know what to do?
i have about 50 bounding mines that i need grouped so that i can purge them after an objective is completed. how would i go about grouping that many objects?
maybe this will help > https://community.bistudio.com/wiki/allMines
does skipTime just change the time or is the black screen transition (eg "7 hours later") included as part of it? im trying to make a flashback part way through the mission
no transitions effects with just skipTime
any idea how to call that black transition screen?
you have (for example, not the best) https://community.bistudio.com/wiki/BIS_fnc_showTime
yep ^ or make your version of it... that is simple to do...
@covert inlet what BI did in some missions was using a blackout, skipTime and https://community.bistudio.com/wiki/BIS_fnc_typeText2
btw i have typetextX... somewhere custom version of typetext v 1 ๐
also you can use just BIS_fnc_dynamicText
oh that is fancy i just found titleText eg titleText ["Your message\nSecond Line of your Message", "BLACK", 1.5]; but im not sure how/if it needs some extra syntax to be run from zeus?
Displays are the ones that allow the player to continue moving around etc with a custom GUI, dialogs force focus right?
Yes. But there also are "resources" (created via cutRsc)
createDisplay will show the cursor and can be closed via esc. (closing can be blocked via EH)
But your input still works for movement etc.
Oh I see
cutRsc is not interactive and suitable for HUD.
y.
cheers
FPS counter maybe it will help you a little bit.
https://community.bistudio.com/wiki/BIS_fnc_VRTimer also check the code by Lou in comment here
Cheers ๐
Is it an idea to use ctrl_x as a means of creation completly or continue with what i'm doing rn, making the static stuff there and then just updating the text using the commands?
using the GUI creator thingy
So far, everything i've done is static anyways
but just curious
@brave jungle If your gui is complex you should do it via config classes as some configurations are hard to achieve via scripting.
Hey guys another problem. Trying to use parseNumber but's returning 0 everytime
Here is what i've got
show me what you got!
hehe
_TimerAmount = _this select 0;
_TimerAmount = str _TimerAmount;
hint _TimerAmount;
sleep 1;
_TimerAmount = parseNumber _TimerAmount;
So _this select 0; is coming from a dialog which has:
action = "_Time = ctrlText 1400; [_time] execVM ""Curious's Framework\scripts\misc\features\countdownTimer.sqf""; closeDialog 0;";
I'm overlooking something I know it ๐
Using a for do loop
It doesn't like the _timerAmount
double-quote?
oh, you left out the first quote
My mistake, hold on
np, I was just surprised by the coloring ^^
๐
well according to https://community.bistudio.com/wiki/ctrlText, ctrlText returns a string, so _TimerAmount is already a string ๐
no need to str it
I bet when you hint it, you get "30" and not 30?
Yes, but the hint is there just so I know the number was getting passed through
after the parseNumber, I can't hint it anymore, obviously, but the for do loop doesn't like it, if I use
_TimerAmount = _this select 0;
hint _TimerAmount;
sleep 1;
_TimerAmount = parseNumber _TimerAmount;
hint _TimerAmount;
sleep 1;
hint wont show, and parseNumber is going to 0, therefore ending the loop. Loop is:
for "_i" from _TimerAmount to 0 do {
_TimeMinutes = _TimerAmount - 1;
_FinalTime = _TimeMinutes / 60;
if (_FinalTime < 60) then {
ctrlSetText [1000, format ["%1 seconds!" , _FinalTime]];
} else {
ctrlSetText [1000, format ["%1 Minutes" ,floor _FinalTime]];
};
sleep 1;
};
you can only hint a string, yes
Yeah
_TimerAmount = _this select 0;
hint _TimerAmount;
sleep 1;
_TimerAmount = parseNumber _TimerAmount;
hint str _TimerAmount;
sleep 1;
just finishing answering for clarity ^__^
_TimerAmount = _this select 0; // is a string
hint _TimerAmount; // hints properly
sleep 1;
_TimerAmount = parseNumber _TimerAmount; // now _TimerAmount is a number
hint str _TimerAmount; // you hint its string here, but it is still a number
sleep 1;
so now you get a number. maybe you should do something if the parseNumber didn't get a proper input
perfect! it's a string now and not a stringified string ("""65""")
next code block plz ๐
"CUR_Countdown" cutRsc ["CountdownNotification", "PLAIN", -1, true];
for "_i" from _TimerAmount to 0 do {
_TimeMinutes = _TimerAmount - 1;
_FinalTime = _TimeMinutes / 60;
if (_FinalTime < 60) then {
ctrlSetText [1000, format ["%1 seconds!" , _FinalTime]];
} else {
ctrlSetText [1000, format ["%1 Minutes" ,floor _FinalTime]];
};
sleep 1;
};
playSound "Transition3";
["<t color='#ff7635' size = '1.2' font = 'RobotoCondensedBold'>THE COUNTDOWN HAS ENDED!</t>",0.01,(safeZoneY + 0.05),3,1,0,90]spawn bis_fnc_dynamicText;
why is my formattin gnot working
.<
3 of the `
then sqf
then 3 more
```sqf
<your code>
```
๐
There we go
ignore the cutRsc, it's not wroking lol
well, it is but not showing up
So let me explain what I was after:
1: Grab a number in seconds
2: Convert said number to minutes
3: While above 60 seconds, display X minutes
4: While under 60 seconds, just display the seconds.
5: End countdown with text
and I missed a ! on the condition
sick
btw we have > BIS_fnc_secondsToString ๐
^
I tried using that with minutes but it will only allow hours by themselves
yeah
"HH"
"HH:MM"
"HH:MM:SS"
"HH:MM:SS.MS"
"MM"
"MM:SS"
"MM:SS.MS"
"SS.MS"```
well, should work, I'll recheck the code behind it if needed
what the function or my bit?
try again? ^^ should work fine
no u
The for do is still taking 0
String or Structured Text
oops I was scrolled up
But hint supports structure text too
@brave jungle
for "_i" from _TimerAmount to 0 do {
if (_TimerAmount < 60) then {
ctrlSetText [1000, format ["%1 seconds!" , _TimerAmount]];
} else {
ctrlSetText [1000, format ["%1 minutes" ,floor (_TimerAmount / 60)]];
};
};```
params ["_time"];
// Total hours
private _totalHours = floor((_time / 60) / 60);
// Total minutes
private _totalMinutes = floor(_time / 60);
// Total seconds
private _totalSeconds = _time;
// Check absolute time
private _timeLeft = _time;
// Total hours
private _hours = floor _totalHours;
// Remove hours used from _timeLeft
if (_hours > 0) then {
_timeLeft = _timeLeft - ((_hours * 60)*60);
};
// Minutes remaining
private _minutes = floor (_timeLeft/60);
// Remove minutes used from _timeLeft
if (_minutes > 0) then {
_timeLeft = _timeLeft - (_minutes * 60);
};
// Seconds remaining
private _seconds = round _timeLeft;
private _hStr = "";
private _mStr = "";
private _sStr = "";
// Setup strings for all time
if (_hours > 0) then {
_hStr = format ["%1 Hour(s) ",_hours];
};
if (_minutes > 0) then {
_mStr = format ["%1 Minute(s) ",_minutes];
};
if (_seconds > 0) then {
_sStr = format ["%1 Second(s)",_seconds];
};
// Return the whole string
format ["%1%2%3",_hStr,_mStr,_sStr]
Well
It's still just doing it instantly
here:
for "_i" from _TimerAmount to 0 do {
if (_TimerAmount < 60) then {
ctrlSetText [1000, format ["%1 seconds!" , _TimerAmount]];
} else {
ctrlSetText [1000, format ["%1 minutes" ,floor (_TimerAmount / 60)]];
};
sleep 1;
}; //This activating instantly, not taking into account the number in _TimerAmount at all.
simple version would be
private _seconds = 150;
private _strTime = (str (floor (_seconds/60)) + 'm ' + str (_seconds mod 60) + 's');
I like the only seconds when < minute 'tho
I just don't get why the loop wont work
No errors
nothing
Before, the parseNumber would set it to 0
so I've got a feeling it's do that for some reason
uhh
you didn't specific the step
for '_i' from 150 to 0 step -1 do {
systemChat str _i;
};
@brave jungle
I have though
Look:
params [_time];
_TimerAmount = parseNumber _Time;
hint str _TimerAmount;
sleep 1;
"CUR_Countdown" cutRsc ["CountdownNotification", "PLAIN", -1, true];
for "_i" from _TimerAmount to 0 do {
if (_TimerAmount < 60) then {
ctrlSetText [1000, format ["%1 seconds!" , _TimerAmount]];
} else {
ctrlSetText [1000, format ["%1 minutes" ,floor (_TimerAmount / 60)]];
};
sleep 1;
};
playSound "Transition3";
["<t color='#ff7635' size = '1.2' font = 'RobotoCondensedBold'>THE COUNTDOWN HAS ENDED!</t>",0.01,(safeZoneY + 0.05),3,1,0,90]spawn bis_fnc_dynamicText;
_time comes from a dialog
well, an rscEdit
but same thing
for "_i" from _TimerAmount to 0 do {
// replace with
for "_i" from _TimerAmount to 0 step -1 do {
Oh I didn't see that bit
lol
what's that for so I know when to use it?
next time*
If u don't define a step, it will be step 1
if step is positive, it will check if (_i > 0) exit inside the for
if it's negative it's opposite
oh
your immediately exited, because step was positive ๐
Does ctrlSetText work for you right now?
I thought the primary syntax only works with like uinamespace or sth along those lines
oohh
nvm
it's display vs dialog
Well
The cutRsc isn't showing rn
because it was in rscTitles
instead just a base class
but if that the next issue
then i'm going to kms
xD
nvm saw the last part of yours
ignore ^
Alright next problem
xD
I don't get rscTitles
I ahve:
class rscTitles {
class CountdownNotification {
duration = 999999;
idd = 4000;
movingEnable = 1;
enableSimulation = 1;
class Background_1: IGUIBack
{
idc = 2200;
x = 0.938391 * safezoneW + safezoneX;
y = 0.137 * safezoneH + safezoneY;
w = 0.0618905 * safezoneW;
h = 0.033 * safezoneH;
colorBackground[] = {0.137,0.137,0.137,0.75};
};
class Background_2: IGUIBack
{
idc = 2201;
x = 0.938391 * safezoneW + safezoneX;
y = 0.137 * safezoneH + safezoneY;
w = 0.0618905 * safezoneW;
h = 0.0055 * safezoneH;
colorBackground[] = {0.03,0.51,1,0.75};
};
class CountdownText: RscText
{
idc = 1000;
text = "133456"; //--- ToDo: Localize;
x = 0.941466 * safezoneW + safezoneX;
y = 0.144296 * safezoneH + safezoneY;
w = 0.056733 * safezoneW;
h = 0.022 * safezoneH;
};
};
};
Nothing is displaying, using
"CUR_Countdown" cutRsc ["CountdownNotification", "PLAIN", -1, true];```
no error either
dont controls need to go in class controls {} or one of the other control classes?
Well it said I needed to define it in rscTitles to use cutRsc - Need to display a small box on the right
Unless my syntax for the rscTitles is wrong?
yeah you're correct
it's showing it now
ty
What does -1 and true do
I just use the first 2
class ControlsBackground
Also this @brave jungle
cutRsc [class, type, speed, showInMap]
@brave jungle try this in the debug box when the resource is on the screen
findDisplay 4000
alright
put this under where the idd is defined
but replace the variable name
onLoad = "uiNamespace setVariable ['respawn_rsc_deadMid', (_this select 0)];";
btw that ^ thingy is just one structured text with ctrlCreate
ohh
ctrlCreate should return your control
I just did the onload and then
_displayM = uiNamespace getVariable "respawn_rsc_deadMid";
_control = (_displayM displayCtrl 2003);
_control ctrlSetStructuredText parseText (_text);
i'll go test it
gl ๐ค ๐
post the config and code again
Description.ext:
class rscTitles {
class CountdownNotification {
duration = 999999;
idd = 4000;
onLoad = "uiNamespace setVariable ['CUR_CountdownVar', (_this select 0)];";
movingEnable = 1;
enableSimulation = 1;
class controls {
class Background_1: IGUIBack
{
idc = 2200;
x = 0.938391 * safezoneW + safezoneX;
y = 0.137 * safezoneH + safezoneY;
w = 0.0618905 * safezoneW;
h = 0.033 * safezoneH;
colorBackground[] = {0.137,0.137,0.137,0.75};
};
class Background_2: IGUIBack
{
idc = 2201;
x = 0.938391 * safezoneW + safezoneX;
y = 0.137 * safezoneH + safezoneY;
w = 0.0618905 * safezoneW;
h = 0.0055 * safezoneH;
colorBackground[] = {0.03,0.51,1,0.75};
};
class CountdownText: RscText
{
idc = 1000;
text = "133456"; //--- ToDo: Localize;
x = 0.941466 * safezoneW + safezoneX;
y = 0.144296 * safezoneH + safezoneY;
w = 0.056733 * safezoneW;
h = 0.022 * safezoneH;
};
};
};
};
Countdown file:
_TimerAmount = _this select 0;
hint _TimerAmount;
sleep 1;
_TimerAmount = parseNumber _TimerAmount;
hint str _TimerAmount;
sleep 1;
"CUR_Countdown" cutRsc ["CountdownNotification", "PLAIN", -1, true];
_displayM = uiNamespace getVariable "CUR_CountdownVar";
_control = (_displayM displayCtrl 2003);
for "_i" from _TimerAmount to 0 step -1 do {
if (_TimerAmount < 60) then {
_control ctrlSetStructuredText parseText format ["%1 seconds!" , _TimerAmount];
} else {
_control ctrlSetStructuredText parseText format ["%1 minutes" ,floor (_TimerAmount / 60)];
};
sleep 1;
};
playSound "Transition3";
["<t color='#ff7635' size = '1.2' font = 'RobotoCondensedBold'>THE COUNTDOWN HAS ENDED!</t>",0.01,(safeZoneY + 0.05),3,1,0,90]spawn bis_fnc_dynamicText;
"CUR_Countdown" cutRsc ["CountdownNotification", "PLAIN", -1, true];
Okay I tihnk I know what's wrong, but I'll give you debug tips
Until you figure it out
Ohh :c
uiNamespace getVariable "CUR_CountdownVar" put this into the debug console
What does it return?
It returns CountdownNotification 's IDD, which is 4000
(uiNamespace getVariable "CUR_CountdownVar") displayCtrl 2003
we know the display works, so let's check the control
๐ค
So there's no control for it to set the text
Let's read the code
Make sure there is not an error in the code
(uiNamespace getVariable "CUR_CountdownVar") displayCtrl 2003
class CountdownText: RscText
{
idc = 1000;
๐ค
Control #1000
There you go
yup
yeah. Give that a go
Don't be afraid to just reload with a small change, it's not like it can break your computer or game
Unless you do a while true saveprofilenamespace
You will be fine
For a quick debug, you can also put
systemChat str _control;
in the code, so u can see what it is
Yeah
So, did that fix it?
Well adjusting the code via the script too, still not doing changing the it from default
it's found the control
But text is not changing?
Yeah
try it in the debug box:
((uiNamespace getVariable "CUR_CountdownVar") displayCtrl 1000) ctrlSetStructuredText parseText 'TEST TEXT';
Now you will discover that it still does not work
or does it?
It doesn't
Since the control is found successfully
And it doesn't change the text
We can deduce that the control does not support structured text
class CountdownText: RscText
Ha
Afaik rscText is not structured
To change that
type = 13;
under the idc
Try that
Default text removed, instead blank with an error: No entr ...\Filepath\rscTitles\countdownnofication/controls/countdowntext.size
So I need to add a size into it and adjust it
Look at the link I posted
YOu are missing a parameter that's shown in the link there
You have to define it for it to work
Im not sure which ones are mandatory, but the example probably has all of the mandatory ones and some extra too
Properties
oh i guess these are mandatory
Okay text is now displaying, however it's staying at the number passed
nvm
it's not reducing the number
Tehre we go
reducing number :3
HOw to remove it? using default doesn't work
on cutRsc
@fluid eagle any advice on places to learn the commands -> https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3
Thank you Nigel btw :3
"rscLayer_respawn_deadMid" cutFadeOut 0;
'CUR_Countdown' cutFadeOut 0
No problem @brave jungle
โค
ui thingys is fun ๐
ui with arma dialog creator are so easy ๐
First time making a resource, usually I can get away with not needing control as a param for syntax ๐
๐ค
PlayerA setvariable [target, PlayerB]
Player B dies,
playerA getvariable target
What happens
Also what if playerB respawns
check workshop, there was "Template UI Controls" by Karel Moricky, that will helps @brave jungle
player addEventHandler ["Fired", {
_this call ten_fnc_test;
}];
ten_fnc_test = {
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_pr", "_gunner"];
_vu = vectorUp _pr;
_vd = vectorDir _pr;
_vel = velocity _pr;
_pos = getPosASL _pr;
deleteVehicle _pr;
private _veh = "C_Offroad_01_F" createVehicle [0,0,0];
_veh setposASL _pos;
_veh setVectorDirAndUp [_vd,_vu];
_vel = _vel vectorMultiply 0.1;
_veh setVelocity _vel;
};
@orchid timber pls no shoot tankevacs
@peak plover Thank you so much for this!
Haha, have fun ๐
What about launching USS Liberty' attached to like a quadbike?
sounds crazy enough?
yeah ๐
*Arma facepalming animation intensifies*
btw if you like trains, you can trasform your quad into this > https://gyazo.com/6fdc13078eaabdb7dbc391bae2d6cfac
but anyway, the weirdest and funniest thing what i saw, is still > "the goats paratroopers" ๐
@winter rose i ended up figuring it out, wanted a waypoint to pop up and stay on the ground at their feet for a sort of foxhunt style thing. Tjanks though!
@still forum. Thank you!
good thing! ๐
Is the qilin a type of "Car"??
yes
Okok, Ty!
so how do i go about editing groups of units. i've been still reading the wiki and i'm not able to understand it enough to do whatever i want. like lets say i want to hide a group of units. do i click the group and add a variable in the main init box? or do i have to add them to a group with code?
How do I find out who is disconnected from the server?
@fair drum you can use โvariableโ in group parameters (in 3DEN) like for any object, and use โunits <group>โ command with forEach cycle and hideObject
ah ok so "units" is the important part im missing. cause i was doing hideObject group and it was returning got group expected object
what other ones are there other than "units"?
@fair drum only units if you need to get all units in group
well i mean is there a "vehicles" or stuff like that?
well i guess that would be under units itself as well
@fair drum if group has assigned vehicles then need use vehicles select { group _x isEqualTo myGroup }
{
if (markerColor _x == "colorBLUFOR") then {
propaganda_targets pushBack _x;
};
} forEach allMapMarkers;```
Has anyone got any clues as to why this would not work in MP?
Works fine in SP
And yes there are markers on the map within the parameter
@rugged tangle what are you do with โpropaganda arrayโ?
A marker is selected randomly from it to be a target for a mission
But the array is just empty
@rugged tangle print all markers and it color, this code must work in MP
@rugged tangle and where this code is call? init.sqf, unit-init amd etc?
For now, just global exec from debug console
But that bit is only ran on the server
@rugged tangle hmmm, โglobalโ button must execute code on all computers
Yeah but the code is inside a isServer check
@rugged tangle ok, then only on server
@peak plover thanks man ๐
@rugged tangle where you checking that array is empty?
@strong shard I've got a diag_log which outputs the array to the server's .rpt
Comes up empty
@rugged tangle try diag_log allMarkers; diag_log (allMarkers apply { markerColor _x });
@rugged tangle mb no markers on server or no markers with โcolorBLUFORโ...
@strong shard Oh shit, I think you may have just solved it. The mission has the markers initially as opfor-colored but they are changed with setMarkerColorLocal to blufor-colored. So I assume the server still has all the markers as opfor-colored, hence the empty array.
Now how to get around this..
setMarkerColor (not local)? Or just put setMarkerColorLocal to any code on server
Yeah I'll figure something out, thank you so much for your help man
@rugged tangle also for your code will be good to use: array = allMarkers select { (markerColor _x) == โcolorBLUFORโ; }; - it is simple and faster
so i have this
// Definition for each sound class informant { name = "informant"; sound[] = {"\voices\informant.ogg", 1, 1, 50}; titles[] = { 0, "test", 1, "test2" }; }; }; };
how would i go about labeling the subtitles so it says informant: test rather than just test
@fair drum informant say โinformantโ; not working?
@strong shard im currently doing informant say3d "informant"
and its not labeling the title, just writes the text out on the screen
@fair drum Then just add โinformant: โ to titles ๐ or write your own titles by any function or *Chat commands ๐
@fair drum try this https://community.bistudio.com/wiki/BIS_fnc_sayMessage
@strong shard im trying to copy the subtitles like this https://youtu.be/Dv7RigZeut4?t=2m14s, but he uses a different way. was wondering if its possible my way through description.
if i add informant: then it wont be that blue color. I guess i could cope since im not a coder by any means
Hey, did some one knwo how to change the HEMTT cover skin?
this setObjectTextureGlobal [0, "tarfu_scripts\skin_changer\skin\hemttmil.jpg"];```
@fair drum if no one is working then try this: titleText [format [โ<t color=โ#0000ffโ>Informant:</t> testโ], โPLAIN DOWNโ, -1, true, true]; (just replace this non ASCII quotes)
Which layer is it?
any major textures should be paa. Cuz mipmap and compression and stuffz.
Probably not
Not all vehicles have to be retexturable
Yep, I export my textures at paa files, but only the final version
I think It's not retexturable so
@silk sparrow check if it in hiddenSelection/hiddenSelectionTexture for your vehicle - this is all textures that can be retextured by scripts
im still strugging with the foreach command sometimes... is this correct? {_x setcaptive true;} forEach [crew truck1, truck1D]
no
crew returns array
ARRAY setCaptive true is probably not valid
you probably wanted crew truck1 + [truck1D]
ok i didnt know that + and - stuff were valid things to use
Hey guys, I am trying to adjust a script. But I can't find out how I can add another NearestObject to it.
_smokeShellThrown = nearestObject [getPosATL player, thrownSmokeShell];
_curPlayerInvulnState = player getVariable ["isAdminInvulnerable", false];
_smokeShellThrown distance player < effectDistance
&&
velocity _smokeShellThrown isEqualTo [ 0, 0, 0 ]
&&
!_curPlayerInvulnState ```
there is only one smokeShell.. So what is the other nearestObject supposed to do?
I like to add another instance where _smokeShell = nearestObject [getPosATL player, launcherSmokeShell]; is added
Not sure If it could be done in []spawn or that I should just copy the script and add _smokeShell to it.
๐ค
_nearHava = (nearestObjects[player,["Air"],25]) arrayIntersect playableUnits;
if (count _nearHava > 1) exitWith {hint localize "STR_NOTF_AirNear"};
this is not working what is problem ?
Does anyone know of any way to view all running scripts?
I'm not sure how this helps me?
sorry
@cosmic root check this https://community.bistudio.com/wiki/diag_activeSQFScripts
Outstanding, exactly what I was looking for
oooh, didn't know this one!
*checking* nope, no Alzheimer here ๐ ๐
๐
now I added my touch ๐ซ๐ท
Hey boys, is it possible to overwrite item names of certain items? Like "Smoke Round (White)" -> "BIg smoke round (White) ?
Without the use of mods.
no
though ... maybe some inventory hacking is possible
but that would be fairly complicated
I believe you can overwrite configs with scripts, somehow. Maybe? I did play on a server that had unique items on it.
you cannot overwrite configs with scripts
You can create your own inventory
And just use an imaginary config
Hey all, I'm trying to use a trigger to reveal a plane to an AA gun and then have it target and fire
It works in SP, but the AA gun is just sitting there when I test it in MP. Any clues why?
@peak plover addDisplayEventHandler mouseZChanged for scroll and mouseButtonDown/Up/Click/DblClick for press
@peak plover and findDisplay 46 if you need to get this events without any custom display
I need help too @strong shard ๐
It's not really a full fledged script, just a couple lines of code in a trigger that aren't executing properly
pasta
g1 reveal [p1,4]; g1 doTarget p1; g1 doFire p1;
G1 is a flak gunner targeting a C-47 "p1". I'm making a D-Day drop and will have several AI planes around my guys getting targeted and shot down
Where is the script?
I said it's not a full fledged script, just some lines of code in a trigger that isn't executing in MP
I'm asking if any of you scripters know why it isn't working, and what I need to do to make it work
Where is it
Is it in your init.sqf
Is it in your desktop in a text file?
Is it in a init box
Oh! It's in a trigger's "On activation" condition
What's the condition?
Independent present in the trigger area
It's so once they get a certain distance from spawn, they are revealed to the flak gunners
So I'm not sure why it's not working when testing in MP.
@tough abyss in SP it is work?
Yes @strong shard
I'm assuming it has something to do with tracking being diff on MP, but I have the trigger set to server only so I don't know
@tough abyss flak mb not local for server
So what do I need to do?
@tough abyss first, remove โonly serverโ
I tried it without only server
And try
Also, the Flak is a gun from a mod. Not a flak script
@tough abyss scripted is better, player will not see diff between scripted projectiles and explosive and AI-controlled gun
Thing is they're attacking AA positions though
Is there any way to prevent players from being ejected from vehicles automatically when they take take damage?
you cannot overwrite configs with scripts heh...
Well, can you ? ๐
it would be great and terrible at the same time
anyways
What can you do to make ai more aggressive as a whole?
So far I am setting the courage for units to max, disallow fleeing and disable suppression in a XEH on them.
So far disabling FSM and/or cover on them has been a mixed bag.
Any ideas?
I really do not want to write my own fsm
if there only would be a EH for behavior...
I can yes.
And I'm personally more on the "terrible" side than the "great" side if I would release that to the public.
I guess
tbh I'd be really interested in craeting config entries on the fly, but that woul really just open the doors to hell in some cases.
Anyone know the reason why I'm having issues using ctrlSetFontHeight with RscStructuredText? ```SQF
disableSerialization;
_display = findDisplay 46;
_textCtrl = _display ctrlCreate ["RscStructuredText",-1];
_textCtrl ctrlSetPosition [safeZoneX + safeZoneW * 0.008,safeZoneY + safeZoneH * 0.65966667,safeZoneW * 0.4125,safeZoneH * 0.18333334];
_textCtrl ctrlSetStructuredText parseText "Line 1 Test <br/> Line 2 Test";
_textCtrl ctrlSetFont "TahomaB";
_textCtrl ctrlSetFontHeight 0.5;
// I've also tried '_textCtrl ctrlSetFontHeight parseText 0.5;' but it just returns with a script error "Error Generic error in expression"
_textCtrl ctrlCommit 0;
using _textCtrl ctrlSetFontHeight 0.5; returns no errors, just doesn't change the size of the font.
Seems that ctrlSetFontHeight only works with RscText controls. Or there is a certain type of syntax that is required that I'm not aware of.
wait nvm im an idiot
structured text uses <t size>
@still forum with pure Scripting and no addons? Did I missed something?
_textCtrl ctrlSetFont "TahomaB";
_textCtrl ctrlSetFontHeight 0.5;
private _stringText = "<t size='1.52' align='left' font='PuristaMedium' shadow='1' shadowColor='#ff0000'>Text<br/>More text</t>";
_textCtrl ctrlSetStructuredText parseText _stringText;
```try this way ^
and check this > https://community.bistudio.com/wiki/Structured_Text
@modern sand
Yer appreciate it, for some reason I forgot about structured text's operators. lol
If I have preInit/postInit in CfgFunctions in what order they are they executed?
Alphabetically or in the same order they are defined?
preInit first
then postInit
If you want to know more about it, check this out https://community.bistudio.com/wiki/Initialization_Order
order they are defined
aka requiredAddons
atleast.. The first level subclass of CfgFunctions is ordered by the order the config was loaded
aka requiredAddons.
every level below that.. Also in order they are defined from top to bottom I think. But not 100% on that
Ty.
does anyone know from top of their head if reading from local/global variable is faster than reading from config? (if you know how much roughly, even better)
(use case - reading hitpoints from units)
if anyone knows, it's @still forum ^^
I think local var faster than global var faster than config
yes
looooots faster
Especially if the scope where the local variable sits is close to you
for example. Global variable is one hashmap.
configFile is one. >> "CfgVehicles" another one. >> "vehicleClassname" another one. >> "hitpoints" another one.
Atleast I think config's are hashmaps
so ideally i should put all relevant config properties i check on every hit into a local variable on the vehicle i guess?
local variable is a variable that starts with _
var on vehicle is just normal variable I'd say
And it depends.
Will you have 50 vehicles of the same type where everyone will have the same config property variables on it?
yeah i meant the getVariable stuff^^
ideally you would hardcode the hitpoints in the EH code I guess
i have a vehicle damage script (for dealing with internal damage). A handledamage controlls it all and most of it is driven by config values (esp. the custom hitpoint parameters ) to allow easy flexibility
Second best would be to store them either in a variable in missionNamespace. Or in a custom namespace (CBA can do that).
Next then IMO would be saving it on a variable on the vehicle. But again 50 vehicles with all the same variables is a waste of memory
I would personally use custom namespace. And a caching script.
Aka do I know the hitpoints for this classname? If yes get them from variable. If no then grab from config and put them in a variable to get them faster next time
whats the difference/ benefit of custom namespace over missionNamespace?
custom one is not as full as a missionNamespace
and you are free to use whatever variablenames you want in there without having to worry about collisions with other peoples variables
also you can safely use allVariables to get everything you stored in there in case you wanna iterate over it or find variable names that you don't remember for whatever reason
I did some testing of precalculating the nearestTerrainObject and at 10m intervals the 2d array cloud of data for Altis comes out to just under 20MB of text and took about 50 seconds to process running scheduled without any sleeps.
So I am looking into using 1KM based caches driven from the positions produced from allUnits. These partial caches should be substantially faster to calculate, take up less RAM and ultimately allow higher resolutions so long as the entire terrain isn't used in a session, but even if it is so long as its progressive it will spread the processing out a bit
nigel is doing something similar for his AI caching.
Big like.. 10km radius caches. Smaller 1km caches inside it.
The alternative I looked into was loading dynamically from SQF but I kind of need more information than the worldName to be able to ascertain if the version has changed so it involves going from terrain name to the config entries for the mod in which it came from.
I would then be talking about either sitting here and doing a bunch of precalculating myself and storing that in the mod and presumably making a mechanism for mod authors to also include it in their mods. Not worth it at this point I think.
According to Steam workshop CF_woodland has come out as vastly more popular than CF_BAI anyway at this point ๐
steam workshop popularity is self-fulfilling prophecy. Slightly more popular mod on start will get more views and more downloads because it ranks higher
Hey, I;'m looking to start getting into scripting for ArmA 3. I have almost no scripting exeperience. If you guys could direct me on how I should start with everything. Thanks.
Maybe start on the SQF Syntax page and go from there - https://community.bistudio.com/wiki/SQF_syntax that will give you the overview of the language but it is a bit of a step from that to a fully functional mod
Depends on what background you already have
I have an AI element that I essentially want to chase players, so the closest player that they know about, they chase, after they discover any players. What's the easiest way to do this to start?
Would it be using playableUnits?
lul. That's the Intercept example project. Well chasing the player not nearest player
Intercept?
so the closest player that they know about -> know about -> https://community.bistudio.com/wiki/nearTargets that returns all nearby known units
Very. Friggin. Interesting.
just iterate through them and find first isPlayer
https://community.bistudio.com/wiki/findNearestEnemy that only returns enemies sadly. But it does exactly what you want besides that enemy thing
Since I have the AI and players on hostile factions, that command will work for me, then, right?
What are your trigger conditions? Are your triggers script placed or placed in editor? Are they placed on server only?
Placed in editor
Activated when Independent is in the trigger area, and reveals the location of plane to anti air guns, orders AA gunner doTarget, and then orders AA gunner doFire
And not server only, although maybe that's what I need to do?
Setting the triggers to server only will save you some heartache in the long run, but shouldn't have anything to do with whether or not the triggers are activating.
Have you tested the scripts in a standalone environment and they worked? Have you tested them on the dedicated server as radio triggers?
It's not even a full script that's why I'm really confused on what could be going wrong
it's just g1 reveal [p1,4]; g1 do Target p1; g1 doFire p1;
And yes, they work on standalone
Okay, then test two or three if it's working there should be to try it as a radio activated trigger on the dedicated server.
Yeah it's not working on the dedi that's the thing that's confusing me
Have you tried it as a RADIO trigger on the dedicated, bro? That's an important question if you want help isolating the issue, and it requires a direct yes or no. I know it's not working on the dedicated server, I'm asking if you've tested it as a RADIO trigger.
No
Okay. Try that, then come back. If it works or doesn't, that tells us more about what's going wrong.
I haven't used radio triggers much but aren't those for selecting something out of your command menu?
And then when you press whatever in the menu, the trigger event happens?
Yep. That's it.
That's not really what I'm needing though. I'm not commanding the AA
Dude. I know. Do you want help or not? This is part of the problem solving process.
Did I say to change your trigger for your mission and deal with it or did I say to test it?
If you can activate it as a radio trigger, then that tells us the problem is not your code, but the trigger detection. If it does not work, then it tells you that the problem is in your code.
This is how we isolate the problem.
Once we understand the problem, we can seek a solution.
Okie, where is the radio trigger in Eden
Yeah, no luck with radio
Okay, that means that for one reason or another the script itself is what's broken. Now that you've done the prerequisite work, I'll try to find a solution for you. May take several minutes.
It works in SP, but not MP
Just tried that
Perhaps something with tracking the planes movement on each client is messing the AI behavior up?
This script is inside your trigger field?
g1 reveal [p1,4];
g1 do Target p1;
g1 doFire p1;
There is an AA weapon system with variable name g1 and then a plane with variable name p1, correct?
I have no idea. That's a possibility as far as I know, but I can't say for certain. I usually don't know what a problem actually is, I just isolate it, mess with it, and eventually it works.
The gunners name is g1 but yes
When you are testing in multiplayer, are you just testing in 3Den multiplayer or are you testing on a dedicated server?
Okay, gunner is g1. Gotcha. Working on it now.
Dedicated server.
Maybe the trigger isn't going up for some reason?
As in height wise,
If you tested with a radio trigger and it didn't work, then it has nothing to do with area activation, that's why we did that test, remember?
Gotcha
Should do Target be doTarget?
Yes
That's a typo I made in here, not in the actual trigger
Maybe an AI line of sight issue, actually. Let me try setting it to day time and no overcast and see what they do
Drats. Sorry, @tough abyss, my dedicated server is not updated right now and I don't have time to get it squared away before I have to go to work.
I figured it was just a typo, had to check.
Good luck.
It's okay, thanks for the help
I have an AI element that I essentially want to chase players
@shadow sapphire check this > https://community.bistudio.com/wiki/BIS_fnc_stalk
@meager heart, holy. Balls. That's like exactly what I need, haha. Thanks so much!
๐
Is there an easy multiplayer substitute for player?
player works fine in MP?
Oh? That's good! This page confused me because I didn't read it right: https://community.bistudio.com/wiki/player
the fact that the value is different on every client, is because each client has it's own player
๐
"...and on dedicated server this value is null"
So I for some reason was thinking that meant it didn't have a value for anyone on the server. Just dumb sometimes.
yes, if you run player on isDedicated then theres no player
ahk
yep you're dumb
๐๐ป
So, if I run this on the server with an appropriate end condition, then it should be groovy?
[_G1, group player, endCondition, _base] call BIS_fnc_stalk;
So I for some reason was thinking that meant it didn't have a value for anyone on the server That's true.
player is the local player. A server doesn't have any local players at all
Interesting...
So apparently the trigger is doing SOMETHING on the dedicated server.. hmmm
Did you throw a hint in there?
Indeed...
Like they're not aiming but are moving a little bit up and a little bit down. I laughed when I saw it
Throw a hint in there until you get it figured out. Sorry for not thinking of that earlier.
Very simple, anybody have a very good arsenal script?
Would this work to cycle through each unit of each group? How should I test that?
_Platoon = [_G1,_G2,_G3,_G4,_G5,_G6,_HQ];
@sinful sparrow, do you mean a specific type of arsenal? Like a virtual arsenal, or a decorative arsenal, or a decorative arsenal with inventory?
What do you mean decorative?
Im running a OP Tommorrow and Im creating a scenario. First time I'm gonna script one
Compared to a virtual arsenal, which would just be hypothetical gear in a box, a decorative arsenal would include weapon racks with weapons on them, stacks of ammunition crates, etc.
ah
OP meant observation post when I was in the military. Why do people in Arma tend to capitalize that? An op means an operation. An OP means an observation post.
ah, Operation
Doesn't matter. Just see that all the time and wonder where it started.
So is there a way I can put a teleportation script on a object which leads to another object?
Yes. It's pretty easy, actually, but if your operation is tomorrow and you've never scripted one before, I highly encourage you to just grab one or two mission management mods and build the rest in 3Den or run it via Zeus, because brother, you're in for a headache if you think it's going to work as intended on your first outing.
huh
Arma scripting is a super bitch of a bitch. One despicable animal for even experienced coders.
I have achillies which gives me some stuff
Achillies is great, it has teleportation built in.
The Zeus stuff, I might just use that then
How can i build sonething in zeus and be able to put it in the 3den editor?
If you want to give your guys an immersive experience, maybe give yourself some rules, either just personal written rules, or experiment with 3Den and limit yourself to a certain number of points you can spend and when/where you can edit things.
It's possible to capture Zeus built stuff and place it in 3Den, but it's not very easy unless you find an already created capture script, which I haven't found. It IS however easy to build in 3Den and use that as the start/blueprint for your Zeus mission. It's FAR easier to learn 3Den than scripting in a single day.
Test thoroughly. Test on dedicated. Test for unexpected dumb shit. For some reason, last time I tried to help run a Zeus operation, no vehicles on the server would move. You could get in, interact, but they would not move over about one mile per hour. It was tragic and the reason was never discovered.
Ok so it has to be the server is having tracking issues
Good problem solving. Good deduction, @tough abyss.
Lol too bad I don't know how to fix it
But! Narrowing these things down makes it much easier and quicker, therefore likely, that you'll find someone on here who can help fix it.
The guys in my unit dont even know whats going on with it lmao
Is the dedicated server on your home machine or is it off site?
No it's my unit's server
Ah, I see. There are always problems with Arma.
The AI isnt spazzing out on the LAN test in Eden
When I build a mod using pboproject, should I expect the .hpp files to be gone?
Anyone able to help me real quick?
Got a script refusing to work if I use spawn OR call.
the functions I mean
@brave jungle how you will execute it?
Via a Dialog action
So on button clicked
From that, an execVM
sorry missed the last one ^
@brave jungle Why you need to refusing other methods of exec?
well it's a sqf format, i've always been told by people to just use execVM
Sorry changed a little ^
@brave jungle it is not good, execVM perform load file, compile code and spawn it it is not fast and easy for PC
And it on each execVM even file is already execVMโed
Not being rude, I don't understand what you mean
Your English isn't great is what I mean
@brave jungle my English is very bad ๐ not main language
Ah
shall I show you what I got?
might help
//Dialog control action
action = "_Time = ctrlText 1400; [_time] execVM ""Curious's Framework\scripts\misc\features\countdownTimer.sqf""; closeDialog 0;";
So it's skipping _TimeAmount
When I used call, I tried using private ["_TimerAmount"]; but it still skips the whole loop
Error: _TimerAmount undefined variable in expression
Condition in first โifโ is wrong, you write โassign operatorโ, not โcomparisonโ
ExitWith canโt be used without if >> must be if (cond) exitWith {};
Not if (cond) then { exitWith {} }
Ah
Well I just added that, didn't test that specific IF statement before copying and pasting in
Hell, it's even in the wrong place, I need to be breaking the loop.
alright i've updated it with how it should have been
@chilly hull yes. By default they are gone. You can configure that in pboProject options
im trying to have a weapon + minedetector in a vehicle for the player to pick up. there is a task that say so. i want to complete that task. how would i go about triggering it. my trigger i have is
player hasweapon "srifle_DMR_01_F"
atm and its not working when i pull it out of the car and equip it
@fair drum (primaryWeapon player == โ...โ) && (โ<mine detector>โ in items player)
Vlad gonna get what I wanted working before coming back to the MP issue
i'll send it back in a sec
hasweapon only works for earlier games doesnt it... man i wonder why the script wiki page has all the arma games in it
whats the use of <> for on mine detector?
@fair drum idk classname of mine detector, <> nothing mean
ok didnt know if that was intended. thx
Okay, I need to have this script exec for all clients in MP, however adding remoteExec on some of the parms nessessary isn't working, it just acts like it's not there, thus ending the script. It comes from a dialog via execVM.
//Dialog control action
action = "_Time = ctrlText 1400; [_time] execVM ""Curious's Framework\scripts\misc\features\countdownTimer.sqf""; closeDialog 0;";
Here is what I have:
StopTimer = false;
_TimerAmount = _this select 0;
hint _TimerAmount;
sleep 1;
_TimerAmount = parseNumber _TimerAmount;
hint str _TimerAmount;
sleep 1;
"CUR_Countdown" cutRsc ["CountdownNotification", "PLAIN", -1, true];
playSound "Beep_Target";
_displayM = uiNamespace getVariable "CUR_CountdownVar";
_control = (_displayM displayCtrl 1000);
for "_i" from _TimerAmount to 0 step -1 do {
if !(StopTimer isEqualTo true) then {
if (_TimerAmount < 60) then {
_control ctrlSetStructuredText parseText format ["%1 seconds!" , _TimerAmount];
} else {
_control ctrlSetStructuredText parseText format ["%1 minutes" ,floor (_TimerAmount / 60)];
};
if (_timerAmount < 15) then { _control ctrlSetStructuredText parseText format ["%1 seconds!" , _TimerAmount]; playSound "Beep_Target"; };
_TimerAmount = _TimerAmount - 1;
sleep 1;
} else {
["<t color='#ff7635' size = '.8'>THE CURRENT COUNTDOWN HAS BEEN CANCELED BY ZEUS!</t>",0.01,(safeZoneY + 0.05),10,1,0,90]spawn bis_fnc_dynamicText;
"CUR_Countdown" cutFadeOut 2;
};
};
playSound "Transition3";
["<t color='#ff7635' size = '1.2' font = 'RobotoCondensedBold'>THE TIMER HAS ENDED!</t>",0.01,(safeZoneY + 0.05),3,1,0,90]spawn bis_fnc_dynamicText;
"CUR_Countdown" cutFadeOut 2;
I tried using remoteExec for call, spawn, bis_fnc_call and bis_fnc_spawn with no luck
all in different places, like on each command and even the whole thing
My priority is for the timer countdown text and UI to show up for all players.
nvm im an idiot deleting.
nice timer there, looks really... advanced ๐
turretUnit < like that
oh thanks
hello everyone! i'm sorry if this question was asked like ten thousand times. i wanted to make precise "hardcoded" AI units movement. is it possible without using unitCapture or any other way? thanks in advance!
is there a difference between append and pushback?
append appends two arrays.
oh nvm - append is for array, pushback for single element
yeah, it clicked the moment i sent message xD
yes they can make it lower, but not higher than server allows - as it states
In a forEach how do I get the number of the variable passed on. For example I have _lines = ["line1", "line2", "line3"] In the foreach how can I check that its line1 its checking? (doing == wont work as they are different values)
https://community.bistudio.com/wiki/forEach
foreachindex?
how i renturn the all items in player inventory?
items player
items only returns medkits for some reason
none of those commands exist
nope, only FirstAidKit.
private _primWeaponItems = primaryWeaponItems _unit;
private _secWeaponItems = secondaryWeaponItems _unit;
private _assignedItems = assigneditems _unit;
private _backpackItems = backpackItems _unit;
private _items = items _unit;
like that ^
@astral tendon
I figured other way to what o want
๐
oh there is also vestItems uniformItems
well... check wiki there is all of them...
Is there a way to create a dummy explosion? like a granade with out damage
AllowDamage false on the units involved, then set it back afterwards
is it possible to override y mouse movement through UI EVH?
I basically need zero y movement and just have rotation of a unit and disallow looking up and down
setDir in loop ๐
๐ฑ
afaik no with eh... but you can try one thing...
player call {
private _camera = "camera" camCreate [0,0,0];
_camera attachTo [player, [0.5,-1,1.7]];
_camera switchCamera "Internal";
};
๐ฌ
yeah but uhh...the player still moves his head up and down ๐
๐คท ๐
it's like a headbanging contest testing this lol
lol
wait could you use that script to help with the head bobbing animation?
well
im not gonna go on maybes so i is scarred
half of this stuff is gibberish to me
since
Im trash
V1sion Has Left the Server
Hi guys. Can I dynamically change config values using scripting? I'd like to set hasdriver = -1 if the gunner is a player and to 1 if the gunner is AI. Can it be done?
Can be done yes. No you can't
Confused
It is possible.
Oh
But you can't. And it's not intended to be possible
^ security hole.
Please share your insight @still forum ๐
Wondering shouldn't bi be notified that this is possible so they can patch it?
Could you give me a hint to how its done?
If you disable battleye. And use 2 third party mods out of which you can only get one. You can edit configs on the fly even with SQF commands
Oh... I c
Nevermind I misread you last response to X39 as "No addons" but it was "Not no addons" ๐
So its not done similarily to how conditions are done in userActions?
Yeah. X39 also misread it
iirc on dev build was some command to reload configs on the fly but only with a3diag... huehue*
@nocturne basalt why not just put a "ghost" AI in the drivers seat that is not grouped to the player when player sits in it?
correct. diag_mergeConfig something
_arr = [1, 2, 3] + 4```
wondering right now ... is this actually possible?
@austere hawk I am using killzonekids one man tank script already. It would nice to skip it altogether by using hasdriver=-1
Only problem with hasdriver =-1 is that AI cant move around
When using kk's script, you will get an AI in there with you if you spawn it with crew
Spawning it empty is much nicer since "move to driver seat' is not available
you should be able to disable crew spawning on config level. Not sure if there is an option for driver specifically to not spawn.
and you should also be able to lock driver seat i think
Yeah but when spawning it with ai only, I want it to have two seats
AI requires 2 to operate a tank
make an init script that checks if gunner is in on spawn, and if so spawn a driver AI for him
Hm could work
But I think kk's script only works if you spawn it in as empty
Then enter it
I know it's a simple syntax error, but I haven't been able to reconcile it yet.
hey guys, me and a couple of friends are trying to set up mods on a server
we need some help, we already set up the command that enables the mods but for some reason it still isnt showing up
@tough abyss #server_admins
thanks
:+1:
So I have a functions hpp that is located at modules\functions.hpp. The functions.hpp is being called back to the main functions.hpp that is in the root directory. But I get a Warning Message: Script modules\life\scripts not found but that actually exists. Here is inside of my functions.hpp thats being called to the main Functions.hpp https://hastebin.com/idupoduyox.scala here is an example of how the structure looks like https://gyazo.com/331af230594518f8bc826df9d0b6e985
(magazines player) //comand
["30Rnd_45ACP_Mag_SMG_01","30Rnd_45ACP_Mag_SMG_01","30Rnd_45ACP_Mag_SMG_01","30Rnd_45ACP_Mag_SMG_01","11Rnd_45ACP_Mag","11Rnd_45ACP_Mag","HandGrenade","HandGrenade","HandGrenade","SmokeShell","SmokeShell","SmokeShell","Chemlight_green","Chemlight_green","Chemlight_green","11Rnd_45ACP_Mag","11Rnd_45ACP_Mag"] ///returns
{_x in ["C2_Mag","DemoCharge_Remote_Mag","SatchelCharge_Remote_Mag","rhsusf_m112_mag","rhsusf_m112x4_mag"]} forEach (magazines _caller)///Still false but get fixed if I remove my DemoCharge_remote_Mag from my inventory and add back
Is there other reliable way to do this?
forEach is not suited to test for something like that
it will only return the very last result
{ _x } forEach [1, 2, 3] //returns 3
{ _x } forEach [1, 2] //returns 2
{ _x } forEach [1] //returns 1
Hi guys , I was wondering if anyone knew a way for calling C# code from the RVExtension function on the C-Side, because I wrote an extension in C# .net core and I wanted to know if it was possible to make it cross platform and not only useable on windows
I read something about coreCLR , but i doubt it is suitable for the use with an arma extension
@jovial nebula check the extensions Page on the biki
Also,.net framework is available on Linux too using Mono
does anyone know the filepath to the Afghanistan flag in Project Opfor?
trying to force the flag texture on some vehicles so they get the flag
@queen cargo Any other option to use?
nvm figured it out, ignore my last
or .NET Core @queen cargo
Could someone help me regarding dedicated server scripting real quick?
Please for the love of something don't use Mono
Hello, i imported some new houses, on arma 3, is there a way to create a "parent class", like "House_F", for them ?
is it possible to Create a ListBox with CtrlCreate? coz in the wiki it only says these
RscText
RscTextMulti
RscPicture
RscPictureKeepAspect
RscEdit
RscEditMulti
RscTree
RscTreeSearch
RscVideo
RscVideoKeepAspect
Yes
From not so long ago, you can use ctrlCreate to create your own controls.
Just make sure they're included in description.ext
RscXListbox and RscCombo too... and more ๐
How do I make this little thing
"This is a test hint for side check" remoteExec ["hint"];};```
here work properly with that ```&& (side group player == west)``` on a dedicated server? The problem is that the game will always throw an error with the way I've typed up the script.
Now if I rip out the ```&& (side group player == west)``` the script works just fine.
player refers to the local player, there is no player on the dedicated server
player is undefined on the server, otherwise it'd consider every player to be the client you are looking to target
so instead if you want to to this from server to target, remoteExec your fnc to the target client
Anyone know how of a way to write data to files?
I think there is a way to do it with ExtDB3 if I remember
I can't for the life of me remember how to do it
probably write an extension. Only file operations I know of with SQF layer is loadFile and HTMLoad
Yeah that's what I figured
I was just wondering if anyone knows any extensions that do it all ready
There is also the iniDB mod which can read and write data
Well, the chances of an extension writing the information that you need specifically are slim. But as BC mentioned above.
how does one remoteExec function to the target client? Add _x somewhere here "This is a test hint for side check" remoteExec ["hint",_x];};?
But even if I do that I'm still stuck with the && (side group player == west)
_x is a magic variable and is used uniquely with different commands. Mind posting your full code?
I'm working on a project where I need to generate a bitmap based on data collected from an arma map
Pretty sure this has been done before with the athena project and sorts Jmaster.
Now that is interesting as I have a similar problem. I am not a big fan of iniDB because of the requirements for install it has
try:
side(group player) == west)
Oh?
I just need something that writes to files so I can work on the sqf side lol
I'm planning on using my own extension
but I don't want to worry about that right now
I have a need to write out precalculated cache data for CF_BAI to speed it up as it makes heavy use of nearestTerrainObjects which is kind of sluggish
This is entirely SQF layer though BC.
I'm basically working on an ai virtualization system
Unless I am confused and you are saying you output to file?
Sounds interesting, what will it do?
saving a bitmap which works as a mask used for pathfinding by the virtualized ai
so virtualized ai would follow roads and respect terrain features
you two should buddy up, see something well come out of it
Interesting, mine is basically a map of forest density for the purpose of changing AI skills
ah lol
well
The project I'm working on is meant to fix some of the issues I have with alive
particularly with ai pathing/virtualization and map indexing
We see less of that with MCC as our missions are more focussed but it is definitely still an issue and I have been doing a lot of work to make defensive behaviour do more sensible things (like fortifying buildings or certain terrain features for a period after conflict is detected)
We run persistent milsims, so we rely heavily on alive's functionality
Have you tried just making your own functionality and see how it tests differently?
Pretty sick of the AI crashing their vehicles into everything too! Had a classic on Sunday where a technical crashed into like the only tree in a mile and the second technical crashed into the first, and the IFV just got stuck and refused to move ๐
MCC may be using a method in which screws with behaviour
MCC is a macro AI system, just sets waypoints and such doesn't get involved at a lower level than that
Use VCOM ai
Spawning though?
We have been using ASR_AI, can't say we saw a massive amount of practical difference between VCOM and ASR
To a point sure, allows for static and grenade tactics to be used
Breaching, denying enemy assets, stuff like that
A friend of mine is trying to combine VCOM and ASR
using vcom for squad level and ASR for individual level
I just viewed them as completely incompatible as they both change the same things.
does anyone know of a way to make two physx objects no collide with each other?
disableCollisionWith
Doesn't worth with physx objects unfortunately
I tried
Huh, that's wack.
yep
it really pisses me off
because it's the only thing stopping me from making a moving carrier fully functional
also, No that isn't fake
Carrier isn't PhysX nor the player though? So what's PhysX entity?
Car
plane or something
everything works
except vehicles lose all their velocity when they touch the deck
and end up floating
I know why that happens
The only fix is to spawn a physx entity under the vehicle and set it's velocity
BUT
then that entity collides with the carrier and looses it's velocity too
Must get stuck and blocks the carrier
Right, but you're still setting velocity of the carrier object collection right now?
or what is your method for doing so?
I tried a couple
The one I did get working had some issues...
I used addforce
and I was effectively able to add the carriers velocity to a vehicle
the problem is friction
it's strange to say the least
vehicles stay still on the carrier deck but act like they are being dragged across the ground
so they flip over sometimes
@gleaming oyster
I'm using the Example 3: script that can be found here: http://alivemod.com/wiki/index.php/Script_Snippets#Detecting_ALiVE_Events
In that script I replace the part
if (_side == "EAST") then {
["ALiVE - objective %1 reserved at position %2 side %3 - id %4!",_objectiveID,_objectivePos,_side,_id] call ALiVE_fnc_DumpR;
};```
with that short script of my own (and now a version with your suggestion, see below) but the hint I want to show just won't display. With your suggestion the game at least isn't giving any script errors
```if ((_side == "WEST") && side (group player) == west) then {
"This is a test hint for side check" remoteExec ["hint"];};```
and handle strangely, as if they are driving at 20km/hr in the direction the carrier is moving
@forest ore Alright, so you do know how to use remoteExec right? As of right now your script needs to be entirely local to the client and it's useless to be using remoteExec unless you want to tell the other players on the server information about a local user.
default target is everyone
we already addressed this earlier, player is local and not defined on server
this is what I'm concern about
I am not sure quite what the intent is, it doesn't make any sense on the server to be asking a question about one player like that, makes sense on the client but on the server you are handling all of the players or AI
If it about one player you mght consider you want to pass it up but can you pass the player object to the server like that? If so why is it being run on the server. Don't know enough about what is trying to happen to work out the alternative way to handle it.
Anyone know of a way to get terrain cellsize with a script?
if(local player) then {
_side = blah;
if(_side == west && side(group player) == west) then {
[format["Player: %1 's side is : %2",name player,_side]] remoteExec["hint",0];
};
};
forgot about that lol
so the ready-made ALiVE script (by Highhead) gets triggered when (in this case) an objective is occupied by side west. When this happens I'd like to relay a hint to all (and only) the side WEST players that an objective has been captured
But I mean the cell size
don't think so
shit
ok
well what would be a good cell size for map pathing lol
10m?
or is that a little excessive
if(local player) then {
_side = blah;
if(_side == west && side(group player) == west) then {
[format["Player: %1 's side is : %2",name player,_side]] remoteExec["hint",west];
};
};
10m is what I use for the forest density, it is an OK approximation.
On altis results in a 2d array about 20MB (in text)
why index everything all at once? The information gets old as you progress?
If you go with a 2D approach then you shouldn't hit into any array limits but just be aware in a single array mapping it will start hitting limits on the bigger terrains
Or are you talking about the actual terrain?
Due to the storage difficulties I have started pursing a partial cache approach instead
But thethen cf_bai can fall back on nearestTerrainObject while a subset of the terrain is calculated
only way to know is to do
I managed to do it with just 1 and moving it if you are doing what I think you are doing :-)
Nah
I want to have a nice colorful map lol
basicially using area markers to overlay a mask overtop of the map lol
Dedmen is typing..
Guessing you've got a intercept plug for this?
for the time being
@astral tendon
(magazines _caller) findIf {_x in ["C2_Mag","DemoCharge_Remote_Mag","SatchelCharge_Remote_Mag","rhsusf_m112_mag","rhsusf_m112x4_mag"]} != -1