#arma3_scripting
1 messages Β· Page 333 of 1
You're wrong somewhere. At preInit, there are no objects. Not even the module. So there cannot be a module script.
dont use modules at all, its way easier to do stuff for your needs outside editor
Agreed.
How easy then would it be to get a list of applied sensors from editor and reapply to a respawned vehicle not using modules?
10:44:53 ["a",[bis_o1,bis_o1]] <<< initial respawn
10:45:17 ["a",[bis_o1,bis_o1]] <<< cursorTarget setDamage 1
10:45:27 ["a",[bis_o1,bis_o1]]
10:45:34 ["a",[bis_o1,bis_o1]]
It worked for me just now four times in a row.
I think it would be easier if you write your own replacement for the vehicle respawn module.
What? what would be easier and for who?
Me. :/
π
How easy then would it be to get a list of applied sensors from editor and reapply to a respawned vehicle not using modules?
what do you mean by this?
https://community.bistudio.com/wiki/listVehicleSensors <<< all you need
Your easy alright
I was about to write "anyone", but then I reconsidered.
["Plane", "init", {
params ["_plane"];
_plane enableVehicleSensor blah
}] call CBA_fnc_addClassEventHandler;
^ anyone can use this : P
@little eagle stackedEHs is fixed on devbranch again:
https://forums.bistudio.com/forums/topic/140837-development-branch-changelog/?do=findComment&comment=3214237
not peolpe on an unmoded server wich is the majority on an umoded server or servers that use keys and no mods
Im not trying to make mod requirements. I keep them optional
Fixed: The BIS_fnc_addStackedEventHandler function did not accept object argument or function name
Well, let's hope they didn't do what I think they did. Because it's broken for anything that isn't bool / number / array / string; not just object.
so far i haven't seen any issues, but i didn't test extensivly
object, code and number and strig are working
Is this RscTitles's structure fine? ```CPP
class RscTitles {
class ai_count {
duration = 1e6;
idd = 81000;
enableDisplay = 1;
name = "ai_count";
class controls {
class structuredText {
idc = 81001;
text = "AI: 999";
x = "1 * safezoneW + safezoneX";
y = "1 * safezoneH + safezoneY";
w = "0.03 * safezoneW";
h = "0.03 * safezoneH";
};
};
};
};
Yeah, @cloud thunder . I guess the best you can do is to have a loop that does something like this:
// init
spawn {
while {true} do {
sleep 5;
{
if !(_x getVariable ["commy_isprocessed", false]) then {
_x setVariable ["commy_isprocessed", true];
_x enableVehicleSensors [blah];
};
} forEach allMissionObjects "B_Plane_Fighter_01_F";
};
};
@tough abyss try group
is there an alternative to allMissionObjects , because it seriously takes al ong time even with a specified classtype to finish searching
Oh, sweet. Very neat.
This looks through fewer and shorter lists.
But it can't find flying ammunition, butterflies, bullet holes and stuff like that.
Lol, pretty sure allMissionObjects can even find blood decals...?
@little eagle group == object afaik
The ones from ACE it can find.
@tough abyss No, GROUP is a different type from OBJECT
ok
You don't need a loop to enable vehicle sensors. Thats a waste and that loop is not detecting editor set sensors.
OK, then you're on your own I guess.
@cloud thunder
sh_fnc_vehRespawn= {
params ["_old"];
private "_new";
_new=objNull;
_type= typeOf _old;
_pos=getPos _old;
_sensors=listVehicleSensors _old;
{
_isEnabled=((_old isVehicleSensorEnabled (_x select 0)) select 0 select 1);
if (_isEnabled) then {
_sensors deleteAT (_sensors find _x);
};
}forEach _sensors;
deleteVehicle _old;
sleep 0.5;
_new=createVehicle [_type,_pos,[],0,"NONE"];
_new addEventHandler ["killed",{[_this select 0] spawn sh_fnc_vehRespawn}];
waitUntil {!isNull _new};
{
_new enableVehicleSensor [(_x select 0), false];
}forEach _sensors;
};
just tested on wasp, and it works.
Where is this executed from?
init.sqf
well you might want to run this server side , if its mp enviroment
killed wouldn't trigger if this code only runs on the server when the plane was boarded when it died.
init.sqf
yeah then init.sqf
your passing old vehicle so is this from expression filed of Vehicle Respawn Module? Putting this in init.sqf would just store the function. It has to be called from somewhere..
dont use modulessssssss
this addEventHandler ["killed",{[_this select 0] spawn sh_fnc_vehRespawn}];
whre do you call the function?
in vehicle init
Ok thanks
The waitUntil {!isNull _new}; is superfluous. It's never null.
yeah,idk why i even put it after sleep lol
@vivid quartz You know you can use the private keyword right?
private "_new";
_new=objNull;
is essentially just a uglier and slower version of
private _new = objNull;
also Why do you initialize _new to objNull? You never use it till you assign it from createVehicle. Which overwrites anything you put into it before anyway.
yeah, that was bad of me, same like useless waitUntil there.
@mortal halo what do you mean dropweapon? give us an example of what youre trying to do
Sqf command dropWeapon
no im talking about the main exploit of putting weapons with items into a container
using action ["DropWeapon"
...
that's the only part of my lovely function that doesnt work
so you want to put a weapon into container?
player action ["DropWeapon", myContainer(object), primaryWeapon player];
or currentWeapon whatever
no no here's the deal
it works for me in the debug console
but as for my code, just doesn't work. i create a unit and make it drop
and it doesn't π¦
@vivid quartz sh_fnc_vehRespawn= { params ["_old"]; private "_new"; _new=objNull; _type= typeOf _old; _pos=getPos _old; _sensors=listVehicleSensors _old; { _isEnabled=((_old isVehicleSensorEnabled (_x select 0)) select 0 select 1); if (_isEnabled) then { diag_log text format ["Previosly Enabled Sensor: %1", ((_old isVehicleSensorEnabled (_x select 0)) select 0 select 0)]; _sensors deleteAT (_sensors find _x); }; }forEach _sensors; deleteVehicle _old; sleep 0.5; _new=createVehicle [_type,_pos,[],0,"NONE"]; sleep 0.1; _new addEventHandler ["killed",{[_this select 0] spawn sh_fnc_vehRespawn}]; { _new enableVehicleSensor [(_x select 0), false]; diag_log text format ["Disabling Sensor: %1", (_x select 0)]; }forEach _sensors; }; F-18 Bllack Wasp non stealth version
All sensors enabled in editor
4:13:35 Previosly Enabled Sensor: IRSensorComponent
4:13:35 Previosly Enabled Sensor: PassiveRadarSensorComponent
4:13:35 Previosly Enabled Sensor: LaserSensorComponent
4:13:36 Disabling Sensor: VisualSensorComponent
4:13:36 Disabling Sensor: ActiveRadarSensorComponent
4:13:36 Disabling Sensor: NVSensorComponent
All sensors disabled in editor
4:16:09 Previosly Enabled Sensor: IRSensorComponent
4:16:09 Previosly Enabled Sensor: PassiveRadarSensorComponent
4:16:09 Previosly Enabled Sensor: LaserSensorComponent
4:16:09 Disabling Sensor: VisualSensorComponent
4:16:09 Disabling Sensor: ActiveRadarSensorComponent
4:16:09 Disabling Sensor: NVSensorComponent
I don't think its working
_dummy = call fn_createEmptyUnit;
{
private ["_weapon"];
_weapon = (_x select 0);
_weapon = _weapon call BIS_fnc_baseWeapon;
_dummy addWeapon _weapon;
{
if(_forEachIndex > 0 && !(_x isEqualTo "") && !(_x isEqualTo [])) then {
_dummy addWeaponItem [_weapon, _x];
};
}foreach _x;
hint primaryWeapon _dummy;
_dummy action [ "DropWeapon", _container, _weapon ];
}foreach _weapons;
deleteVehicle _dummy;
};```
fn_createEmptyUnit simply creates a unit, removes all weapon , disables damage and disables AI
before calling the action, the hint returns the primary weapon added (ofcourse, im testing it with a primary weapon)
i've tried commenting deleteVehicle _dummy because it might delete the unit before the action is done
still doesnt work
@cloud thunder yeah, thats the point of it, it disables the sensors you dont want, and leaves the ones that you want
You can't.
no
You ran into the same issue as many before you did.
but it works for my player
in the debug console i can make it happen
maybe its because i've disabled some of the AI?
i dunno
It doesn't work reliably and there is no way to fix it.
There are workarounds 'tho
@vivid quartz But "Previosly Enabled Sensor" is not showing the sensors I enabled in the editor. By default all sensors are dissabled.
Jigsor, the editor is bad. Just enable them manually...
@cloud thunder i don't really know whats wrong, i tried the script above with multiple sensors, and with 1 sensor, it works, use
vehicle enableVehicleSensor [componentName, state]
I know that command in that context example it works. @little eagle quit being useless
this could've been solved hours ago Β―_(γ)_/Β―
But you didn't you just kept posting uselessness foy my application.
No, but you dismissed it, because it required you to think a bit for yourself instead of being a copy paste solution.
π΅ π΄
I told you why it doesn't work, what should be done instead and linked the feedback tracker issue where it says it's broken.
"but it's not what I want waha"
Β―_(γ)_/Β―
Dude get overyour self I'm not using the repawn module here
Good.
Now also drop the editor attributes and use the enable sensor commands manually.
And quit clogging with uselessness again
But that IS the solution. How is the solution useless?
Is it possible to make me and my friends spawn in the air in 'Escape Tanoa'? I can add the parachute/elavation in a fresh file but there must be code forcing my characters to spawn with a regular back pack. removebackpack this; this addbackpack "B_Parachute"; That's what I'm currently using to add backback
CBA or anything you poosted is not the solution for passing editor set sensor attributes to a respawned vehicle for unmodded
okay commy well i've monitored the behaviour. for now i've found 2 things:
first - i can't deleteVehicle straight away because it takes a second until the weapon is actually dropped into the container
I also posted an alternative for when you're not using any mods.
But you didn't like it.
and seocnd it doesn't work when i spawn the dummy unit in [0,0,0]
probably because it is water, and the unit does an animation
@obsidian chasm I think escape tanoa uses vanilla respawn system and you don't respawn when you first start the mission, but jip is considered respawn. Do you just want to start in the air when you first start the mission or all the time?
Yuval, give it up. DropWeapon doesn't work.
@peak plover Just the first time so my friends are like "woah thats cool" π
yeah but it does work. i've spawned the unit near me and everything works fine.
It has many problems and you will not be able to solve them all.
No it doesn't work. Only working sometimes is the same as not working.
I'd say it is more like "only working under certain conditions"
Yes, but you cannot control these conditions.
For example, it will fail when you rotate your character while you're dropping the weapon.
That happens all the time.
yeah but im not working on a character
im working on a disabledAI unit
it's just a placeholder for adding weapons into containers
it's tough
it's ugly
but its gonna work
Do what you want, but I'll tell you that it will never work reliably.
probably. but my project is all about inventory. i can't give up especially if i can make it work somehow haha
we'll see but thanks for the heads up
@peak plover I guess a run down of my 'mission' would help?. We start with the regular gear and then use the 'Arsenal' to switch gear to our preferred stuff, we die and respawn using the arsenal gear.
people said it wasn't possible to copy a container inside a container with all it's items
i've sat down for a few hours and made an algorithm for it
To start in air you can just place the units like 1km on top of the starting position
It isn't possible. Try to copy a weapon with manually changed weapon attachments from one crate to another.
@peak plover Yeah I did the elavation part but my soldiers don't spawn with a parachute, so they just kind of die.. haha
@little eagle thats exactly what im doing
Do it in initPlayerLocal
It doesn't work, because the game is missing required API.
I'm guessing I need to edit the player loadouts or something?
create a file called initPlayerLocal.sqf inside the mission directory
Well, weapons don't work. And neither do backpacks btw.
I have one already
backpacks do
@peak plover http://prntscr.com/fxkl1n
it's working for me
it has all the player loadouts inside
copied a backpack with items from a box to another
it's a tough algorithm
but it works
the only thing i have not been able to deal with was weapons inside backpacks
vest
etc.
we'll see
Yuval, you're reinventing the wheel. And everyone before you got stuck on weapon attachments.
I can't find your solution commy2 could you post again?
in it you can add ```sqf
params ["_player","_jip"];
if !(_jip) then {
_pos = getPosATL player;
_player setposATL [(_pos select 0),(_pos select 1),(_pos select 2)+1000];
removeBackpack _player;
_player addBackpack "B_Parachute";
};
// init
0 spawn {
while {true} do {
sleep 5;
{
if !(_x getVariable ["commy_isprocessed", false]) then {
_x setVariable ["commy_isprocessed", true];
_x enableVehicleSensors [blah];
};
} forEach allMissionObjects "B_Plane_Fighter_01_F";
};
};
@peak plover I should add that in and not remove something?
@cloud thunder How does the editor save what sensors a vehicle should have enabled when it spawns?
OPTiX, it's Eden attributes.
Never worked with Eden before so I don't what that is :D always end up not using modules and such
I already commented on that. Again, that does not gather sensor attibutes from editor and that loop is usless
*know
Yes, it will spawn any player that did not jip in 1500 meters of it's positions and give a parachute. It might not work, because it might set the position after the init in some other script
Jigsor, you can't gather the sensor attributes from the editor.
@tame portal mission.sqm I suppose as all editor placed objects
The loop is not useless. It finds newly respawned planes and applies the sensors you want.
@mortal halo You can't loot weapons with attachments on them in PUBG, it seems to be an industry wide problem /jk
You don't need a loop to apply sensors
How does ace 3 handle looting weapons from unconcious people?
But you need one to find freshly spawned planes.
How is this so difficult to understand?
@cloud thunder Can you give each jet a unique name in the editor? Or is it a requirement that that is dynamic
@mortal halo You can probably create a box with weapons and attachments by creating a box in CfgVehicles.
@peak plover No parachute spawned π¦
Your saying apply same atributes to all planes of one class
yeah @still forum its an inventory system so configs are a no go.
This soldier doesnt have one, maybe thats the issue
no, should not be an issue. Also that script only gives parachutes to players
Not ai
I don't see the relation between Inventory system and configs forbidden
If the names are fixed, I'd simply use the loop commy proposed to initially make an array with each objects unique name and their configuration and in case a new vehicle respawns you just stringify that object again and look in your array for the corresponding sensor settings
im trying to recreate the functionality
Your saying apply same atributes to all planes of one class
Not necessarily. You can do whatever SQF woodoo you want in that script.
@tame portal Sure you could. Dynamic name is not required.
Then I propose my solution
cba has functions to add stuff to classes, right?
@peak plover Yeah it doesnt seem to work
Try the code in the debug console, see if it works without
cba has functions to add stuff to classes, right?
It has a function to add eventhandlers to classes.
Look for all jets, save vehicle name and configuration in array, Mark the vehicle as "processed", wait until a new jet pops up that isn't processed yet, look for corresponding configuration, apply if found, if not register new jet @cloud thunder
Only works with fixed names though
init eventhandeler for plane class and boom
I suggested that too, but he's using no mods.
My solution is what commy posted but a bit extended to fit your need "Each jet may have a unique configuration"
And he is hellbent on using the eden attributes for the sensors even though that is the reason it doesn't work in the first place...
Sooo, the eden does not work and he wants to make it work? don't you still need to have a mod to fiddle with the editor ?
Creating a custom mod would be far harder than using cba...
They don't work in conjunction with the respawn module. Because respawning vehicles does not carry over the eden attribute things.
Aaaa
Vehicles can't really respawn. You just create a new one of the same type and delete the wreck.
It's different from respawning player units.
@peak plover nothing :\
The plot thickens
Is a sleeping script in any way bad for performance (if you don't care if the slept time is accurate or not) (in scheduled)? The script is just skipped in a frame if the sleep time has not expired yet, right? So it wouldnt use any additional time of the 3ms per frame
true
the engine has to check if the sleep is over though. But that's <5us (on my CPU. Better CPU = less time)
@obsidian chasm ```sqf
_player = player;
_pos = getPosATL player;
_player setposATL [(_pos select 0),(_pos select 1),(_pos select 2)+1000];
removeBackpack _player;
_player addBackpack "B_Parachute";
Well, the script is checked every frame if the sleep timer has passed.
Does that not work in the debug box
^ What dedmen wrote
Sounds good
Also if the sleep is not over the script get's pushed to the end of the queue
ok so that works @peak plover
so If you have a high load on scheduled it only get's checked every few frames and doesn't impact the performance of others
So it's guaranteed that it will be one of the last scripts checked per frame?
Ah okay
Yeah, makes sense if the 3ms have already been used up, it may just skip it a few frames
it obviously wouldnt work if you paste this in debug console:
params ["_player","_jip"];
if !(_jip) then {
_pos = getPosATL player;
_player setposATL [(_pos select 0),(_pos select 1),(_pos select 2)+1000];
removeBackpack _player;
_player addBackpack "B_Parachute";
};
π
You can add code to the respawn module
not the last per frame. It starts from the start of the queue each frame and runs for 3ms. Each script that was executed get's pushed to the far end of the queue
so every other script will execute atleast once before your sleeping script is checked again
Just put (_this select 0) enableVehicleSensors [blah];
your second statement is true
EntityRespawned doesn't trigger for vehicles
Ohh okay
Because, as I said, vehicles don't respawn.
Ok so
- Scripts not executed in a frame are higher priority next frame due to them being "left over in the queue"
- If a sleeping script was checked, it gets pushed to the back of the queue
yep yep.
@peak plover Ok So I just put _player = player;
_pos = getPosATL player;
_player setposATL [(_pos select 0),(_pos select 1),(_pos select 2)+1000];
removeBackpack _player;
_player addBackpack "B_Parachute";
inplace of what you originally sent me and it worked
π
Ok, but then
Add
if (time < 30) then{```before and a
```sqf
}```
after
Otherwise all players might get it
Even if they jip
Well I want everybody who spawns to do it, we only play with 3-4 people π
Sure, but the vanilal respawn system will make everyone who joins after 30 seconds spawn with the respawn system
ah..
So it would break/not work
You all get into the mission together so you will all get it
I'm going to feel stupid for asking this but where do I add the new lines?
I only started doing this about a week ago.. lol
thats what mine looks like
Soo
Check this out
This is how you can use a if
if you want to do more and learn, then get started early
if( I am confused, what do I do? π
if ( CONDITION ) then {
CODE
};
if will be followed by a condition, if this condition is true it will execute/run/continue with the code inside the curly brackets after then. But if it's false it will skip it
ugh, you don't need to put that code into the eventhandler
I don't..?
// Start the unit in air if it's been less than 30 seconds
if !(didJIP) then{
_player = player;
_pos = getPosATL player;
_player setposATL [(_pos select 0),(_pos select 1),(_pos select 2)+1000];
removeBackpack _player;
_player addBackpack "B_Parachute";
};
// Handle JIP respawn
missionNamespace setVariable ["_initialRespawn", addMissionEventHandler ["PreloadFinished",
{
removeMissionEventHandler ["PreloadFinished", missionNamespace getVariable ["_initialRespawn", -1]];
missionNamespace setVariable ["_initialRespawn", nil];
if (didJIP and (time > 30)) then
{
player enableSimulationGlobal false;
player enableSimulation false;
player hideObjectGlobal true;
player hideObject true;
forceRespawn player;
deleteVehicle player;
};
}]];
On your pastebin
DId anyone every try to use emoji as Variable Names in Arma?
line 15 > line 35 the curly brackets show the code inside the eventhandeler
Oh god, that's the best idea today
So just put that in and we're golden?
arma 4's scripts will be powered by emojis>
Victus, try it out
You need to take baby steps 'tho, because it seems you are still not grapsing the subject
Start small. There's ton of scripts online that you can learn from
_π’ = "hello";
hint _π’;
can someone try that in debug console?
I mean it seems to work, will have to test it with friends
or
missionNamespace setVariable ["π’","hello test"];
hint (missionNamespace getVariable "π’");
test Β―_(γ)_/Β―
missionNamespace setVariable ["Β―\_(γ)_/Β―", 1];
missionNamespace getVariable "Β―\_(γ)_/Β―"
1
This works
Yeah. I asked if someone could test that cuz I don't have Arma open
How do you get emojis
So Japanese characters do work.
β
u\AFAS;Β©ββΌΒ₯vβ¬zΓ
missionNamespace setVariable ["π’","hello test"]; (missionNamespace getVariable "π’");
reports "hello test"
Inb4 whole missionfile only uses smileys as variable names
But idk if it can differentiate between the emojis or if they all default to some null characters or something
Arma cannot display them
π€ π
Well if it understands UTF8, you are free to use any characters you want
does that real variable without get/setVariable thingy also work?
I know russian Variable Names work. So I guess everything does
No, only accepts a-z and _ as first char for variables
Levitating businessman π
That's bad
Mikero should use Emoji's in Variable names for his obfuscation
Lol
missionNamespace setVariable ["π€", "thinking"];
missionNamespace setVariable ["π", "smile"];
[missionNamespace getVariable "π€", missionNamespace getVariable "π"]
Would be funny the moment someone tries to deobfuscate and send it to his partner, it's full of emojis
Don't know how notepad displays those
haha
Windows can do that. Arma apparently not.
I assume it shows those plain simply versions?
Guess what! Orange DLC = Emoji
*simple
If I copy my versions, it says ":thinking :" :/
orangle dlc replaces all text and script commands with emjoy
"Experience full scale open world warfare with the Emoji-DLC. Command squads with new dimensions, experience real communication problems, adding emojis instead of names or colors to squads! "π€, move, one and a half click, Nord East! ""
Brilliant DLC
By the time ArmA 4 releases, everyone will have forgotten his native language
π π π
player π° otherUnit makes player look at other Unit and play funny animation lul
DLC releases 4th of π
Is there a better word to use when searching for 'Parameters'? I'm looking for the ones you change before a mission and not the -no splash screen ones
these things
Mission Parameters
Thanks.
Is it possible to actually change the starting times to something more specific IE 6:15, 6:30, 6:45 etc?. I may as well ask here before I research this
ok thanks, now to figure out how to do it π
They are configured in description.ext
@little eagle with the following, the text is created at the center of the screen and then moves to the desired position. Is there a way to create it at a set position, and have no movement? ```SQF
_control = findDisplay 46 ctrlCreate ["RscText", -1];
_control ctrlSetPosition [0.967152 * safezoneW + safezoneX, 0.951388 * safezoneH + safezoneY, 0.0352567 * safezoneW, 0.0470196 * safezoneH];
_control ctrlCommit 1;
_control ctrlSetText "AI: 999";
Look up ctrlCommit on the wiki
Ah, so ctrlCommit 0;
Thanks.
Hmm, why am I getting an undefined variable error in a spawn loop after the above code (I removed the private) ```SQF
[] spawn {
_control ctrlSetText str time;
};
Because _control is undefined. Local variables don't carry over into threads.
don't you need to pass it as argument to the spawn?
Yes, you do.
Well, today I learned.
e.g.
_control spawn {
_this ctrlSetText str time;
};```
Now it doesn't like serialization π
Is it bad practice to disable it in XEH_postInit?
@jade abyss What you posted will always error. You cannot not pass a control or display inside an array.
@tough abyss Serialization is disabled on a thread by thread basis. So your suggestion makes no sense.
Stop making mistakes then.
No! I refuse!
Stop making me correct you!
I call you X from now on.
The only error I get from @jade abyss's code is "serialization not supported for _control".
Yes, you cannot pass a control unless it is inside an array.
Which is exactly what Commy said π
Because the guys that made SQF are weird.
wait a sec
what if you add disableSerialization before _this bla (fk... i hate that word)
You can't. _this exists before you can use any command. That is why you have to pass it as an array.
gay
Commy you typoed before You cannot not pass a control or display inside an array.
The game does not complain about arrays containing controls and displays.
5:04 PM
@little eagle the game will find something to complain about...
Strictly speaking, you don't have to disable the serialization. You just cannot ever store a control or display inside a variable unless it's an array.
I still have no clue, why you have to disable it anyway Β―_(γ)_/Β―
You can keep using
(_this select 0)
No, you don't have to.
I wouldn't do it just out of spite.
Well ```
18:10:00 Error in expression <AI: 999";
[_control] spawn {
_this ctrlSetText str time;
};>
18:10:00 Error position: <ctrlSetText str time;
};>
18:10:00 Error ctrlsettext: Type Array, expected Control
π€·
Well duh.
_this select 0 ...
Right.
_this is now an array and not a control.
I was about to ask how to un-array an array π€¦
π
Yeah param [0].
for example
This is somewhere inside the an addon ```SQF
// param [0] is _this select 0 but faster, said commy2
param [0] params ["_control", "_value"];
param [0] is slower than _this select 0
lol, should've double checked.
We prooved that as Commy talked about that with you a couple days ago
But is it as fancy?
@still forum I saw that but ^
but using param with default is faster than using select 0 with if isNil
So.. You thought "It's fancier.. So I'll just use it and add a comment saying that it's faster"
Yes.
Looks nice == fast. Okey. Good. Well...
comment "is faster!";```
Set all your graphics settings to max and you'll get more FPS.
It's sad that this is actually kinda true for Arma...
comparing strings isEqualTo is faster @still forum
@still forum I rest my case.
Why are you telling me things that I know @peak plover ?
you use nice == fast
"faster" is not the comparative of "fancy"? Sorry, English is my second language. :3
Not seeing my sarcasm? .-.
Also the text in the control isn't updating.
Well it's common sense
*'set your settings to high to reduce cpu load'
I don't remember stopping time being a feature of this script π€
Shit. I'm off the case
#arma3_scripting always does that
@jade abyss comment is a reserved variable. That will error.
remove the = ... oh ffs
haha
π΅ π΄
π
π
π
I'll go ahead and rustle some jimmies here. Is while {true} do {}; the same as [] spawn {};?
No.
dscha isn't as fit as he used to be π
No, while {true} do {} will run indefinately and script won't continue from it
I got fkn 32Β°C in my flat... i am happy that i am still alive and not melted away
indefinitely*
Wait so why is the time not changing?
What's your script?
This inside debug console ```SQF
_control = findDisplay 46 ctrlCreate ["RscText", -1];
_control ctrlSetPosition [0.967152 * safezoneW + safezoneX, 0.951388 * safezoneH + safezoneY, 0.0352567 * safezoneW, 0.0470196 * safezoneH];
_control ctrlCommit 0;
_control ctrlSetText "AI: 999";
[_control] spawn {
_this select 0 ctrlSetText str time;
};
I don't understand.
[_control] spawn {
waitUntil {_this select 0 ctrlSetText str time;false};
};
try this
Use param [0] REEEEEEEEEEE
You didn't either.
use () around your _this select 0
Because now you set the time every frame.
nigel, exitWith will not leave the waitUntil scope.
Are you sure?
Yes.
Yep
Try it.
We had that Discussion a few weeks ago
ahh, woa, yeah have to exitWith {true}
It's retarded, but it's also SQF we're talking about.
Yeah, that is different then.
I've used this as well, but yeah SQF is pretty surprising
So in theory waitUntil's scope is not an actual scope?
It's a scope you can't leave with exitWith.
But it will start agin
Can't remember if we tried breakOut / breakTo or throw for that matter
Voodoo magic.
execute code once and always exit
Doesn't exitWith in waitUntil exit always?
Ok, so exitWith will stop the current loop but a new one will be created instead
No, dedmen. You cannot leave the waitUntil scope with exitWith as was said 5 lines above.
waitUntil {if (isNil "test123") exitWith{exitWith{};};true}
ffs
How many exitWiths are we going to test?
So it was not that exitWith leaves always it was that it leaves never also when you exitWith true right?
won't work nigel
Vote:
Remove write Permission of Nigel
[X] Yes!
[] Maybe
[XXX] Commy smells like old chicken
It leaves every scope, dedmen. Except the waitUntil one.
Also thanks everyone, the fancy AI counter now works.
Yes. But something with exitWith on waitUntil was special. does exitWith true end the waitUntil? because it returns true?
How does old chicken smell like?
atm, yeah.
No
No, it runs once at mission start.
What runs on repsawning units, then?
respawned
or onPlayerRespawn.sqf or what it's called
Yeah. Those 3 ^
What about these? https://community.bistudio.com/wiki/Event_Scripts
That's exactly what I just said
XEH_postInit is essentially the same
[] spawn{
sleep 5;
test123 = true;
};
[] spawn {
test123 = nil;
waitUntil {
if !(isNil "test123") exitWith {};
hint 'running';
false
};
hint 'stopped';
};
Everyone has CBA and everyone needs CBA anyway. If you are making Mods that is. Not for Vanilla Missions ofcause. But who plays Arma Vanilla?
final hint displayed after 5 seconds is 'running' and the loops ends
@still forum I bet even the devs don't play vanilla.
Ohh, I thought you said that it does not exit at all
The dev's probably play with the newest dev version of the latest DLC loaded as Mod
Which I actually really just said again.
exitWith {true} ends me with "stopped" hint
Q: What's faster hint 'some text'; or hint "some text";?
no difference
btw you don't really need XEH_postInit if you just need postInit
Well one runs scheduled and the other unscheduled. So it's your choice between a short loading screen or a 30 FPS, long loading screen...
Attribute postInit is scheduled? WTF BI
typing " takes longer because you must alos press shift, therefor ' is around 0.5 ms faster
On German keyboards " and ' both need shift
You know what's faster? param [0] π
Always.
well, I didn't know that exitWith {} leaves the whole thing, but exitWith {true} means it will end the waitUntil and continue on
This is very interesting behaviour
It just did
no
Returning true is what makes it leave, nigel
It stoppped the loop
Not exitWith
No it its pretty logical? Waituntil checks if the return value of the scope is true
It jumped back to the first line of the waitUntil
Don't tell that to a logician.
It's true I'm telling you
^^
One moment
I leave those alone in their dark cellars
Inb4 "OH right!".
ILL SHOW YOU ALL!!!
πΏ
πΊ
(buys a gun)
π’ π«
exitWith {}; stops the loop and does not show hint 'stopped';
Therefor it leaves the whole [] spawn {};
Because if I use
[] spawn{
sleep 5;
test123 = true;
};
[] spawn {
test123 = nil;
waitUntil {
if !(isNil "test123") exitWith {true};
hint 'running';
false
};
hint 'stopped';
};
Last hint I see is "stopped"
Do I really need to explain it to you step by step?
exitWith doesn't stop it. Returning true via exitWith (or not) does.
waitUntil {
if !(isNil "test123") exitWith {};
hint 'running';
false
};
test123 is nil.
if !(isNil "test123") exitWith {}; //isNil check is true. get's negated to false and exitWith is not executed.
hint 'running'; //hint is displayed
false //waitUntil loop continues running
test123 is not nil
if !(isNil "test123") exitWith {}; //isNil check is false. get's negated to true and exitWith is executed. exitWith exits the current run of the waitUntil but doesn't end it.
Next frame
if !(isNil "test123") exitWith {}; //isNil check is false. get's negated to true and exitWith is executed. exitWith exits the current run of the waitUntil but doesn't end it.
Next frame
if !(isNil "test123") exitWith {}; //isNil check is false. get's negated to true and exitWith is executed. exitWith exits the current run of the waitUntil but doesn't end it.
Next frame
if !(isNil "test123") exitWith {}; //isNil check is false. get's negated to true and exitWith is executed. exitWith exits the current run of the waitUntil but doesn't end it.
Next frame ...
get it now?
The loop never stops.
I am sorry πΏ
[] spawn{
sleep 5;
test123 = true;
};
[] spawn {
test123 = nil;
waitUntil {
hint 'pre exit';
if !(isNil "test123") exitWith {true};
hint 'post exit';
false
};
hint 'stopped';
};
Yeah, that's my mistake right there
So the script we get working 10 minutes ago doesn't work from XEH_postInit.
π
Does the interace exist during postInit?
Maybe. Maybe not.
perhaps you need something like:
waitUntil {!isNull (findDisplay 46)};
He wanted something that runs on respawning units?
There's the init xeh
class Extended_Init_Eventhandlers
{
class Man
{
// To use the exclude directive, we'll have to make this an
// "inner" (composite) XEH init EH class
class XEH_Exclusion1_Man
{
exclude="SoldierWPilot";
init = "[] execVM '\xeh_exclusion_example1\init_man.sqf'";
};
};
class SoldierWPilot
{
xeh_init = "[] execVM '\xeh_exclusion_example1\init_west_pilot.sqf'";
};
};
Is this what you want @tough abyss
Then youd still want the respawn one
true
@peak plover I don't need something that runs on respawning units, atm.
@tough abyss thanks, I'll try it.
Having a hard time wrapping my head around XEH_postInit. Stuff like addAction works, so the unit exist, but it doesn't have an interface, yet?
what do you mean by "interface"
Display #46.
Isn't it the "main interface"?
I don't remember the exact terminology.
@tough abyss, doesn't work. ```
19:45:57 Suspending not allowed in this context
19:45:57 Error in expression <og ""nev_debug_menu"""];
};
waitUntil {!isNull (findDisplay 46)};
_control = f>
19:45:57 Error position: <!isNull (findDisplay 46)};
_control = f>
19:45:57 Error Generic error in expression
19:45:57 File NEV_Addons\addons\nev_debug_menu\XEH_postInit.sqf, line 12
Why do you choose unscheduled environment if you want scheduled?
TBH I've yet to grasp the idea of scheduled and unscheduled...
Okey. Take your time then and come back when you're done
lmao
What I do know, is that if I can't suspend a script, I need to spawn it, and not call it.
if you are in unscheduled
you can't suspend in unscheduled because the engine freezes completly till your unscheduled script is done running
suspending there would freeze the engine completly for however long you suspend
Which is why that is disabled
Read the wiki page about the Scheduler
I never liked that "the engine freezes completely" explanation, because all it does is error out and not freeze.
Would the engine be faster if it didn't have to check for that error 'tho
Yes.
Well. As I said it would freeze the engine. If it wasn't disabled
@peak plover no. the Sleep command would be faster by a few nanoseconds
The scheduler is the part of the game engine that decides which thread runs at a certain point in time.
What is a thread?
Nope. Not Googling for you.
What is a thread?
A long piece of fiber.
π€¦
isn't it interwoven fibers? is interwoven even a word?
That actually explains it quite well.
A script is a fiber. And a thread can be mutliple scri... actually not that well
No, the whole script instance is one thread.
Is there a max number for threads?
@tough abyss Btw the wiki page explains that one line below the text you quoted
Is there a max number for threads?
Yes. Don't worry about it.
threads : 0
for "_i" from 0 to 1000 do {
[]spawn {
while {true} do {
sleep 1;
};
};
};
threads : 1000
There is a max number of everything in the world that isn't something metaphysical like numbers.
Yeah okey. So yeah. Max number of Threads is dependent on how much Ram you have
@still forum it doesn't explain what a thread is, it just says that threads are created when you spawn, execVM or exec.
Ok?
So basically
[] spawn { a = 1;};
[] spawn { a = 2;};
we don't know which one will finish first
So in order to fix the suspention issue I have to spawn a function from XEH_postInit?
I don't know what that part talking about call is in threads.. That totally doesn't belong there
They run next to each other ... kind of
Or use postInit via CfgFunctions
If you want to use sleep. You have to use spawn/scheduled
@still forum I don't use CfgFunctions.
something something DisplayLoad
Btw using CfgFunctions is extremly fun
I just CBA for that π
#ifdef is pretty fun as well
what does faction return for dead players? i'm trying to get around the fact that side is useless after death
Probably doesn't change when dying.
All it does is read the faction entry from the objects class.
And that one never changes.
cool, thanks
@still forum so do I put just the waitUntil in CBA_fnc_waitUntilAndExecute?
Or the whole script?
Because this looks very useless ```SQF
[
{!isNull (findDisplay 46)},
{true}
] call CBA_fnc_waitUntilAndExecute;
Maybe replace true with something useful.
I'm assuming the script continues to run after the line with the function?
?
[{}, {}] call CBA_fnc_waitUntilAndExecute doesn't act as a waitUntil for the whole script, right?
No.
Ok, thanks.
It couldn't.
Nice, it works. Thanks.
Although I still don't understand this line π ```SQF
waitUntil {(_this select 0) ctrlSetText str time; false};
Why do I need waitUntil and false?
It's an infinite loop.
The code block after waitUntil is executed every frame* until it reports true.
So never. It runs forever.
Oh, ok.
Which means that every frame* the control sets to the current time.
So it's 2 parts, (_this select 0) ctrlSetText str time and false.
Yes, two statements. Statements are separated with semi colons.
1st part is the actual code we need to run, 2nd part is there to report false to waitUntil.
You can have any number of statements. It's just that the return value of a code block is the same as the return value of the last statement.
false is a command that always reports the boolean false.
So false being the last statement in the code block means, that the code block reports false.
And if the waitUntil code block reports false, the code block is executed again in the next frame*.
Alright that makes sense, thank you every much π
If the code block of waitUntil reports true, then the code continues after the waitUntil command.
@digital pulsar
what does faction return for dead players? i'm trying to get around the fact that side is useless after death```
try `side group _Corpse`
Yes, but have you written it, or have I written it?
Ha, I don't mind. I just wanted to be cheeky.
On side note - having an AI counter on during official BIS missions will scary.
@open vigil
#offtopic_arma is the bantz channel (to a point)
Need a specific one π
How do the default data types for param work?
params [["_var", dataTypeValue, [expectedDifferentDataTypesArray]]]
It's an array of samples of all data types that are accepted.
[] means all are accepted
Yes.
which would mean if not [] is passed, it will default to ["string"]
That means only array is accepted
@peak plover per your example, you would default to an array [west, east...] if not they are passed
and it would have those values
It says type string, expected array
Then _this is probably a string and not an array.
Maybe it's carried over from a lower scope
The unary call does that.
_this = "";
0 call {
_this // 0
};
call {
_this // ""
};
hmm, shouldn't
It does not seem to get _this from anywhere
Ohh I think, it's because [_this]
means it's always an array
nvm, it should not
Then it wouldn't complain about strings.
systemChat str [_this];
Just add this ^ line and see what it is.
I want a function to be used with nothing, or with an array. I'll try that
okay, that's happening because of debug window code check box
But still does not work
Maybe post more than one line.
// Dead side
// Returns array with all the dead units (for side)
// Defaults to all sides
// [west,east] call respawn_fnc_getDeadArray;
"respawn_fnc_getDeadArray" spawn debug_fnc_log;
str _this spawn debug_fnc_log;
// Code begins
private _sides = [_this] param [0,[west,east,resistance,civilian],[[]]];
private _deadUnits = [];
// Check all players if they are dead and on the side requested
nul = {
_unit = _x;
_unitDead = _unit getVariable ["unit_respawn_dead",false];
_unitSide = _unit getVariable ["unit_respawn_side",(side (group _unit))];
// If unit is on side requested and dead add him to _deadUnits
str _sides spawn debug_fnc_log;
if ((_unitSide in _sides) && _unitDead) then {
_deadUnits pushBackUnique _x;
};
true
}count allPlayers;
_deadUnits
I guess I can just not use param as an alternative
It'll get ugly 'tho
And how is that function called?
[west,east] call respawn_fnc_getDeadArray;
// works
call respawn_fnc_getDeadArray;
[] for both debugs
Yeah, as I said, the unary version of call carries over the parent scopes value of _this.
call respawn_fnc_getDeadArray;
->
[] call respawn_fnc_getDeadArray;
still []
private _sides = [_this] param [0,[west,east,resistance,civilian],[[]]];
->
[_this] params [["_sides", [], [[]]]];
if (_sides isEqualTo []) then {
_sides = [west,east,resistance,civilian];
};
Was there ever any doubt?
Nope, I know by now that pretty much everything is possible to some extent
aaaanything is possible https://html5zombo.com/
But I'm the first one that says that something isn't possible.
@rotund cypress #offtopic_scripting
@little eagle what's the hardest script you had to write?
The ones that never got anywhere and thus were never published,
Out of the ones that were published.
Probably the CBA settings framework, but I am the proudest of this: https://github.com/CBATeam/CBA_A3/pull/226
+1,202 β4,100
You don't get nearly enough credit.
Pretty sure there is an engine function for stacked init eventhandlers now
yes. addMissionEventHandler
but you can't pass parameters along with it like you can with BIS_fnc_stacked..
No i was talking about stacked eventhandlers init config wise i mean. I tend to ignore sqf code, that you can implement yourself.
Not aware of that. Besides CBA's XEH
There is not (if I understand this correctly).
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/addMissionEventHandler#EntityRespawned
There is only entityRespawned and entityKilled, not entityInit or entityCreated
Didn't bi added a way to create that behavior via addon Config?
No.
https://dev.arma3.com/post/sitrep-00132 Bottom of sitrep, pretty sure i read it elsewhere aswell
Yup
Yes, but that would require ACE for example to have this class in every custom object.
ah yeah
That's what I meant
Yeah, I use that in the XEH rewrite. But it's only half the task done.
I tend to ignore sqf code, that you can implement yourself.
You couldn't implement the BIS stacked eventhandlers yourself. At least before they added those addMissionEventHandler versions and now rewrote the function to use those. This thinking is what made Exile break when used with TFAR...
why did exile break when used with tfar?
Used onPlayerConnected instead of the stackable version, so TFAR, which did use the stackable version correctly, overwrote it.
And that caused something about bambis and being stuck in the loading screen or something.
I meant that is in adding mod dependencies for the odd sqf function :P
BIS code i always try to look at first, some of it find some of its not bad
That's garbled.
How does PATHTO_R work in ace3?
Does not excist in coding guidelines where GVAR and FUNC are
I don't get it... why even bother writing ARR_4 ? Why not just 1,2,3,4 ?
#define ARR_4(ARG1,ARG2,ARG3,ARG4) ARG1, ARG2, ARG3, ARG4
Because that doesn't work in Macros
Only difference is the ()
In Macro's the , denotes the start of the next argument
Snap
(,) keeps it in the before argument (),() is two arguments
(1,2,3) is still 1 argument
Ahh I get it I have to use it because the thing uses QOUTE before, so that makes it a makro
#define myMacro(param1, param2, param3) param1 | param2 | param3
myMacro([1,2,3], p2, p3) -> [1 | 2 | 3]
myMacro([ARR_3(1,2,3), p2, p3]) -> [1,2,3] | p2 | p3
playSound3D [ARR_7((QUOTE(PATHTO_R(sounds\def\start.wss))),_player, false, (getPosASL _player), 1, 1, 15)];
why are you using PATHTO_R?
playSound3D [ARR_7(QPATHTO_R(sounds\def\start.wss), _player, false, (getPosASL _player), 1, 1, 15)];
QPATHTO_R is the same as QUOTE(QPATHTO_R
Yes, that's what I thought, but then I realised I am not very familiar with macros and since they used that in ace3 , it must be the correct way
QPATHTO_R throws an error
with QOUTE(PATHTO_R i get an error "missing ]" right after the QOUTE
I assume I can't use qoutes as well because it's already in some qoutes
show full line
statement = QUOTE([ARR_4(_player, _target, 'body', 'Defibrillator')] call DFUNC(treatment); playSound3D [ARR_7(QOUTE(PATHTO_R(sounds\def\start.ogg)),_player,false,getPosASL _player,1,1,15)];);
QOUTE
HAAHAHA
QUOTE
I've lived my whole life without knowing how to spell Quote
Ok, let's try it now
Thank you dude
it works
I can finally sleep at peace
I cant remember if ive asked this before on here, but is there any way around the issue where dead bodies will not pop out of exploded vehicles when they are deleted? For example, a helicopter full of players gets destroyed and everyone dies. You delete the helicopter wreck, and only the pilot's body pops out
This?
I've had the same issue. Killing units with script won't cause this, but killing them with real events in-game will cause units to not work with scripts like deleteVehicles _deadMan;
Best part is that it happens to only ~75% of the units
What's the point of a newline at the end of a file, and why doesn't GitHub disapprove of not having it (π«)?
(Sorta, kinda scripting related π).
Imo it's a problem with the definition of line being wrong, but there's your answer.
@little eagle Ill give that a go, its behavior is very weird. Sometimes certain players CAN see the dead bodies from the wreck, but others cant. Almost like its a locality issue, but im not sure. @peak plover Thats not really the issue from what I read in that ticket, but might be along the same lines. I just want everyone to be able to see the dead bodies, for revive scripts etc. But instead the pilot's body seems to be the only one that comes out of a deleted vehicle wreck most of the time
Yes, I assume this is similar, it's pretty much unability to setPos or do anythign fun with units that die inside vehicles
Well thats the thing im not doing anything with the units, other than cleaning up destroyed vehicle wrecks in a cleanup script
I literally had to add a getVariable ["deleted",false]; to my clean up script, because dead units won't sometimes delete from vehicles and I couldn't even setpos them
Can't you just delete the wreck and then create some new bodies?
I probably could, but silly that should be needed. Dead bodies should just eject out of a vehicle when its deleted like it does for the pilot
- delete crew
- create equal amount of corpses around the wreck
- delete wreck
@little eagle 1. won't work sometimes
Maybe they should, but they don't, so there's that.
@peak plover
- mark crew with variable
- create equal amount of corpses around the wreck
- delete wreck
- delete all remaining marked corpses
Put all that into a function called "My_fnc_cleanupWreck". Call function when needed.
Yes.
Just did a quick search cause I thought I had asked this a couple months ago, turned out I did. @jade abyss Suggested creating a temporary unit in each seat of dead units, to 'force them out' in a way. I might give that a go before resorting to creating bodies myself
I tried that, but couldn't get all units out as the dummies would push out each other and not the original crew.
You can also add a onKilled EH and if the unit is about to die inside a vehicle, drop the guy out next to vehicle and kill him
Only one AI dropped out and then it stopped and shoved out my dummies instead.
killed eventhandler triggers after the unit is dead, so I assume that that changes nothing.
Hey ppl! What's up? Are subarrays passed by value or by reference when you do a select?
I want to store lots of data in a single array, but want to change stuff inside the subarrays, can do manual sets but it's a pain
u could filter with count...
_array = [[1,2,3],[2,3,4]];
_array2 = _array select 0;
_array2 pushback 99;
systemChat _array //[[1,2,3,99],[2,3,4]]
_array = [[1,2,3],[2,3,4]];
_array2 = [] + ( _array select 0); // not [] but ()
_array2 pushback 99;
systemChat _array //[[1,2,3],[2,3,4]]
Are subarrays passed by value or by reference when you do a select?
reference
Think of arrays as objects you can put stuff into.
And keep in mind that + and - and some other commands create new such "objects".
ohh yeah + (array select 0) works as well as [] + (array select 0)
thats clear but somehow I thought that select would alway do a copy for the resulting array
I think copying the array is the exception.
Yes
Only +, -, select CODE, apply and arrayIntersect copy the array.
I even wondered how select is so fast while copying π
You get a reference to the object/array as you would in other programming languages
but it doesn't
@little eagle select copies the array?
I had a huge array and didn't know that it edits the array if I use set and pushback etc. shit confused me so ad
Ah okay
ah okay
that sehd some light
shed
some more light ^^
and reduces my bug count cause I mostly use it with CODE
Actually the fact that you get references of arrays is quite handy
Yes, which is why it sucks that select CODE, apply and arrayIntersect always copy it.
It's handy if you know about it
Would've been more useful if they didn't.
Should be included in the wiki what uses references and what not, as far as I know that isn't mentioned in the corresponding wiki pages
If you have no clue, it can be a pain. I thought _local ment that I could do whatever I want to the array with no consequences... ohh, I've never been so wrong in my entire life
Well it's kind of unexpected to be honest. In a language that doesnt use objects atleast
I wouldn't rely on using array references if it's not needed. And it seldom is. I think it hurts readability. I would only worry about it, if it can save performance. Because copying arrays is pretty slow.
Wow! @little eagle as helpful as ever!
Hey guys, is there any style or type to invert progress bar ctrl so 0 is at right and 1 is at left?
Or do I have to do that myself in code?
1 - _progress
?
Ye of course, was just wondering if there was any way to just do it via ctrl instead
I don't think so.
Alright, thanks
I didn't know about that, and it's really good to know. I doubted how RVE stored data
@little eagle , are you get paid? You are always present and helping
No, I just have the week off.
well, we have to start a poll or something with the admins to get you a few free beers
@peak plover is that a display?
my goal:
Add a clickable entry in the briefing that will run a function
I want to avoid using addAction
But I want the diary entry to be removed once it's used
What do you want to edit? Not the command itself I suppose?
The diaryRecord that I will create with this will have a clickable function. I want the diary entry to get out/be deleted/edited
<execute expression="Code to execute">Text</execute>
Ok, but how do I get rid of this diary entry now?
Once it's used I don't want it to clutter the diary
Yeah, I tried google, he was not very helpful
Ye I don't think you can
What are my alternatives?
Make a display
I feel like if I make a dialog it will be alot of trouble to get it to work well and not be annoying
Because if it appears when I open the map, it might obscure the thing
...actually
If you have troubles with getting displays to work and want an easy way, I guess you could use something as http://convert.sqf.io/
Converts it from GUI editor directly into SQF
MAybe something for you
ugh.. the a3 gui editor is weird
Ok new plan that might work:
Choosing the "COMMANDER" diary entry will execute code to open the dialog and unchoosing it will close it
I got the dialog example from workshop and used that as a base and got it working pretty good
But I'm not entirely sure how to make it so that the dimentions remain good even with 4:3 or smaller sizes etc.
safezone or pixelGrid
Yeah the arma 3 gui editor isnt the best, few known bugs and it doesnt have many controls added
I assume I can create like custom buttons dynamically? How hard would it be to create a dynamic system similar to the diary, but having the ability to add/remove/edit elements at any time?
Theres plenty of commands for making controls dynamically. Just a matter of managing them in an array or something for easily adding/removing/editing them
I guess that's what I'll have to do. I could still use the briefing, but it might get cluttered
is there a way to create custom event handlers for objects?
i need to create an eventhandler to an object and call it later
and i want to refrain from using waitUntil because I like 60 fps
What are you trying to do?
Well, either add an eventhandler
You can also use scripted eventhandlers
But really no use for it
@mortal halo
like object addEventHandler ...
However, in ArmA, you can not make your own eventhandler.
i need to check if a container's cargo has changed
and it changes via script so you can't use inventory related stuff
Sure the basics are pretty simple if you can also always fire it yourself.
E.g. you control the scripts that change the inventory
Just maintain a list with all the functions that need to be called and a function that calls all of them
Anybody know where cfggroups is (providing this is how to change an AIs loadout)
Just looking to make the Syndikat Stalkers a little bit more robust and the Viper Stalkers to not have the 50 cal weapon as it's too good for a pick up in the early game for my mission
The loadout of a unit is defined by it's CfgVehicles class.
Just pointing out early that you cant edit those with just a mission
@little eagle Where would that be located?
characters_f.pbo
@obsidian chasm, you're building a mod, not a script if you go that route. It's not a problem, but know that players joining your mission will need the mod to get the intended effect.
Would be better to script it with an event handler.
@shadow sapphire Right now I am editing 'Escape Tanoa'