#arma3_scripting
1 messages ยท Page 366 of 1
and thanks @little eagle for that, performance will be useful for UI as I want it to be onEachFrame
class RscPicture
{
access = 0;
type = CT_STATIC;
idc = -1;
style = 48;//ST_PICTURE
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
font = "TahomaB";
sizeEx = 0;
lineSpacing = 0;
text = "";
fixedWidth = 0;
shadow = 0;
};
class dialog
{
class controls
{
class Picture: RscPicture
{
text = "#(argb,8,8,3)color(1,1,1,1)";
or
text = "mypicture.paa";
x = 0.46;
y = 0.63;
w = 0.08;
h = 0.1;
colorText[] = {0.4,0.6745,0.2784,1.0};// whatever gives you a thrill
};
};
};
``` this example from BIKI is good?
mission
so you exported base classes with Ctrl + P (or something like that) then imported it in your config ?
noo
ok, let met start Arma
found them and they worked ๐
class RscPicture
{
deletable = 0;
fade = 0;
colorBackground[] =
{
0,
0,
0,
0
};
colorText[] =
{
1,
1,
1,
1
};
access = 0;
type = 0;
idc = -1;
style = 48;
font = "TahomaB";
sizeEx = 0;
lineSpacing = 0;
text = "";
fixedWidth = 0;
tooltipColorText[] =
{
1,
1,
1,
1
};
tooltipColorBox[] =
{
1,
1,
1,
1
};
tooltipColorShade[] =
{
0,
0,
0,
0.65
};
shadow = 0;
x = 0;
y = 0;
w = 0.2;
h = 0.15;
};
``` I think this is the base one for RscPicture
You could've just copy pasted them from the ingame config viewer.
And the only thing I need to leave is x, y, w, h, text, idc, size?
in the class health
if health1.paa is in your mission root, yes
Does anyone know how well setTimeMultiplier works? Not sure what to use for a time and weather system. I know people use this, skipTime and setDate but yeah unsure
it just accelerates time
But it would still provide a smooth time system if you wanted to use it for different speeds at day and ni ght etc
yes, its smooth
you can use an FSM/loop
to set a different time acc for night/day
and it will be smooth
Just updated the SQDev plugin that is now able to detect SQF syntax errors in your complete project for you!
See https://forums.bistudio.com/forums/topic/202181-sqdev-sqf-developing-in-eclipse/
Just send it everywhere?
That's so much cleaner though.
Oh wow, one variable will surely kill it. Does you mission have an intro image?
Does the HC fire initPlayerServer?
Either that or PlayerConnected then.
Send them to the HC via PlayerConnected.
Assuming that fires for the hc. The event passes the id
The cleanest way is to send it everywhere. Otherwise, iterate through all groups and variables on PlayerConnected for the HC.
You can't use ids as remote exec targets before the client connected.
If you do it like this, then the variable will not be on the HC if it connects later.
That's why you'd need a PlayerConnected thing.
And then something like this for simplicity;
ai_clients = [2];
//PlayerConnected if HC
ai_clients pushBack _id
_grp setVariable ['QS_AI_GRP',TRUE,ai_clients];
Let C++ land figure out if the HC's are still there and how many etc.
@cloud thunder do you have a example for workshop mods?
@tough abyss Cheers for the info. Yeah im currently using setDate with weather commands and they dont seem to work well together. It just breaks all the weather transitions etc. Which is why im keen on using setTimeMultiplier
@little eagle Would that actually work if a HC joined after setVariable was used
If the HC dies or that is run prior to HC connect, it might not work
You'd need to iterate through all variables and groups in the OPC eventhandler too as I already mentioned.
Ah, just read up, I only looked at the last message
This is why I said that it's probably better to just send them everywhere and have the JIP stack handle connecting HC's
I'd imagine there's not too many groups, it would probably be detremental to performance (at connect) to handle it like that, I'd take a few ms on the JIP queue lol
i was just wondering, while writing pretty generic functions for an arma mission, was there ever an attempt of a public repo for such functions in the scripting community? people like to write "frameworks" for doing things but those are mostly doing too much or not enough anyways.
CBA.
butt
?
i was thinking broader
and more like something where you pick out a single SQF file because you need it instead of installing a mod
CBA.
what about functions that would require other functions?
wouldnt really work, thats why people group them into frameworks
or CBA
you can just download anything from CBA that you want. And put it into your mission file
yes but cba has a limited scope, i was thinking broader, and more mission specific.
maybe an example would help?
i noticed that most scripters that script stuff for missions re-implement things hundreds of other people already implemented which is stupid.
well mostly around spawning entities in certain patterns and solving the issues around it. i had to write a large script to spawn the uss freedom locally in MP, wrote something to spawn compositions from the editor dynamically in the mission, a whole bunch of scripts to place units in buildings ... all pretty generic stuff any mission maker would maybe like to re-use. you can find "examples" on the internet but its mostly just code sniplets that break quickly in real world usage, outdated stuff and nothing that really has been turned into a reliable, generic function.
Hello, what did I miss?
What you talk about is what the bis functions should provide at best
A base framework
And in the end a reason to use try catch and throw
Nobody ever Rly attempted something like that before and probably nobody ever will
Thats how most people would define a framework
its not my fault you guys suck at defining stuff.
i probably have like 6 different scripts from 6 different people in 6 different missions on my HDD that spawn a damn mine field in a mission.
something that screams "fnc plz" in my mind.
shuts up and goes back to his editor
And they all go about the task differently with slightly different results, some fit one situation while others fit better for other situations
There are a few BIS_ functions that are useful but a lot of them aren't documented very well at all
And some that are written without any thought about how they'll impact the scheduler
Im still trying to get my script from yesterday to work. The new soldiers appear fine at the "tempSpawn" marker but never gets moved. this is used in a script called from expression field in the respawn module.
I get no errors.
for [{private _i = 0}, {_i < _cargoSeats}, {_i = _i + 1}] do {
sleep 0.2;
_man = "fow_s_us_rifleman" createVehicle getMarkerPos "tempSpawn";
_man moveInCargo _newBoat; //does not work
};```
createUnit/createagent & you may also need to add a waituntil isn't null check after creating the ai.
I presume you're respawning boats
add a sleep 0.1 after the createVehicle of the unit
or just move that sleep 0.2 down a line
Don't do that
also it's good practice to create stuff at 0,0,0 and then move to vehicle or position
You'll freeze whereever the code is running for that amount of time
If I remember correctly, creating at 0,0,0 is a lot faster
๐
creating stuff that can explode at 0,0,0 might not always be a good idea.
@waxen tide Riflemans don't explode... usually..
hold my beer.
Create,disable damamge,move to pos,enable damage
Just use a sleep or waituntil etc
Is the respawn module code not called rather than spawned?
I already answered it.. The problem is that if you call createUnit you can only use moveInCargo on the next frame.
We had that same issue a couple days ago
@scenic shard Do you set the _newBoat variable at all? Or is that just an excerpt of what's in the box, post your full code in it
Solution is move the sleep between the unit creation and moveInCargo.
@still forum i know, plus i answered it aswell. I was just commenting the create at 0,0,0 isn't needed & extra work
@zenith totem We talked about that yesterday. _newBoat is the vehicle that was created by the respawn module.
@still forum Sorry I don't have a magical crystal ball that lets me see context lol
I do.
dedmen coded his crystalball himself.
here is the almost full code, after this i jsut assign some waypoints and other stuff.
if (!isServer) exitWith {};
params ["_newBoat", "_pos"];
createVehicleCrew _newBoat;
_newBoat setVehicleAmmo 0;
_grp = group driver _newBoat;
_cargoSeats = _newBoat emptyPositions "cargo";
for [{private _i = 0}, {_i < _cargoSeats}, {_i = _i + 1}] do {
sleep 0.2;
_man = "fow_s_us_rifleman" createVehicle getMarkerPos "tempSpawn";
[_man] joinSilent _grp;
_man assignAsCargoIndex [_newBoat, _i +1];
_man moveInCargo _newBoat; //does not work
};```
init.sqf have
```BoatRespawn = compile preprocessfile "AmbientBoatRespawn.sqf";```
module expression:
```[_this select 0, landing3] call BoatRespawn;```
@scenic shard I told you what's wrong and how to fix it.
@scenic shard
```sqf
// code
trying that now @dedman, hopefully that fixes it. do you know how it comes createVehicleCrew _newBoat; still works?
Isn't createUnit the better command here anyway
One of the specials:
"CARGO" - The unit will be created in cargo of the group's vehicle, regardless of the passed position. If group has no vehicle or there is no cargo space available, the unit will be placed according to "NONE"
Because createVehicleCrew is something completly different?
if (!isServer) exitWith {};
params ["_newBoat", "_pos"];
createVehicleCrew _newBoat;
_newBoat setVehicleAmmo 0;
_grp = group driver _newBoat;
_cargoSeats = _newBoat emptyPositions "cargo";
for [{private _i = 0}, {_i < _cargoSeats}, {_i = _i + 1}] do {
_grp createUnit ["fow_s_us_rifleman",[0,0,0],[],0,"CARGO"];
};
moved the sleep command down but got the same result
between createUnit and the moveInCargo
also yeah I think you need createUnit to get a AI unit
ill try with that instead, they do spawn though. just wont get in the cargo
Fixed it, missed out the "CARGO"
That createUnit command should create the unit in the group, in the vehicle without having to mess around with manually moving the unit in
that worked great, thanks! also seems less resource intense vs createVehicle? i dont even need the sleep and no fps hit
Was the game basically freezing for a split second with the version with sleeps?
no, without them. whenever the units got spawned (have 6 boats that get filled at game start)
unscheduled it'll throw you an error
I'm trying to find out if it is scheduled or not for that EVH
EVHs usually are unscheduled
Which eventhandler?
EH are scheduled
โ๐ฟ
Yay for arma's inconsitencies
What? Since when?
Since forever
It's why on some missions you lag so much when taking damage from fire
Some people try to do way too much with the damage EVH
No I'm not talking about Yay for arma's inconsitencies
I've played non-arma games which lag when you take damage
EVHs are unscheduled
The code boxes in the editor for events are scheduled (aparantely)
which events have code boxes in editor?
must've been some other type of eh
the respawn module it seems from the above stuff
Modules are scripts. Not engine.
They are not eventhandlers
they are scripts. calling other scripts
there is no inconsistency here
Generally things are called, unless they're badly done or scheduled is needed
They are called. Call from scheduled environment
I suppose it's spawned from the unscheduled EVH for the respawn module to stop issues with shitty code from bad editors
What unscheduled EVH do you mean?
The respawn module will be relying on EVHs internally
At some point it spawns something, probably just the user's script
The format used in configs, such as mission.sqm, is [x,z,y], where z and y are swapped around.
wait, what?
That might have changed with EDEN
what pos does eden use btw?
@still forum I mainly have a bone to pick with needlessly spawned code since arma's scheduler isn't the greatest
@zenith totem RespawnVehicle module uses MPKilled/MPHit/GetOut/GetIn eventhandler. And they have to go into scheduled. Because the vehicle module can have a delay. And you can't wait for delay in unscheduled
I cannot confirm that. The scheduler is quite good.
Joke of the century there
I don't know if it was fixed, but it used to change contexts in the middle of scripts if a different script used a different nameSpace
afaik not fixed. Couldn't reproduce a few months ago though when I tried
that's not the schedulers fault actually
It's the scripting engine in general, but the scheduler should make sure the right namespace is in use
That's because the current Namespace is not saved inside the script but inside the gamestate.
Can easilly be fixed with about half an hour of work
But has it been fixed? Probably not
no
I don't know what causes it, but the scheduler with mods is horrendous
Cannot confirm that with the Mods I'm running.
Close to a second script delays sometimes after the games been running for a while
Even longer when I did milsim with that set of mods for some reason
The things is, I know that no more scripts were being run with those missions
It's something in the engine at least
get profiling build and check
I kept track of running SQF scripts
it tells you exactly what scripts the scheduler executed in the last frame
and how long each one took
With the milsim set of mods, it would occasionally clear in a pop and be perfectly fine
Sounds like a lot of magic
Uninformed magic
Scheduler is completely fine as long as you do not fuck up
They are virtual threads in the end...
Spawn threads in any other language and your whole program will blow up too
You have to take care of them like you would do to your own child
You can't blame BI for Mods authors that do shit they shouldn't do
True
There's an engine part to my problems and probably mod author part to my problems
We also had some bad Mods.. So I just fixed them. Problem solved
Where I have complete control over what's running (AL), everything stays butter smooth with only minor general slowdown over time
Also, BIS's ambient animation function is garbage
I rewrote it for better performance because that thing spawns a script per unit
Not any clue what ppl talking about with mayor slowdowns
I used to run missions over weeks without changing the mission or restarting... If your shit slows down over time you fucked up
It is not the engines fault that you have to write good code
And to note: a lot of that stuff bis added as function is indeed garbage
Restart the client and it's fine despite almost the same stuff running
In hindsight it may not be the scheduler itself, but something engine side can fuck over the scheduler
Just like those "language fault" problems...
See... Computers do what you tell them to do and not what you want them to do
Identify what is the root of the problem and fix it
Arma
Arma is the root of the problem lol
Just a thought, how does dynamicSimulation work, is that scripts
That may be a common factor
Obviously... Whole arma community always only can cry out loud and blame arma for any fault
Download performance build and search for yourself
You cause problems because of bad code
You can't create FPS problems with scheduled scripts
Unless the game starts stockpiling ram while you do nothing, it is your fault
You can @still forum
Object creation will cause those
scheduled scripts run 3ms at max
Unless you have a single heavy command in there
you can't.
Wasn't that the per script limit
Basically everything that takes longer than a brief moment can have impact
That is why you are not supposed to use certain commands
No it wasn't.
I don't know why but 50ms pops to the mind
However, there is no need for those fps heavy scheduled scripts
50ms == 20 fps
Dat
Don't know where you got that number from
Either way, that's part of why I hate overuse of spawn
overuseing spawn will prevent you from killing FPS. And now don't come with that saveProfileNamespace or createVehicle.
unscheduled won't make that any better
When you fill the scheduler, i.e. be bohemia with their ambient animation function or a mod doing shitty things, it can take a long time to get back to your script
But you are alot safer in scheduled than unscheduled
If you need very reliable timing then you need unscheduled yes.
But scheduled scripts doing exactly what they were made to do. Is not a bad thing
But please never tell a beginner to go unscheduled.
I'm not telling beginners to go scheduled, it's just knowing when to schedule and when to not
Or to just be aware of the damn thing in the first place
Any way to return the number of Eventhandler added to a display ?
@little oxide AFAIK there is none. Upon creation, I store EVH return in a var.
I want to know, if adding a real EVH to Eden Display or hardcoded to engine ๐ฐ @cosmic kettle
the "player setUnitTrait ["Medic",false];" does not remove the Medic trait of the unit
what i am doing wrong?
But that's for an object. Don't know if this works for displays. I'm sure someone in here will know.
This is what I had in mind before asking the question, thanks for the link @cosmic kettle
No problem, good luck!
@astral tendon it should work. Are you sure it's being executed then? Verify with getUnitTrait
Executed on local?
i put those on a trigger
The command needs to be executed where the unit is local iirc.
how i do that?
remoteexec
look it up on wiki
and post the code you think that will work
learn yourself ๐
@little oxide You can retrieve the number of EH's added via script with a trick.. But that won't show you config EH's
The trick is the BIF link that you already got
have you seen examples?
yes
Hey guys (and girls) i have a weired issues .. i am running a bunch of mixed mods an when testing both locally and on a dedicated server everything worked .. now on a full server players are suddenly unable to get in a vehicles driver .. also moveInDriver and player action ["getInDriver", cursorTarget] is NOT working while player moveInAny cursorTarget puts the player in the driver seat .. any ideas ? (sry to interrupt your discussion)
so how did you came up with such a solution
@agile fiber vehicle locked maybe?
Are all of those mixed mods legit? People like to mess around with borrowers, that's why.
yes they are 100% legit, bohemia approved, payed for and everything you can possibly do ๐
still can moveindriver
moveindriver is not working
spawning the vehicle you can get in .. sometimes one time sometimes 10 times and at some point it just stops
fullCrew vehicle is empty
Haven't tested, so @simple solstice is probably right.
the issue appears with all kinds of vehicles from different mods
i also have another problem, one of my players are invunerable
Thanks @still forum
if (isServer) then {this SetObjectTextureGlobal [0,"images\briefing.paa"];};
this still not working for a player that join in the server
gives a error showing a path to my computer
Hello, I am trying to get a random pos from a center [0,0,0] to a direction (_dir) with an amplitude angle of (40ยฐ)
and radius 200. here the code I wrote to handle this :
[0,0,0] getPos [200 * sqrt random 1, ((random [_dir - 20 , _dir, _dir + 20]) + 360) mod 360];
Is it the best solution ?
plus or minus the _dir
[0,0,0] getPos [200, _dir - 20 + random 40]
yes better because the random is no more gaussian
params ["_pos","_r","_dir","_amp"];
_pos getPos [_r*sqrt(random 1), _dir - 0.5*_amp + random _amp]
depends what better means in this case - distribution or execution time
but the results could be negative and I need a value between 0 and 360
im pretty sure getPos handles that just fine
let me check
i improved it a bit, btw
I assume scaling _r with sqrt([0 .. 1]) was to better space out the points in the distribution space?
sorry for the delay, looks like the this command support negative value ... (thank you wiki https://community.bistudio.com/wiki/getPos)
so yes I your last suggestion
whats it for?
Ask to civilians to move in a direction but with some random
@zenith totem pretty much nobody knows when to go scheduled and when not to go scheduled...
I highly doubt you know
if ((!isPlayer player2) or (isnil "player2")) then {
this moveInGunner car2;
}
what i did wrong?
you first check something on that object. before you check if it even exists.
What could you be doing wrong
You first write an essay. And after writing it you check if you even have a pen in your hand
this "((!isPlayer player2) or (isnil "player2"))"
is give me true
but he does not do this
then {
this moveInGunner car2;
what is this ? where do you put this code?
on a IA init
thats way too early
You check if player2 is a player.. and then you do something with this ... Don't you want to do something with player2?
by the time that runs, player2 might not even be created yet
player 2 is a slot
what i think is happening is that dude runs that code before player2 is created on mission init. so at mission init, the condition will be false, but after, it will be true
do you got some waiting command in hand?
- slaps face * yeah thanks.
this would typically be something to handle in initServer.sqf or something like that
well...
((!isPlayer player2) or (isnil "player2"))
this does not give me any value in MP
the player2 slot is empty
You did completly ignore what I told you
isnil does not do that?
Again.
You are writing an essay with your pen. And after that you check if you even have a pen and notice you don't have one and the entire 20 page essay you just wrote is just empty pages
You should check isNil BEFORE you use it.
not after it
reverting it?
better.
yep. still wrong. But that's a specialty of SQF that I can now explain
or will evaluate both sides of it
it evaluates isPlayer. but player2 is undefined so it errors
to fix that use {} instead of () on the right side of the or
don't use {} on the left side of or!
No. that's not funny.
You fixed the script. So now it works.
That is to be expected.
because i have a trigger with this that works
((player1 in car1) or (player1 in car2) or (player1 in car3) or (player1 in car4) or (player1 in heli1) or (player1 in heli2) or (!alive player1) or (isnil "player1"))
Yes..
because player1 exists.
so that doesn't error
If player1 does not exist this will throw script errors. And the trigger will not trigger. As expected
I was catching up and it was so frustrating to see waitUntil {isNull being suggested after createVehicle. That's pointless, because the thing will never be null. Sometimes I wonder...
its funny, is the player that joins on a playable characer actually BE the AI?
because when my friend kills me its apears the name of the AI
Not sure what you mean, but I can say that your friend is not an AI.
Are you really sure though?
I guess he could be one of those fancy robots from Westworld :p
its happens today, he is executing AI related scipts i made and when he kills me the name that apears is a AI name
LOP Leights OPFOR Pack ?
Quick question here, I can't slip any if statements more than this in the switch statement :
#define MAIN_DISP (findDisplay 46)
#define TAB 15
#define GEAR (findDisplay 602)
if(local player) then
{
MAIN_DISP displayAddEventHandler["KeyDown",
{
_keyOver = false;
params["_display","_key","_shift","_ctrl","_alt"];
switch(_key) do
{
case TAB : {
hint "TAB!";
if(!_shift) then
{player action["Gear",player]; _keyOver = true;};
};
};
_keyOver
}];
};
I understand it's sloppy, first draft. But if I add:
if(!isNull GEAR) then
{
};
in between the tab case and after the shift check, it doesn't seem to continue on
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
DIK_TAB
instead of redefining it?
Dunno what's wrong with the if, but my guess is, that the inventory display simply isn't open yet after action Gear. You play the animation first and findDisplay is kinda bugged where you need to wait a frame for new displays to appear in the array.
Is there a way you could run a script assignment to the file?
Okay, gotcha. Yeah I didn't really know the path to the DIKCodes, so I wanted to do something quick and dirty before going any further
To see if it's actually existing?
Thanks Commy
if (player3 in med1) then {moveOut player3};
there is something wrong here, the code still executes even if player3 is not in med1
if (player3 in med1) still gives false
Check the types?
Is there a way you could run a script assignment to the file?
๐ค What?
what i did wrong?
Dunno, lgtm.
Maybe you're looking in the wrong place and thiis is actually correct?
but that code still aplies even if i am not in med1
and moveOut player3 on any vehicle he is in
Check if the include file exists?
how?
vehicle player == Med1
Medi is a helicopter not player
You need the same type to compare the values.
but that code still aplies even if i am not in med1
The code applies if player3 is in med1. Doesn't have to be your avatar specifically.
what?
player3 doesn't have to be your avatar for this to report true.
what if I am the player3? since i selected that playabe unit
Doesn't matter at all. Changes nothing.
im afraid becasue this is insde of a waypoint init
is like this
once the helicopter lands
if (player3 in med1) then {moveOut player3};
i dont wanna the player3 to be ejected from other vehicle that is not the med1
Are you sure this is because of this code and not because your squad leader is an AI and orders you to get out?
yes, i am executing this in a solo squad
also i having a trouble with this command
((player1 in med1) or (player2 in med1) or (player3 in med1) or (player4 in med1))
it works in SP but does not work in MP
You do realize that you can't enter vehicles if your squad leader is an AI and doesn't want you to?
Kicks you out, has nothing to do with any scripts.
Does anyone know a way to set which panels can be used (i.e. Whitelist slingload and GPS
If you're using CBA, then you can disable them one by one using this:
class Extended_DisplayLoad_EventHandlers {
class RscCustomInfoMiniMap {
commy_disableRightPanel = "(_this select 0) closeDisplay 0";
};
class RscCustomInfoCrew {
commy_disableRightPanel = "(_this select 0) closeDisplay 0";
};
class RscCustomInfoTransportFeedDriver {
commy_disableRightPanel = "(_this select 0) closeDisplay 0";
};
class RscCustomInfoTransportFeedPrimaryGunner {
commy_disableRightPanel = "(_this select 0) closeDisplay 0";
};
class RscCustomInfoTransportFeedCommander {
commy_disableRightPanel = "(_this select 0) closeDisplay 0";
};
class RscCustomInfoTransportFeedMissile {
commy_disableRightPanel = "(_this select 0) closeDisplay 0";
};
class RscCustomInfoSensors {
commy_disableRightPanel = "(_this select 0) closeDisplay 0";
};
class RscCustomInfoMineDetect {
commy_disableRightPanel = "(_this select 0) closeDisplay 0";
};
class RscCustomInfoUAVFeed {
commy_disableRightPanel = "(_this select 0) closeDisplay 0";
};
class RscCustomInfoSlingLoad {
commy_disableRightPanel = "(_this select 0) closeDisplay 0";
};
};
Otherwise good luck.
I need a push in the right direction.... i need to give players and addaction on other players with lifeState = "DEAD","DEAD-RESPAWN","INCAPACITATED" im guessing one way of doing it would be somekind of cursorTarget but im think it would be more efficient to get the server to add the action on the players meeting the criteria..
the easiest thing would be to add the action to every player with the condition something like cursortarget iskindof "man" && {lifestate cursortarget in ["DEAD","DEAD-RESPAWN","INCAPACITATED"]}
@little eagle I want to do it in an unmodded mission
: )
I figured I'm shit out of luck a few days ago, but thought I'd ask, just in case lol
I'm trying to do something that should be very simple, but I can't seem to find the right way to do it.
I want dead players to enter the EG spectator, with no hovering bird, and without any of the post processing effects that can occur when you take damage and die (including those caused by BIS revive system).
I can get everything except I can't get rid of the bird.
do you have respawn = 1 ?
yea, that was my thought. otherwise the bird should be the player object so you could maybe use hideObject on it to make it invisible
On which machines does onPlayerRespawn get executed?
oh, wait, it can only be the machine of the respawning player, or else my scripts wouldn't be working the way they currently are anyways
for now I have it remoteExec over to the server to hideObjectGlobal the bird. I just hope there is never enough network delay to get birds popping in and out of existance.
@chilly hull did you change to respawn = 1 in description.ext as they advised above?
In Arma 3 respawn = 1 doesn't spawn the bird for whatever reason, even though that option is literally called "BIRD"
Actually they probably didn't advise that above but the opposite, but that's how it goes in Arma 3 anyway
Those don't really help with the problem, because they're probably using respawn = 4 which always spawns the seagull
Respawn = 1 works the best with custom spectator modes
if you don't want BASE or INSTANT that is
What?
That's just how the behaviour is, if you're using "GROUP"/4 (which would be useful if you want to have JIP but don't want to use the respawn options in "BASE"/"INSTANT") and there are no units when you die, the game always spawns a seagull even if you have some sort of a custom spectator mode enabled
"BIRD"/1 doesn't actually spawn a bird in A3 so it works best as the best alternative to "GROUP" with custom spectator modes
OK, yes- But why would it be GROUP ?
I want dead players to enter the EG spectator, with no hovering bird I assumed he's trying GROUP, because I don't think seagulls happen on any other respawn mode
SIDE is broken and I don't think BASE or INSTANT can spawn them?
Just use INSTANT. There should be no bird.
INSTANT with no respawn tickets or?
How do I check if a player currently has a waypoint placed on the map?
count waypoints player > 1
???
Thanks @little eagle.
@little eagle - slight issue, it stays at 1 after I delete the WP.
Yes, there is always one waypoint where you're standing. The whole thing is weird. Hence > 1
torque
Oh, that thing is not a waypoint waypoint.
Anyway to check if that is placed or not?
Hmm, can't remember anything.
Idk, it should work on all PhysX things, no? And grenades are PhysX, which is why they fly through thin walls in A3.
Basically I've this, but icon created with drawIcon3D stays forever, even after the little black dot WP dot on the map is deleted. ```SQF
#include "script_component.hpp"
disableSerialization;
if (hasInterface) then {
_mapDisplay = findDisplay 12;
_mapControl = _mapDisplay displayCtrl 51;
_mapControl ctrlAddEventHandler ["MouseMoving", {
GVAR(mapCustomMark) = "custom_mark" in (ctrlMapMouseOver (_this select 0));
}];
addMissionEventHandler ["MapSingleClick", {
params ["_units", "_pos", "_alt", "_shift"]; // Thanks BIS
if (_shift) then {
GVAR(markerLocation) = _pos;
};
}];
_mapDisplay displayAddEventHandler ["KeyDown", {
if (!isNil QGVAR(mapCustomMark) && {GVAR(mapCustomMark)} && {(_this select 1) == 211}) then {
GVAR(markerLocation) = nil;
};
}];
addMissionEventHandler ["Draw3D", {
if (!isNil QGVAR(markerLocation)) then {
drawIcon3D [
"\A3\ui_f\data\igui\cfg\cursors\customMark_ca.paa",
[1, 1, 1, 0.6],
[GVAR(markerLocation) select 0, GVAR(markerLocation) select 1, GVAR(markerLocation) select 2],
1.1,
1.3,
0,
"",
0,
0,
"TahomaB",
"",
false
];
};
}];
};
// Thanks BIS
๐
It's not a marker and it's not an actual waypoint. Idk if it has any API in SQF.
There was a time where you could block this thing with the onMapSingleClick stacked eventhandler, but that has been broken. So now you have to use onMapSingleClick for your mission potentially breaking all kinds of mods and mission scripts that haven't updated to addMissionEventHandler or want to block something themselves.
Besides making grenades spin, no.
Maybe some destruction scripts.
>My Tiger has caps for the guided AT missiles and those could make use of some random torque to not always fall the same.
The grenades spin in vanilla, but advanced throwing they're always up.
Adv throwing is not my component, so I let the others do it. Destruction and fire effects would be the main application for torque and force I can think of.
Good sfx make a game. ๐
@little eagle - so there no way to delete the icon when the WP's delete on the map?
I can't think of anything.
Ok, thanks anyway ๐
It's not even a control. It's probably drawn with internal magic like the crosshair and the action menu etc.
Most likely, I haven't found any traces of it in the config viewer or functions browser.
onMapSingleClick {true}
to block, but you do overwrite other things potentially (nothing in ACE)
@tough abyss - pinging Banned Inc.
People don't use physX though, So it shouldn't work on them. I don't think the game can even rotate people.
Rotate around X and Y that is.
Yup, force and torque work on grenades.
And don't on persons.
True. I thought you mean throwing people around.
You can already set the velocity though. Dunno how force really adds anything new.
I guess it makes it proportional to the mass.
@little eagle I got a script working in Eden test for muli and not working on server
@tough abyss you can help too ๐
I may know the answer.
plz help
...
hmm?
๐
๐ฎ
oh, rip
alright, here is what I got.. the script I'm using is Moss_targets"shooting range"
working in Eden multiplayer test, and not working on server. Any ideas ?
No, how is that script executed?
But how did you integrate this into your mission?
I tried the test mission he provided
I guess it only works in SP.
I copied the script folder to my mission, worked once
and didn't work again
it did work once on multi
Maybe there's a script error in your mission. Check the RPT file.
First time I tried on server it worked and later after, it's not working anymore.
I thought I did something wrong, I tried the mission he provided for the script. not working.
"I won't be working on this project, probably ever again." -mossarelli
Is there any similar project to this ?
Maybe there's a script error in your mission. Check the RPT file.
18:27:37 Mission Moss_Targets.Stratis: Missing 'description.ext::Header'
this is the descroption.ext
allowFunctionsRecompile = 0; //Turn this off when the script works before you use in in a multiplayer environment. Prevents hackers from recompiling the functions.
class CfgFunctions
{
#include "RifleTargets\cfgfunctions.hpp"
};
Nothing wrong with that I think.
Well, I guess you have to make sure to synch all signs and targets to the logic.
He did that in his template mission
But it says error, so maybe you forgot one.
So, the mission file I used came from the script maker, nothing edited by me, and here is how it looks in editor,
https://steamuserimages-a.akamaihd.net/ugc/906770848470209830/ACA8FF03D39768435939504629D7844D9926429E/
As you can see the logics are synced, and here the unsynced logic
https://steamuserimages-a.akamaihd.net/ugc/906770848470210751/52F760950554CCFDA013C839ED6C0C5A4B6E8733/
And here, working on eden test for multi
https://steamuserimages-a.akamaihd.net/ugc/906770848470211017/E03C138DDC49B3581944278AE78F972D00738322/
Maybe this mission is just broken? Or it's not supposed to be used in MP?
here is the .rpt https://pastebin.com/raw/JFsM5Tt7
What confuses me is, if broken why work in Eden? Why did it work before on server?
And it's to be used in MP for clans he said,
"A lot of groups and clans out there don't even have working targets to shoot at other than improvised pop up scripts. Thus during my time in my old community I tasked myself to create a proper target system with real score based on accuracy." -moss
@winged sphinx that rpt doesn't work
search for description in the rpt
and copy paste the results here
12:56:39 Mission Moss_Targets.Stratis: Missing 'description.ext::Header'
anything else other than that?
12:48:12 - adapter description : NVIDIA GeForce GTX 970
ok, thanks. then there is nothing wrong w/ description.ext
So, what is wrong ?!
12:51:09 Error position: <select _foreachindex) in ["RscDisplayDeb>
12:51:09 Error Zero divisor
12:51:09 File A3\functions_f\Debug\fn_errorMsg.sqf [BIS_fnc_errorMsg], line 29
12:51:09 Error in expression <le ["gui_classes",[]]);
{
if ((_classes select _foreachindex) in ["RscDisplayDeb>
First report, server running profiling_x64
Second report, server running arma3server_x64
doesnt matter
I just don't know, why is it working in eden and not working on server
What does it mean? I'm not that good :/
Also that error repated it self for 18 times in the same time frame
13:18:37
That mission is probably broken. It's from 2015 after all.
LOL
I found the solution
omg
@simple solstice , @little eagle any of u guys downloaded the missions ?
It's a mission, no.
mb, alright
So doesn't matter what you do, you need to join the server, the error will come, Hit ok then go back to lobby
And gg
@little eagle @simple solstice Thank you for your help. ๐
I'm almost certain that this mission never worked in MP.
It's working now, that's why when we started. I told you it was just working
I didn't know that I loaded the script that way
anyone have a grey screen effect?
to make the screen monochromatic
cant find it on the wiki and anything related on google is about crashes
im on this apge
I know but I cant seem to make the screen turn black and white
trying and trying ๐ฆ
["BlackAndWhite", 0, false] call BIS_fnc_setPPeffectTemplate;
``` found it
is there a command to decrese the time to the medic to revive?
No.
i want to make it faster than 3x
yes, but is locked to 3x
also
Do that ability to revive 3 times faster as a medic only works if the unit is already set as a medic?
becasue, i made a script that once you get a medickit (not first aid kit) you became medic
the player that get the kit is supouse to revie 3x faster
this might not be the right channel but does anyone know where i can find the bullet-hitting-ground effects in the a3 folder?
a3_data_f is a good place to start for generic stuff like that.
Is there any way to force VIV for vehicles that have too big a bounding box for the carrier vehicle?
does anyone still have
odol web converter
i need it to learn models on making weapons
anyone happen to be familiar with this spamming error? sqf 22:19:02 Error: Sound volume expression: engineOn*(1-asphalt)*(1-camPos)*(latSlipDrive 0.8[0.1, 0.4])*(Speed 0.8[2, 15]) 22:19:02 Error in expression <engineOn*(1-asphalt)*(1-camPos)*(latSlipDrive 0.8[-0.1, -0.4])*(Speed 0.8> 22:19:02 Error position: <latSlipDrive 0.8[-0.1, -0.4])*(Speed 0.8> 22:19:02 Error Generic error in expression
Using quite a lot of mods on the server. The only problem I have recurring is that my ArmA 3 'crashes' on 'receiving mission data' and only unfreezes when the server kicks me for no response. Somehow got the feeling it's got to do with the error as I've reinstalled the game and it still persists
@tough abyss there are lots and lots of errors in missions, mods and even arma itself that spam the logfiles. you should find someone who can play on the server just fine, and check if his log has the same error. if that is the case, you can probably ignore it and it is not your issue.
Aight thanks, thought it'd be due to the new RHS update as a lot from AFRF seems to be returning errors
it is not only RHS, many mods do that. you can try to verify your game files, steam will verify the mods, too
if you got them from workshop
Is there a way to have a line break in diag_log output once or right before the next element in a printed array exceeds the 1044 character limit? diag_log text format ["Men List: %1", _menList]; I'd rather not print a line for each element if possible.
Use a logging extension, there are afew for arma
Ok I'll try it, Thank you.
texture = __EVAL((__FILE__ select [0, count __FILE__ - 15]) + "a\vikingmain31.paa";
after exporting of my .pbo all .paa's couldn't get finde :/ dont know how to fix it
y
@cloud thunder alternative is to write a function breaking the string into parts
Using count, select etc you can get stuff split up
@cloud thunder https://community.bistudio.com/wiki/endl
@deft owl The part after + needs to be part of __EVAL.
@tough abyss RedRPM is a threshold for the sound simulation part of the engine. There is no way to set/get the max RPM, because - surprise - PhysX is hot garbage.
@tough abyss you don't. Also wrong channel. Google "Breaking Point github" Or use Arma 3 samples.
@little eagle fixed it, #armaisabitch. used the pbo mangaer now and it worked
ty
Guys, many thanks for help me with scripts, my work is done.
here is the result of your help: http://steamcommunity.com/sharedfiles/filedetails/?id=1150897167
damn dude. that mod list...
don't get me wrong, all good mods, but still.
Yeah i was just about to say the same thing. Try and cut down on em unless they are specifically used to showcase something
i did my best to remove unnecessary stuff, sadly i actually need all those to reach my goal.
i put 3den Enhanced because it seens like mission bugs out with out it.
eden mods shouldn't affect the actual mission tbh :S
gz on release! Feels like some of the mods add kinda the same assets and the mission would probably be fine even without for example a huge arsenal of weapons. but I haven't actually looked what you use from each mod so it might not be the case. Not a big deal, but users tend to shy away from missions that need many mods they dont have. (at least in my group)
In the description you tell users not to save, which is fine. but then you could just as well disable saving all together if you dont want to support it. https://community.bistudio.com/wiki/enableSaving
The desync issues you mention could probably be fixed by waiting until all players have loaded the mission before you do whatever it is you do, but that is just a guess.
Thanks for the code, i will update the mission soon.
what? Are you asking me how to google and click the first result?
Yes
When i open it on oxyygen2
it dotn work
"unable to load file"
@still forum
Did you download the whole repository as zip file?
Try the download button here: https://github.com/deathlyrage/breakingpointmod/blob/master/ModSource/breakingpoint_weapons/models/DMR/BP_dmr.p3d
yes
Don't. Download the files manually. Zip download is broken for unknown reason
This is for O2, yall should go to #arma3_model anyhow
yup.. That's what happens when idiots doublepost
Someone needs to make a discord bot for double posting monitor.
So that spastic children can't go crazy
is there a chance that player returns null in postinit ?
headless client, dedicated server?
Uhhh. No? Player is still alive during loading screen iirc.
Wtf ?!? 0_0 player == player
Yeah ๐
returns false for objNull
//--- Call postInit functions once player is present
_functions_listPostInit spawn
{
...
//--- After JIP, units cannot be initialized during the loading screen
if !(isserver) then
{
endloadingscreen;
waituntil{!isnull cameraon && {getClientState != "MISSION RECEIVED" && {getClientState != "GAME LOADED"}}};
["bis_fnc_initFunctions"] call bis_fnc_startLoadingScreen;
};
...
//--- Execute automatic scripts
if (!is3DEN) then
{
if (isserver) then {
[] execvm "initServer.sqf";
"initServer.sqf" call bis_fnc_logFormat;
};
//--- Run mission scripts
if !(isDedicated) then {
[player,didJIP] execvm "initPlayerLocal.sqf";
[[[player,didJIP],"initPlayerServer.sqf"],"bis_fnc_execvm",false,false] call bis_fnc_mp;
"initPlayerLocal.sqf" call bis_fnc_logFormat;
"initPlayerServer.sqf" call bis_fnc_logFormat;
};
0.90 call bis_fnc_progressloadingscreen;
//--- Call postInit functions
_fnc_scriptname = "postInit";
{
{
_time = diag_ticktime;
[_x,didJIP] call {
private ["_didJIP","_time"];
["postInit",_this select 1] call (missionnamespace getvariable (_this select 0))
};
["%1 (%2 ms)",_x,(diag_ticktime - _time) * 1000] call bis_fnc_logFormat;
} foreach _x;
} foreach _this;
1.0 call bis_fnc_progressloadingscreen;
};
...
};
objNull == objNull```
I had to cut out some stuff.
Note:
waituntil{!isnull cameraon
And the postInit is afterwards.
player == player
is the retarded way of writing:
!isNull player
And people keep using it because they're people.
both useless. just postinit and $$$
but it might be faster
Yes, but it isn't and even if it were by a tiny margin, it looks stupid and evidently makes people flinch.
Most that use it don't even know what it does.
time > 0 is bad as well, according to wiki comments, it can take seconds to sync with server
Have you ever checked if it actually synches at all?
Have not checked but I have faith that it does
ahaha
Should sync when connecting
agh. I'm fiddling with the old camera ( "camera" camCreate _pos ) b/c it knows how to inertia. โโ my problem: it quits anytime I right-click. Is there any way to prevent this?
Don't right click?
time never syncs, serverTime does
So confirmed for sync
Yes, but it diverges pretty hard as time goes on.
Because it works in the simulation time and that depends on the FPS etc.
I use player == player because it looks symmetrical and I might have an OCD
What about diag_tickTime?
tick time uses the machine clock, but it starts at game start, not mission start and therefore breaks savegames too.
๐ค
_var = objNull;
(_var == _var)//true
_var = unit_1;
(_var == _var)//true
The machine clock should be good enough to have a synched time over multiple hours as long as your pc isn't broken or something.
replace _var with player
But the time command certainly isn't.
null is not equal to null
I think KK said something about how diag_tickTime also becomes inaccurate over time
whoaa ?๐ฒ
configNull == configNull
is true
objNull == objNull => false
objNull isEqualTo objNull => true
(messed up copy-pasting)
oh my good
Really? Null config is equal to null config? Never tried that.
Try it.
I wonder if nothing is equal to nothing
:scream:
nil == nil
is
nil
nothing, not nil
Because everything with nil as arg is nil
call compile "" isEqualto call compile ""
You probably couldn't even compare nothing ot anything though, i'll check
nothing is just a nil with null pointer type. My statement is more general.
Yeah, you can't compare nothing with ==
@subtle ore diag_tickTime is literally tied to system time. It doesn't get more accurate. But yes it is bound to floating point precision so it get's inaccurate
@still forum Yes, hence over time
Error ==: Type Nothing, expected Number,String,Not a Number,Object,Side,Group,Text,Config entry,Display (dialog),Control,Network Object,Team member,Task,Location
Yep, tick time is as good as you can get imo. Even better than working with network delays for many hours of uptime.
Never tried if sleep mode breaks it though
@subtle ore in 24 hours it is inaccurate by 1.5ms
I wouldn't call that inaccurate at all ๐
A very very very very long time Dedmen. ๐
Real time is inaccurate as well
What "nothing" did you use?
Your clocks are lying to you
Nigel wtf
The nothing type
My brain
Repro?
There is just a single way to get it and its completely useless
addMissionEventHandler ["Draw3D", {nothingvar = _this}]
Draw3D puts this nothing type variable into _this for some reason
The only place in entire game
Earth loses some ms every day. Should've used param, maybe then our time would not be out of sync.
Ah, I see.
Tick time becomes unreliable when calculating per frame deltas over few hours of game running
Most games last <5 hours anyway..
If you have decent FPS, deltas become 0
I've been asking for diag_deltaTime for a while now
Either way, it's as good as it gets.
Well
I'm at ~1000 seconds now and the server is already 2 seconds behind in time and 0.3 s ahead in relative tickTime / CBA_missionTime.
It's good
As it gets
I actually just built a hack to dump the frame delta times ๐
I remember time being absolutely unreliable in network environment, the more freezes and FPS jumps you had, the more it differed from other clients and server
Yep.
diag_deltaTime would only tell you the time since last frame start or end. That won't help much if you need exact time in the current frame. not just current framestart relative to last frame start
Why exactly would there be a delay though in time reads on the server pc? (Over network)
I think time is only synced on connect and then calculated locally
serverTime gets synced with server constantly iirc
Because time is updated relative to how the simulated time progresses.
Right, but what about getting times from a db or something?
@still forum Can diag_tickTime even return different values within single frame? I guess it should?
I understand why time wouldn't work
yes
A db has just a number, idk.
diag_tickTime calls directly through to getSystemTime
@peak plover - always use param.
It's fine the way it is. The player does not even need it's own time.... If you want somethign to happen the same time on every client, just use remoteExec on the server
Then we need two commands to measure time, start and end of measurement
playerTime serverTime missionTime Just sync the missionTime when connecting and everything else can run independently
I wonder how do other newer games do this... if it all
@peak plover - off topic, are you a woman?
๐
Make how CBA_missionTime operates a native command : (
Yeah, because nigel is a womans name :D
@little eagle intercept?
Who knows, Nigel could very well be a womans name ๐ค
@peak plover - you've a woman in your profile picture ๐คท
And I'm carrying a sword and shield all the time irl.
Assumed it's you.
Neviothr, i am actually a twig. That is me in my profile picture, a small tree.
Commy has to defend himself against savage Americans
I'm not surprised in the least, Commy.
Believe it or not but I do actually wear an ACH and a balaclava when it's cold out.
Ahh, that quote's gonna bite me down the road.
You saw nothing!
Anyway, back to nilTime = ๐ฆ or whatever.
I have it all! Here in me noggin.
You forget a thousand things every day, make sure this is one of them.
Can time even be nil?
No.
We don't know that
We as humans made 'time' because we had no control over it
And it is our means of control now
And srructure
Yep, definitely.
:joy:
And actual time is whatever you want it to be. Question is if that still describes reality.
Commy....you missed it
Cosmic rays hit the byte containg time, turned it gay nil
Possible.
Woah
I had a comment escape the other day, all I did was restart my game and it was fixed...
Today I Learned.
๐ค
๐ค
๐ฝ ๐ฌ
Yeah...
Wow, so i can imagine how innacurate it would be on a large mission
It's really bad.
Yeah, a public server which restarts twice a day...
Like the zombie modes
or life modes
Must have like hours of mismatch
Yep
Especially on the crappy ass life servers
implying there are good ones.
Must've been crawling at the bottom for both client and server fps
Only good life server is an offline life server
:thumbsup:
@subtle ore They are actually running just fine
@tame portal don't tell me, that you're a lifer right?
Cover the windows!
Nail the planks!
I don't play any gamemodes
For that amount of players, they are actually still in an OK area when it comes to performance
Nonsense
when it comes to UI. What is the best position type for supporting different aspect:ratios and resolutions?
Don't spam @errant birch
@errant birch #creators_recruiting
He is not recruiting really
hiring help, kinda the same thing
@errant birch you have a question? #arma3_questions you have a problem? #arma3_troubleshooting
But don't post there or you'll get banned for spamming your crap everywhere
If you don't know how a chat works.. You really shouldn't be here
common misconception
But some people think before they speak out.
First of all go the the altis life discord as it's more specific to your problem.
Second of all you propably haven't even read the documentation or instruction if you get that error
I guess you don't even know a database is for your mission
Figures a lifer decides to spam the discord
Database? You mean external thumb drive?
Even decided to spam in creators recruiting. Like wtf? Do you have eyes?
picture of weird jesus?
When creating an interface is it best practice to have the entire interface in a class and use actions to make elements show/hide or split the interface into groups of classes and hide/show entire ui classes?
I hate working with arma ui system but I'm forcing myself to learn it
I've done all versions of that and ended up making templates of the most used things and then I use functions to create those.
I find spliotting everything in logical groups very helpful as well
Having everything in one class is worst. Splitting it up, even a bit is better in the long run
to what extent do you break it down. for instance if I click a button and it brings up a sub-menu that then changes the window....would you put the sub-menu with the parent button or have all 3 as separate classes?
Since I would use sub menus in more than one place
And buttons as well
I made a function that creates a button which has a sub menu
got it. sounds smarts enough.
_dropList = [
"Respawn Player",
[0,1.3,5,1],
{
private _array = [];
private _nil = {
private _value = _x;
private _name = name _value;
private _toolTip = ('Respawn ' + _name);
_value = str _value;
_array pushBack [_name,_value,_toolTip];
false
} count PLAYERLIST;
_array
},
{[_this] call respawn_fnc_respawn}
] call menus_fnc_dropList;
Very flexible, but I don't ahve to make classes for everything, (yay)
Yay
Anyone know from the top of their head if video can be resized and made transparent?
In ogv?
Yes
Maybe when you're editing in the video. But arma will just see the background as white
I have no clue. Anything like that of videos and arma is some sort of workaround.
Doubt you'd be able to do transparency at all
๐ข
Opening the VA mission just gave me a script error.
va?
Virtual Arsenal
Leaving the VA gives me a script error too lol
Well, I guess I'll just put that up on the feedback tracker if no one else is going to ๐
is there really no event handler for detecting when the player changes their weapon?
how can I achieve that?
mods?
no mods
EachFrame mission event checking it every frame
WeaponState?
Warning Message: Resource playerMenu not found
description.ext
#include "defines.hpp"
#include "dialogs.hpp"
dialogs.hpp
class playerMenu {
idd = 9999;
movingEnabled = false;
class controls {
What am I missing?
currentWeapon ? Seems to be what you want.
cutRsc needs it in class RscInGameUi
(may have botched the name, never use cut)
?
You're using cutRsc, right?
no
What then?
for what?
I have like 0.5% experience with gui. Took me 7 hours just to get to where I'm at today.
Well, you do understand that any ui has to be created at some point, right? ctrlCreate, createDisplay, cutRsc etc.
I try using createDialog "playerMenu"; and that is when I get the error
mission
Check the missions config (description.ext) in the ingame config viewer.
And check that playerMenu is a base class at config root level.
Meaning not inside another class.
That doesn't work then.
It has to be a class in mission or addon root (dunno about campaign)
ok I'll mess with that and see where I get.
would I be able to do createDialog "MissionCFGMain:playerMenu"?
though if I was writing in intercept then I should be able to that way right?
No, just change your config already.
lol, thanks commy
yw
creating a dialog from a button action = "createDialog "dialogName""; How do you properly do that?
just an escape character?
action = "createDialog 'dialogName'"; or action = "createDialog ""dialogName""";
I'm using """ I'll try ' looks cleaner
Opening a second dialog is overwriting the one under it. Do I need to recreate the entire dialog each time I open a new dialog?
use createDisplay instead of createDialog to have one on top
Is it possible to start a variable name with a number when declaring it in the sourcecode (therefore not with setVariable)?
3testVar = 5;```
No, but how is setVariable not source code?
_FlagClass = "Flag_US_F";
This one call from the game file, how I implment a flag pole from the mission file it self ?
You cannot add CfgVehicles classes with the mission config (description.ext). But you can change the flag texture of an already existing flag class with one script command.
What command please ?
and can I call that in the other script init.sqf ?
doThis.sqf
_ctrl = (findDisplay 100000) displayCtrl 100200;
_ctrl ctrlSetEventHandler ["onMouseButtonClick","diag_log _this"];
ListBox
idc = 100200;
onMouseButtonClick = "_this = [[lbText [100200,(lbCurSel 100200)]]] execVM 'doThis.sqf';";
_ctrl works fine for everything else but having issues changing the onMouseButtonClick It doesn't appear to be properly modifying the list
Is there a way to disable collision between physx objects since disableCollisionWith doesn't work?
No.
Shame, thanks.
if ((getSuppression civ1) >= 0.5) then {civ1 playActionnow (selectRandom ["gestureYesestureNo","gestureYes","Crouch","FastB"]);};
were do i put that when i need it to keeping running?
@astral tendon you'd need a loop, check this out: https://community.bistudio.com/wiki/Control_Structures
gestureYesestureNo
๐ค
๐
Civ is a woman?!
Who thought putting alt tabbing and autocomplete on the same key* was a good idea...
๐ค
iknow...
Arma
no womens in arma i dont see any
Didn't realize arma had auto complete. This is with something like the debug console right?
๐ no womens? Oh god my sides hurt, this is too good
No womens guys, Arma will finitely be incomplete
lol
well, that script is when a unit is supressed, do a animation to kinda simulate fear
sadly, you cant supresses Civs, so RIP
but i will let this to enemys
There are anims for panicking
sure there are
yes, but it bugs it
he dont get out of the animation
i want it to panic for 3 seconds and then back to normal
Switch move will put the anim in first qeue so that there is zero transition, and sleep it for 3 seconds and switch move it to a nil value
Anyone aware of somethign changed for ctrlCombo types?... i had a dropdown menu that worked perfectly fine before
but now it doesn't trigger at all anymore
_dropDown ctrlSetEventHandler ['LBSelChanged', format ["systemChat 'test';"];
_dropDown ctrlSetEventHandler ['MouseButtonClick', format ["systemChat 'click';"]];
worked a version ago
Click works. LBSelChanged does not
Tried add instead of set?
(Also ignore the typo in that)
Same thing @little eagle
Also when selecting.... it doesn't actually update the thing
https://i.imgur.com/FeYPcHQ.png when i click that the selection for the box doesn't change
ah, nevermind that, i tink i am gonna put it on a trigger
Strangest thing is somewhere else i also have a lbselChanged with the same ctrlCombo and that one does work
config is the same.
@astral tendon sinful triggers are
Meh
if ((getSuppression civ1) >= 0.99) then {civ1 playActionnow (selectRandom ["gestureNo","gestureYes","Crouch","FastB"])};
how i make civ1 be any unit? like this script work to all units
That's what good ol scripts and functions are good for. You can pass anything into them and utilize the units @astral tendon
well, i did a .sqf
called fear.sqf
on the init.sqf i put {[_x] execVM "fear.sqf"} forEach allUnits;
Use params. Inside fear.sqf