#arma3_scripting
1 messages ยท Page 299 of 1
Sperating the command and it's params makes me thinks the params belong to remoteExec.
How come?
And here I am, still using public variables and blacklisting remoteExec completely.
ew
publicVariable is much easier to understand.
well not really
PV requires handlers, remoteExec doesn't
kinda
probably wrong ๐
Personnally i prefer remoteexec, but i can see why PV can he easier for addon makers.
Because you don't need to tell people to update thier CfgRemoteExec if using one in their missionfile description.ext
Yeah, some "Add this files to an existing RemoteExecConfigFile"-like Config Entry would be awesome.
isn't cfgRemoteExec part of the master config.bin?
Can be overwritten by mission.
And when you have to whitelist the commands anyway, you might as well set up the PVEH thing.
Haven't used that yet.
Simply open debug console and type utils 1 then click on LOCAL EXEC (available since Arma 3 v1.67) @tough abyss
@little eagle but it completly overwrites it or expands it?
would be cool if a mod could define the cfgRemoteExec for its own scripted systems and be fine
Yeah, but then again, you might as well set up the PVEH stuff before you bother with configs and whitelisting and serveradmins overwriting your whitelists.
Why?
If ServerAdmins want to overwrite your Whitelist (and get Probs with it) ->Screw em, not your fault.
+setting up the config for RE is easier (and faster) than writing down lines and lines of codes for PVEH
not sure if i follow you guys ๐
๐
is a cfgRE defined in a mode even used at the mission stage?
or just whiped as soon as a mission has its own in the desc?
Okay:
RE checks the Mission for REConfig -> If found -> Use that +ignore Addon
// postInit
["my_setFuel", {(_this select 0) setFuel (_this select 1)}] call CBA_fnc_addEventHandler;
["my_setFuel", [_truck, 1], _truck] call CBA_fnc_targetEvent;
Doesn't get simpler than that.
Wanna bet?
show
How much?
?
[[_Veh, _FuelAmount],{(_this select 0) setFuel (_this select 1)}] remoteExecCall ["call",_Target];```
Nothing else.
Or even use setFuel, instead of "call"
Since its coming from the Server -> Noone cares.
If you say so.
RE doesn't check ServerSide send Commands
Only from Client
also
class MyTag_fnc_MyFunctionName { allowedTargets = 0; }; //client can target Server AND Client
class MyTag_fnc_MyFunctionName { allowedTargets = 1; }; //client can target ONLY other Clients (not Server)
class MyTag_fnc_MyFunctionName { allowedTargets = 2; }; //Client can target ONLY Server
That what you can't rly do with pveh :/
So with that in my mind (AND when adding Updates to the RE-Whitelists in Addons is added) -> RE is better, imho.
RE doesn't check ServerSide send Commands
Only from Client
So?
I never needed to whitelist any functions, that are beeing send from Server to Client. So, yeah.
how can i customize the difficuly settings on my server?
i see the stuff about CfgDifficultyPresets but how can i overwrite that?
in the description.ext?
or mainly: how do i get rid of friendly and enemy tags?
Not with #arma3_scripting
cant find that profile file.
It's in your config folder
only config folder that i have here contains just a config.vdf
its a rented server, probably differnt somehow?
I just got here, but is Arma already fully installed and running on the server or are you setting up
My server is at C:\Server\Arma\Config\Server2312
-config=C:\Server\Arma\Config\Server2312\config.cfg with this in startup parameters
So I downloaded killzonekids 64 bit dll's, but I'm getting "Call extension 'make_file' could not be loaded" so I tried make_file_x64 but that's not working either
64bit dlls for what?
didn't know these were around
"debug_console" callExtension "12345"; works properly, so I don't think calling extension make_file_x64 will work
documentation of make_file is here http://killzonekid.com/arma-extension-make_file-dll-v1-0/
Are you using any of the new drive onpath scripts?
so basically it's when a distance on the vehicle is reached it goes around it
then when it's ahead it pulls a sharp turn
close enough
at least enough to add some challenge to your speeding escepade
So this confirms that if you attatch a position to a vehicle it will follow it
with the setdriveonpath
I still gotta try that command on jets
This is great, I've been wanting to make a chase scene for a while
That actually reminds me, is there a way to force AI to turnout on the offroads?
you could do some serious chasing with AI shooting from the backs of those
ya but forcing them to stand up
ya that's what I mean
unit action ["TurnOut", vehicle]
Pretty sure AI will switch back to whatever they prefer immediately.
That's my concern
may just be one of those things I can't force aI to do
so they can shoot forward
they can only shoot backwards if they sit
also they can't use rocket launchers facing backwards
kinda hard to do that and have them shooting something
BI kinda jerry rigged the armored turnout system to change animation in the cars, maybe we'll see a change with that who knows
maybe turn around instead of turn out
im having a brain fart. What would you say when finding the closest number to a given number in a list, So
[3700, [1000,2000,3000,4000,5000,6000,7000,8000,9000,10000]] call findClosestNumber;
something like that
obviously the closest number is 4000
so how would I formulate a function findClosestNumber
Nah man, closest is 3000
fixed lol
round, *1000, /1000
If yes, then just do: _number = round(_number / 1000) * 1000;
thanks
Otherwise easy solution would be to sort numbers with sort command, then do forEach
or even no sort if you manually input the numbers already in order
_number = 1234;
_search = [100,500,1000,1200,1250,1300,1400];
if(_number in _search) exitWith {_number};
if(_search select 0 > _number) exitWith {_search select 0};
_last = count _search - 1;
if(_search select _last < _number) exitWith {_search select _last}:
_last = 0;
{
if(_x > _number) exitWith {
if(_x - _last > _number - _x) then {_number} else {_last};
};
_last = _x;
} forEach _search;
Does anyone know how to fix the problem with people spawning in as seagull ? I think it is somethink with a scrip, but correct me if im wrong
Did it break since last update?
reaspawn = BASE and Respawndelay = 1 and respawnDialog = 0
Is it only when joining in progress?
Its when you join the server as a civ then you just beacome a seagull
or cop or medic
It just heppens when we use our map insted of Lakeside, becuse we can sapwn in on Lakeside but when we join our and spain in as Civ, cop or medic we become a seagull
Tree op
drive onpath scripts?
Did he just jump?
^ sick stunts
Damn I always miss new commands
Anyone get the new ui "table" working?
@tough abyss So how did you get the AI to actually work so well here?
Being able to get ANYWHERE is already a challange, but keeping up with the speed and manuverbility of a player controlled vehicle?
New Command
wow
Weeeeell I should go and edit all my raw video footages so that I can free up space
BUT, this command just got infinitely more interesting
Launches Arma 3
Atleast with the commands I knew from the past, all of those were like impossible to do
The AI would always react too slow to be able to be a real threat
One way I did it is by having police cars move towards the player location, and if the player was close enough & slow enough, they would instantly stop the car and dismount, moving on foot and then letting the normal AI handle it until the AI would get too far away from the vehicle, OR if the player stops the car, AI dismounts and then the player starts driving away again. They would also dismount if they were coming up from in front of the player allowing them to fire on the player
Oh god
Like, car next to you body slam with vehicle hits a tree and dies
The question is, how well does this work when you are not on a straight road?
I made a first test
Ended after a few seconds because of this http://steamcommunity.com/sharedfiles/filedetails/?id=887861974
Remarkable on multiple levels
diag_tickTime vs time
diag_tickTime
and diag_TickTime is way more accurate (mmmms :D)
CBA_missionTime ๐
Okay, maybe someone knows:
Can you request every EXISTING MemoryPoint from a model, by ScriptCommand? hmm..?
wutwutwut?
It's missing all the ones only defined in the Memory LOD (which are the most interesting ones and the default of selectionPosition).
You could brute force selectionPosition. ๐
hexeditor
@tough abyss I think ill try combining it with setvelocitymodelspace to do ram and fishtail maneuvers - is that how you made the Jeep Launcher on Tanoa? ๐ (That was the next video after your Dukes of Hazard police chase)
I was wondering about the landing. ๐
Tbh when I saw that video, I thought it would hit the X right in the middle
The math on that one just fits too good :0
You know what that reminded me of?
Planetside 2's jumppads
The pin point accuracy of those jump pads even when the destination is 500m+ away
@still forum Turns out, there's a sling load waypoint, lol
BIS_fnc_effectKilledSecondaries - any changes known with this by 1.68?
from what ive read BI changes the explo FX for planes/air units
yet we have a report this is now triggered also for ground vehicles: http://phabricator.arma3-ww2-projects.bitnamiapp.com/T1070
Getting this CBA related error: ```
10:39:00 [0,46.575,0,"XEH: PreStart started."]
10:39:00 Error in expression <QUOTE(call COMPILE_FILE(XEH_preStart));>
10:39:00 Error position: <(call COMPILE_FILE(XEH_preStart));>
10:39:00 Error Missing ;
10:39:00 Error in expression <QUOTE(call COMPILE_FILE(XEH_preStart));>
10:39:00 Error position: <(call COMPILE_FILE(XEH_preStart));>
10:39:00 Error Missing ;
10:39:00 [0,46.893,0,"XEH: PreStart finished."]
CfgEventHandlers: ```HPP
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
Any clues?
@jade abyss tought you could set a flag in selectionPosition to search in the mem lod
Fixed. Forgot to #include "script_component.hpp".
@dusk sage nice with a command like that, didn't know it existed. What would you even use that for? I have hard to try and come up with an example where to use it ๐
To stop pesky people executing things they are not meant to be ๐
Hmm, ye, but could just use cfgRemoteExec
But I assume you are speaking about only certain people ๐
Or for certain ifs
I'm using it in the manner if (!isRemoteExecuted)
I want it to be RE'd, but not called locally
Hoping one day for a command to see who RE'd something
One day ๐
@dusk sage for now you could pass the object that RE'd as an argument to the function
Ah ok ๐
Btw, I wish there was a command to see from what function a script was called
Like scriptParentName or something
oooh, like a magic variable?
It's build into the CfgFunctions framework.
If the standard header is enabled (default), this variable will be there.
Ah ok
Same for
_fnc_scriptName
So doesn't work for script that is stored in a variable or precompiled?
Only if it's done via CfgFunctions.
Alright
I KNEW it
I thought I saw that somewhere but couldn't find a script command
So _fnc_scriptName is the same as _fnc_scriptNameParent?
Or is _fnc_scriptName the current script and _fnc_scriptNameParent the parent script?
@MrSanchez#5319 Because it's not hard for someone to pass any object they like? ๐
Oh I didn't read that you're on about security stuff.
@tough abyss
True, but i need to get a list of all Points in the MemoryLOD, before.
i see.. vanilla content?
Or is _fnc_scriptName the current script and _fnc_scriptNameParent the parent script?
yes
Nope Lappi
but you need to get them dynamically?
otherwise you can write a custom config parameter array and list all the names for the object
armaround
Doubling the work. Adding the Points to the Model, adding the same to the Config, bbbuuuhhhhh -.-
Yeah, armaround ๐
Is it possible to use ctrlCommit on progress bars?
Do your own
I think ctrlCommit will be easiest for this case
Okay.... weird idea time, is it somehow possible for clients to download an image through a http get or so through scripting?
Basically think squad.xml type stuff, but then to use it for drawIcon on map
I think there is something called file patching?
but it has to be enabled and I never used anything like that before
What do you need to update through http anyway?
filePatching and own extension would do that. But why can't you just include all icons in the missionfile or something
Well I guess technically if you have a database of images you might want to have them al available but would bloat the mission file
something like this? https://www.youtube.com/watch?v=vdGU6vmPMrk
Because it's a gamemode written in python, based on heatmaps and we can export that into a PNG and would like to overlay said heatmap + generated lines on it on the map ๐
perhaps with something like https://community.bistudio.com/wiki/htmlLoad
@brazen sparrow that's an extension I'm guessing? Basically i just need to get a picture that i could then use as a path for drawIcon (but quite big)
yup no other way
I don't know about the map part but the image thing looks like is possible
@plucky beacon ye, no other way to get images on the fly.
but if the mission itself is generating the heatmaps why can't you script the markers?
doing that now, but it's a pretty big amount of markers walking through now, plus can't really prettyify it
Can anyone here confirm if I can use ctrlCommit with progressSetPosition? I tried and didn't seem to work.
nope you can't
fuk
pretty easy to just make a progress bar yourself with and use ctrlSetPosition to resize
@brazen sparrow is that available anywhgere?
I'm wondering too actually
Getting this CBA error: 18:14:42 [0,39.17,0,"XEH: PreStart started."] 18:14:42 Warning Message: Script \NEV_Addons\addons\nev_debug_menu\XEH_preStart.sqf not found 18:14:42 [0,39.508,0,"XEH: PreStart finished."] XEH_preStart.sqf is present at said directory...
inspect the pbo, is it there? some settings remove included files from the pbo
other than that, try removing the leading slash
and make sure the pbo prefix is correct
It's there alright, what setting could remove it? https://i.imgur.com/OpYYtFi.png
As far as I know there's no way to remove the leading slash, it's pretty deep inside all the #include mess that comes with script_component.hpp.
thats explorer, how about inside the pbo?
no PBOPREFIX in that folder?
You can't just implement 3/4th's of the CBA stuff and expect it to work
Yeah I'm trying to work around all the \x\ crap.
just use a different folder name /shrug
redefine the macro that you use in your XEH_PREP file so they don't use that \z\bla\addons\blah path
\x\ , \z\ etc is an minorprefix / majorprefix iirc
What do mean @still forum? ```SQF
PREP(addToZeus);
PREP(aggressiveAI);
PREP(broadcast);
PREP(commitDate);
PREP(commitWeather);
PREP(garrison);
PREP(nearestObjects);
PREP(onLoad);
PREP(openDebugMenu);
PREP(openGarage);
PREP(openZeus);
PREP(removeDead);
PREP(repairVehicle);
PREP(safeStart);
PREP(sideChange);
PREP(spawnGroup);
PREP(teleport);
PREP(visability);
How do I redefine it?
#undef and #define it again
He already did that @indigo snow
if that still mimicks his folder structure hes good to go
mainprefix is not present inside script_component.hpp.
then define it yourself
you just need to make sure the defines mimick the folder structure and the PBOPREFIX does that as well
You know how when you use script_component.hpp, it includes stuff from CBA? Well, since all the #includes start with an \x\, I just copied them into my addon's script_component.hpp. I then got an error that Script \x\NEV_Addons\addons\nev_debug_menu\XEH_preStart.sqf not found, so I removed everything that has to do with the work drive.
I don't how else to explain it...
well CBA is in the \x\ include space yes but you control where your own files go
#ifdef PREP
#undef PREP
#endif
#define PREP(fncName) [QPATHTOF(functions\DOUBLES(fnc,fncName).sqf), QUOTE(DFUNC(fncName))] call CBA_fnc_compileFunction
that's how I do it. You probably want to change the path and other stuff.
You also have to change QPATHTOF and it's sub macros if you are using that
#define PATHTOF_SYS(var1,var2,var3) \MAINPREFIX\##var1\SUBPREFIX\##var2\##var3 this is the default backend for QPATHTOF. You probably want to change that to \##var2\##var3 or something
I'm only using PREP(). Also this is inside script_component.hpp: ```Cpp
#ifdef DISABLE_COMPILE_CACHE
#undef PREP
#define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QPATHTOF(functions\DOUBLES(fnc,fncName).sqf)
#else
#undef PREP
#define PREP(fncName) [QPATHTOF(functions\DOUBLES(fnc,fncName).sqf), QFUNC(fncName)] call CBA_fnc_compileFunction
#endif
@indigo snow He doesn't want to change the prefix and use that. He doesn't want to use the whole folder system.
no would be left with mod\addons\subprefix\file he just want's it to be file
What's wrong with PBOPREFIX ?
I don't know why all these decisions that just make more and more work and result in confusing messy code.. Instead of just adding a PBOPREFIX and being done with it
Plus if you have no Idea of how to do the complicated way. Why do you still want to do it instead of the easy (And recommended) way
๐คฆ
x\cba\addons\settings
theres no benefit of doubt needed, commy touches all of this ๐
Alright, I'll report back in a few minutes.
Same error occurs.
what did you put into your $PBOPREFIX$ file ?
NEV_Addons\Addons\nev_debug_menu
with what tool are you packing your folder. and which folder are you packing? You should pack the folder containing the config.cpp and $PBOPREFIX$ files and not some parent folder of that
That's correct.
and your $PBOPREFIX$ is at Desktop\nev_debug_menu\$PBOPREFIX$ ?
Can you PM me the finished PBO? that would be best
does addon builder even use PBOPREFIX?
Don't be surprised about anything in regards to BIS tools
You can set the Prefix in Addon Builders options. From the finished PBO it looks like it might actually be ignoring the $PBOPREFIX$ file
Good job BI
Wow.
Fucking hell, really. Not much else to say.
AddonPrefix would be 'NEV_Addons\Addons\nev_debug_menu`, right?
yes
Also Addon Builder is removing all *.hpp from the resulting PBO.
case doesn't matter in PBO. On linux it would matter with filePatching enabled and trying to use external files with filePatching
Thank you @still forum, @indigo snow and @little eagle!
Yeah.. Mikero stuff... Armake already there for scripts :u
if I put add an onPlayerConnected handler on a player, it will execute the script on the server still?
or do I need to remotely add the handler to the serve
if you addMissionEventhandler on clientside then it will only trigger clientside. Atleast logic says that should happen
Arma not always == logic
The PlayerConnected eventhandler only fires on the servers machine and only if it was added on the servers machine.
If you add onPlayerConnected on a client all you do is waste some bytes of memory. The eventhandler will never fire.
okay, note taken
So gotta remote the handler to the server
then the server has to remote the client that connects
a = selectRandom ["0","1","2"]
b = selectRandom ["0","1","2"]
That's 9 different possibilites, right?
How to best handle these? 3 switch inside 3 cases of another switch?
Yeah.
probably switch inside 3 cases
is 0,1 the same as 1,0 for you?
switch (_source) do {
case "client": {
switch (_priority) do {
case "client": {
};
case "mission": {
};
case "server": {
};
};
};
case "mission": {
switch (_source) do {
case "client": {
};
case "mission": {
};
case "server": {
};
};
};
case "server": {
switch (_source) do {
case "client": {
};
case "mission": {
};
case "server": {
};
};
};
};
This looks dumb
00 , 01 , 02 , 10 , 11 , 12 , 20 , 21 , 22
0,1 is not the same as 1,0
are they numbers?
call ([{code},{code},{code}] select _x)
Does the same just more compact :u
depends on what changes I'd say. split the _source specific part and the priority specific part. put each parts differences in a variable and then... you know what I mean
No, strings
switch ([_source, _priority]) do {
case ["client","client"]: {
};
case ["client","mission"]: {
};
case ["client","server"]: {
};
case ["mission","client"]: {
};
case ["mission","mission"]: {
};
case ["mission","server"]: {
};
case ["server","client"]: {
};
case ["server","mission"]: {
};
case ["server","server"]: {
};
};
Will I be hated for this?
Both are readable for me
Depends.... Some places may hate you. I know a guy called commy. I guess he'd get angry at that.
^
It sure looks dumb.
I feel like you're more worried about how it looks than you should be
what is changing in between all these parts of code? does the priority only change one function argument or something like that?
all different, except
case ["server","server"]: {
case ["mission","mission"]: {
case ["client","client"]: {
well 3 less is 3 less. if _source isEqualTo _priority then dick else butt (foobar is boring! I vote for dickbutt!)
Just write it ugly at first and optimize it later
or
switch [_source, _priority] do {
case ["client","client"];
case ["mission","mission"];
case ["server","server"]: {
};
case ["client","mission"]: {
};
case ["client","server"]: {
};
case ["mission","client"]: {
};
case ["mission","server"]: {
};
case ["server","client"]: {
};
case ["server","mission"]: {
};
};
Thought about that. But unsure if Arma could do that
default? unless they also happen most frequent
Pretty sure that is a feature of SQF switch
If this ever reaches default, something went wrong, cptnick
Hallo we are trying to run a Kelly's custom map and the you spawn in as a seagull. But if we run the same setup just on a lakeside map it all works, so we can't figure out what the problem is. We got this log from the server - https://imgur.com/a/SlqbU#LK7JQZ7 "the black out is just a name"
Grouplimit is my first guess if spawning as seagull
And yeah. That's not #arma3_scripting #arma3_scenario or #arma3_troubleshooting
if readability isnt a concern dedmens ARRAY select INDEX option might just be the fastest way to deal. for readability the switch? Just make sure to relatively order in order of highest probability.
switch [_source, _priority] do {
case ["client","client"];
case ["mission","mission"];
case ["server","server"]: {
_ctrlLocked ctrlSetText "";
_ctrlLocked ctrlSetTooltip "";
};
case ["client","mission"]: {
_ctrlLocked ctrlSetText QPATHTOF(locked_ca.paa);
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_mission_tooltip);
};
case ["client","server"]: {
_ctrlLocked ctrlSetText QPATHTOF(locked_ca.paa);
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_server_tooltip);
};
case ["mission","client"]: {
_ctrlLocked ctrlSetText QPATHTOF(locked_ca.paa);
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_client_tooltip);
};
case ["mission","server"]: {
_ctrlLocked ctrlSetText QPATHTOF(locked_ca.paa);
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_server_tooltip);
};
case ["server","client"]: {
_ctrlLocked ctrlSetText QPATHTOF(locked_ca.paa);
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_client_tooltip_server);
};
case ["server","mission"]: {
_ctrlLocked ctrlSetText QPATHTOF(locked_ca.paa);
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_mission_tooltip_server);
};
};
Why are you doing the same thing 6 times :X
I'm not.
I like mine better
if (_source isEqualTo _priority) then {
_ctrlLocked ctrlSetText "";
_ctrlLocked ctrlSetTooltip "";
} else {
_ctrlLocked ctrlSetText QPATHTOF(locked_ca.paa);
switch [_source, _priority] do {
case ["client","mission"]: {
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_mission_tooltip);
};
case ["mission","server"];
case ["client","server"]: {
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_server_tooltip);
};
case ["mission","client"]: {
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_client_tooltip);
};
case ["server","client"]: {
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_client_tooltip_server);
};
case ["server","mission"]: {
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_mission_tooltip_server);
};
};
};
could also move _priority == server into another if
I like it.
I also think that _source == _priority -> nothing to do here
is more readable
could also move _priority == server into another if
Not so sure about that. I might want to amend it in is3DEN with a different dooldib
top ๐
I don't quite like that repetitive _ctrlLocked ctrlSetTooltip localize. Could create a pseudo enum and then use [bla,bla,bla] select enum But that adds more performance overhead
and.. can switch return a value? Maybe just use the case content as return value so you have a single call to that ctrl stuff
switch returns whatever the case block returns
or the default block returns
and
don't ask why
If there is no default block and no case was true
switch 1 do {}
It is usable and readable as it is. Could be made more compact but with no real benefit
Aaand. sort the case statements after something ๐ I'd say swap priority and source so you can order the
case ["mission","server"];
case ["client","server"]:
next to eachother
if (_source isEqualTo _priority) then {
_ctrlLocked ctrlSetText "";
_ctrlLocked ctrlSetTooltip "";
} else {
_ctrlLocked ctrlSetText QPATHTOF(locked_ca.paa);
_ctrlLocked ctrlSetTooltip localize (if (_priority isEqualTo "server") then {LSTRING(overwritten_by_server_tooltip)} else { ([LSTRING(overwritten_by_mission_tooltip),LSTRING(overwritten_by_client_tooltip),LSTRING(overwritten_by_client_tooltip_server),LSTRING(overwritten_by_mission_tooltip_server)] select ([["client","mission"],["mission","client"],["server","client"],["server","mission"]] find [_source, _priority]))});
};
uhm.. Yeah.. I'll better go to bed
btw, this is a way to execute different code depending on the localization:
call compile localize
#define SourcePrioritiesFind(X) (["client","mission","server"] find X)
(([["cc","cm","cs"],["mc","mm","ms"],["sc","sm","ss"]] select SourcePrioritiesFind(_source)) select SourcePrioritiesFind(_priority))
or better. param with default value
#define SourcePrioritiesFind(X) (["client","mission","server"] find X)
(["cc","cm","cs","mc","mm","ms","sc","sm","ss"] param [SourcePrioritiesFind(_source) * 3 + SourcePrioritiesFind(_priority), "You're screwed"])
But ๐ฆ Optimizing ๐ข
It's a ui script
Okey. good night, have fun, implement my client only stuff, dickbutt > foobar
if (_source isEqualTo _priority) then {
_ctrlLocked ctrlSetText "";
_ctrlLocked ctrlSetTooltip "";
} else {
switch [_source, _priority] do {
case ["client","server"];
case ["mission","server"]: {
_ctrlLocked ctrlSetText QPATHTOF(locked_ca.paa);
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_server_tooltip);
};
case ["client","mission"]: {
_ctrlLocked ctrlSetText QPATHTOF(locked_ca.paa);
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_mission_tooltip);
};
case ["server","mission"]: {
_ctrlLocked ctrlSetText QPATHTOF(locked_ca.paa);
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_mission_tooltip_server);
};
case ["mission","client"]: {
if (is3DEN) then {
_ctrlLocked ctrlSetText QPATHTOF(locked_ca.paa);
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_client_tooltip_3den);
} else {
_ctrlLocked ctrlSetText QPATHTOF(locked_ca.paa);
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_client_tooltip);
};
};
case ["server","client"]: {
if (isServer) then {
_ctrlLocked ctrlSetText "";
_ctrlLocked ctrlSetTooltip "";
} else {
_ctrlLocked ctrlSetText QPATHTOF(locked_ca.paa);
_ctrlLocked ctrlSetTooltip localize LSTRING(overwritten_by_client_tooltip_server);
};
};
};
};
You still have duplcated setText locked bla
just lock once before the switch and in that one quite uncommon case unlock it again
#UnoptimizingForBetterLooks
Forgot a then
Was trying but missed it on my phone
these tooltips will totally make sense in the end and will not be confusing, totally
#define SourcePrioritiesFind(X) (["client","mission","server"] find X)
(["cc","cm","cs",if (is3DEN) then {"dick"} else {"butt"},"mm","ms",if (isServer) then {""} else {"sc"},"sm","ss"] param [SourcePrioritiesFind(_source) * 3 + SourcePrioritiesFind(_priority), "You're bolted cuz screws can't hold that much :banana: "])
does anyone know how bis_fnc_door gets away with using the "this" variable? it is run from the statement property of class useractions classes for opening doors.
Well isn't "this" in that context the object, so it's passing the object to the door function?
has anyone messed around with the list boxes? Or whateveer they had presented a couple weeks back?
Not sure what they called it at this time
So if someone asked me what language is SQF like, what should I say
๐ค I'm not sure. I've heard some people compare it to c++ before. Not sure if that's really a good evaluation, never used c++.
It kiiinda is like c++ syntaxually in a lot of places
Interesting, well. I guess that's a start.
functions work diffrently though
Yeah, does Arma have their own unique way for calling/creating functions or is that pretty commonplace?
Ah yes.
or vehicles.create
Right, that makes sense.
categorized functions more neatly that way
because you could types vehicles. and it would give you all the autofill options for that object type
Right, and you'd have something seperate for functions.
Hey quick question here, don't mean to switch subjects so quickly. I'm trying to get a button to appear over the map. But have the player be able to draw and navigate the map whilst the button is active and clickable. Any ideas?
I think spawned diolags prevent interaction with other dispalys
damn it..
@native hemlock well yea inside the statement string. but they are using "this" inside the actual function. it's crazy. i took the statement right from the config and replaced "this" with cursorObject (which i used to get the config). and it threw the expected error that "this" is not defined instead of opening the door.
basically BIS fucked my fast door button code by deciding to suddenly clean things up and using some unified method.
well i found a workaround though so fingers crossed till the next update -_-
@subtle ore try ctrlCreate using the map idd
@polar folio Hmm. I'll look into this.
What about buttons though? I dont see any display type for buttons in ctrlCreate?
Nevermind, sorry about that
example:
0 = [] spawn
{
waituntil {!isNull (findDisplay 12)};
(findDisplay 12) ctrlCreate ["RscButton", -1];
};
sorry guys. forgot how to wrap code
12 is idd of the map
just some test code. probably wouldn't advice adding it like that. i just added the spawn and waituntil so you can run from the devbug console
yep, I already got this: _mapBrief = (findDisplay 12) ctrlCreate["RscButton",-1];
I'm just going for a quick and dirty run of it. Then I'll go back and refine it.
nice. what functionality are you adding to the map?
I'm forcing players to come up with a game plan before they enter. Then the team confirms it, then they enter. Gather supplies ,etc.
Oh hell yeah! This totally works! ๐
nice sounds great. released mission?
Nah, I plan to work on it for a couple of months.
you could definitely do that as well. Lol.
I know. I entertained the joke a little bit too.
ty Dscha ๐
`` double for multi line and then single for singular lines yes?
Ahh, I see now.
wtf. i just placed an empty littlebird in eden on a steep slope. it started sliding downhill and actually made a scratching/sliding sound. most random feature. still like it though. must be part of all the little sound additions
Then try this:
Get in the Editor, place yourself near the water, get in the Water, dive to ~5m, close your eyes and listen.
will do now. this better be good
btw. not a recent change. but do the same deep inside the tanoa jungle in the middle of the night. some scary shit
@plucky beacon Somewhat C like syntax, nothing like it in other aspects. Not statically typed. If you want to give the person a language - mash some together ๐
More like an inbred of C, C++, Java and something else
well. all i heard was myself drowning. so i guess i got trolled. well played sir
It may share syntax, but it's the polar opposite of C/C++/Java in practice
very good drowning sounds though ๐
Yeah ๐ I told ya
so I ran into a problem.
openMap[false,false];
_mapBrief ctrlEnable false;
}];
doesn't disable the control on the map ๐ฆ
you could also create another dummy control of the same size ontop of the button to disable it. i think
Agh, man. I have a great fear of "workarounds" :/
*Armaround.
Wait a sec. Would the ctrlAddEventHandler be able to acess _mapBrief if it was defined outside ?
Oh my god. I'm doing many facepalms right now. DUH! ๐
just incase it pops up for anyone else, this is a new error. it seems as of 1.68, _this gets passed to 'calls' by default
["string"] call {
_something = call {
params [["_obj", default_object, [ObjNull]]];
_obj
};
};```
so you have to use _something = [] call
the error being 'type: string, expected: object' on the params
i wasn't doing exactly that, it's just a simple repro
pretty sure it used to be nil that was passed in to _something = call {}, now it's _this from the scope you call it from
certain it used to be nil actually
Can't remember, that it was different. Are you sure, that you don't mix it with spawn?
i'm sure, because it was a script that hasn't changed in 12 months and it suddenly started erroring with 1.68
works like before.
abc = {hint _text};
[] spawn
{
_text = "abc";
_Bla = call abc;
};```
that's just reusing _text ? not checking what's passed in
if u did hint _this, it would be different from before
call is like:
Copy and paste the code inside this document.
While spawn is -> Create a new SubFolder and forget everything done before
hint _this should ne error, since nothing is defined
mom
yeh but since 1.68 it is defined
as [] (from your spawn)
Sry to dissapoint you =}
well it's either the call that's changed, or params
call = Nope, don't think so. + can't remember reading anything n the Changelog about params
My bet is: You forgot to privatize before.
Or you did private it
depends on the situation ๐
maybe this didnt used to be an error:
["string"] call { params [["_obj", objNull, [objNull]]]; };
the script didn't change
the modified date is 1/2/2016
Could be params, no idea. I just said, i can't remember seeing changes. But call is as usual
btw. you should start your Game with -ShowScriptErrors ๐
i do
i think that last one should be valid? that's probably what's changed
docs say " input can be tested in case it is undefined, of the wrong type or of the wrong size (if array) and substituted if necessary with default values.", which implies it should be treated the same as passing in [] instead of ["string"]
wich docs are you talking about?
Arma ยฏ_(ใ)_/ยฏ
which means i should have been getting this error since 1.53 (unless they just mean those editor-only errors)
Yep
server fps?
in ky killed eventhandler there are these lines here
_victim = _this select 0;
_killer = _this select 1;
diag_log format ["%1 killed by %2",name _victim,name _killer];
yet _victim and _killer turn out to be the same unit everytime it fires
what am i missing?
maybe a script is capturing handledamage and killing them?
Does anyone know a PP Effect that puts on a slight blur and makes the screen grey?
probably ColorCorrections + DynamicBlur
Yeah, but I can't figure out a good colourcorrection lol @vapid frigate
the default from the wiki makes the screen grey
I just figured one out lol, now I can't get any goddamn blur to go nice
Having some trouble with CBA macros, the following button doesn't do anything. ```Hpp
class commitDate: NevRscButton {
text = "Change date";
x = "SafeZoneX + (810 / 1920) * SafeZoneW";
y = "SafeZoneY + (465 / 1080) * SafeZoneH";
action = QUOTE(remoteExecCall [QQFUNC(commitDate), 0]);
tooltip = "Commit time & date changes";
};
Should I be using QFUNC instead?
mhm. Either way he'd have to use QFUNC there
i think it needs the double quotes because it's already in quotes
i haven't seen action= before
i think it should be OnButtonClick=
guessing it used to work without the CBA macro-fu
would help to see how that line actually gets processed
normally when using this in config you'd wrap a normally resolving line of code in a QUOTE() macro and shit works in my experience
scratch that
seems youre right about the double quotation
yeah, what he has should resolve to "remoteExecCall [""whatever_fnc_commitdate"", 0]";
unless the ; being up against the bracket is breaking it
can't remember if ; is counted like other text
nah thats ok. throw it in a linter, see what it spits back out and compare with whatever you had working before @tough abyss
@tough abyss Looks right what you're doing with the macros, but you're using remoteExecCall wrong I thnk.
params remoteExecCall [functionName, targets, JIP]
forgot the "params"
Even if no params, you have to use []
Oh, I think I know why it doesn't work.
You cannot use commas inside macros, because commas are used to separate the arguments and Arma doesn't support variadic macros.
QUOTE([] remoteExecCall [ARR_2(QQFUNC(commitDate),0)]);
@little eagle did you mean semi-colons? There's a comma insde the QUOTE() macro.
How would passing arguments to the function work?
onLBSelChanged = QUOTE(ARR_3(FUNC(sideChange), _this select 0, _this select 1));?
Around the arguments?
Yes, you can only pass multiple arguments if they are in an array.
Alright, thank you.
Also, what use would it be to switch from action = to onButtonClick = ?
Why would you do that?
@vapid frigate said it should be onButtonClick =, see above.
I see no point is doing it, so I'm asking "Is there a point, that perhaps I'm missing?".
Don't do that.
my buttons use onButtonClick, i didn't know about action
Ok, I won't.
They're two different eventhandlers that basically do the same thing, but pass different arguments and work for different contols too I think.
An SQF command that adds the option to execute SQS commands with a button. Why does that sound wrong?
It's not a sqf command necessarily
All "SQF commands" work in SQS.
Well, some exceptions like sleep or waitUntil I guess.
Some might not work for practical reasons like switch. And if then else have their own other syntax.
Just to clearify, this is correct, right? ```SQF
onLBSelChanged = QUOTE(ARR_3(FUNC(sideChange), [_this select 0, _this select 1]));
This is how fnc_changeSide looks, nothing happens upon change the listbox selection since I added CBA macros. ```SQF
#include "script_component.hpp"
params ["_control", "_index"];
private ["_dummySide", "_dummyGroup"];
hint format ["Contro: %1, Index: %2, DummySide: %3, DummyGroup: 4", _control, _index, _dummySide, _dummyGroup];
switch (_index) do {
case 0: {
_dummySide = east;
};
case 1: {
_dummySide = west;
};
case 2: {
_dummySide = resistance;
};
case 3: {
_dummySide = civilian;
};
};
_dummyGroup = createGroup _dummySide;
[player] joinSilent _dummyGroup;
This worked, though: ```SQF
"[_this select 0, _this select 1] call fnc_sideChange"
Also this is ran every time the dialog is opened: ```SQF
#include "script_component.hpp"
params ["_dialog"];
_sideList = _dialog displayCtrl 80015;
_sideList lbAdd "East";
_sideList lbAdd "West";
_sideList lbAdd "Independent";
_sideList lbAdd "Civilian";
switch (side group player) do {
case east: {
_sideList lbSetCurSel 0;
};
case west: {
_sideList lbSetCurSel 1;
};
case resistance: {
_sideList lbSetCurSel 2;
};
case civilian: {
_sideList lbSetCurSel 3;
};
};
You're doing it wrong.
"[_this select 0, _this select 1] call fnc_sideChange"
->
QUOTE([ARR_2(_this select 0,_this select 1)] call FUNC(sideChange))
Oh.
Also,
[_this select 0, _this select 1]
seems pretty pointless.
Could just use:
_this
There is no ARR_1, because a one element array would have no commas
These only exist to work around you not being able to use commas in macros.
ARR_2(1,2)
->
1, 2
ARR_3(1,2,3)
->
1, 2, 3
etc.
Ah, so QUOTE([_this] call FUNC(sideChange)).
QUOTE(_this call FUNC(sideChange)).
Because _this already is an array
Otherwise your script would break.
If you don't like ARR_n, you can also use the X39 method
#define COMMA ,
QUOTE([_this select 0 COMMA _this select 1] call FUNC(sideChange))
never tried this myself, but I don't see why it wouldn't work.
you could also just not use macros ๐
๐ฌ
Sure, but it's really not that difficult.
And if it's an incentive not to put code in configs, great.
@dusk sage make variadic macros for Arma or stop being triggered.
reasoning is as follows:
preprocessor is seeing a COMMA not a , --> no preprocessor token
no preprocessing
but as it is a token registered for the replacement
it gets replaced correctly :3
magic
@little eagle would require a separated preprocessor
which actually is quite nice but requires extra tools in toolchain to build
but that would solve those nasty preproc errors
like ```sqf
#ifdef foo
#ifdef bar
enter what you want ... script wont be correctly preproced anyway
#endif
#endif
Are variadic macros an engine limitation?
yes
or no
it is more a horrible preprocessor ๐
you have to know what it is supposed to do
it is like the c# preprocessor
it is ok for what it wants to provide
but not for more :3
Can you nest QUOTE() macros? And is there a a double quote macro (QQUOTE())?
you can nest as many macros as you want
thats the fun part ๐
and that is why COMMA works
COMMA is pretty much the same as COMMA()
So basically: "closeDialog 0; [""Open"", true] spawn BIS_fnc_arsenal" >> QUOTE(closeDialog 0; [QUOTE(QUOTE(Open)), true] spawn BIS_fnc_arsenal)?
Seems hacky.
you also should not use that ... looks horrible
Haha, it does.
to get that, you can use a simple function
str _code with a select
Ctrl+Zs...
takes out some performance indeed ...
It's inside an hpp.
// A button to open the virtual aresnal
class virtualArsenalButton: NevRscButton {
text = "Virtual arsenal";
x = "SafeZoneX + (510 / 1920) * SafeZoneW";
y = "SafeZoneY + (375 / 1080) * SafeZoneH";
action = "closeDialog 0; [""Open"", true] spawn BIS_fnc_arsenal";
tooltip = "Open the BIS virtual aresnal";
};
It's a button within a dialog...
use the dialog as simple dialog
it is your bluepint of a dialog
not blueprint + actions
separate code from UI
after that: create two new functions
createDialog and destroyDialog
createDialog will setup your dialog
Yeah I know how dialogs work..
((make sure the actual setup is done in sync space not in async))
In most cases the action calls a functions.
As such: ```Hpp
// A button to open Zeus
class zeusButton: NevRscButton {
text = "Open Zeus";
x = "SafeZoneX + (510 / 1920) * SafeZoneW";
y = "SafeZoneY + (285 / 1080) * SafeZoneH";
action = QUOTE([] remoteExecCall [ARR_2(QQFUNC(openZeus), 0)]);
tooltip = "Open the Zeus curator interface";
};
Eh?
"" will escape quotas in a string
Yeah that's way ""open"" is in doubles.
" a "" b " --> a " b
it still looks cleaner then using quotes
though ... you use those ugly function macros too
Also, why whould I use destoryDialog? I press Esc and it's gone.
ever needed to cleanup something when your dialog closes?
Nope.
complex UIs with update cycles can be quite complicated
let me be a lazy stupid :3
actually have to write some content for threads
but as said: how i would do it would be add the action inside of the createDialog
via addEventHandler function
the CIDs would be in a separate hpp files
so you do not need to memorize
and got nice strings to access them
can be pretty handy
especially if the files get larger
and you need to narrow down a script issue
Unnecessary. I'd rather do things on the config than to mess with more scripts.
Do you want me to send you the whole thing? I feel like you're misunderstanding it.
The whole addon, that is.
i do not missunderstand ๐ but i think we still talk about different things :3
anyway
as long as you stick to functionmacros and config files
you will need to use QUOTE
wtf, how difficult can it be to convert one line.
We're sorry, Commy. ๐ฆ
no need to be @tough abyss he is just angry as usual
Is he? Seems calm usually.
Dear god
playSound doesn't work on the briefing screen. Alternative?
hint it as Text
Does anyone know of a way to "disable" player face/mask customization?
I'm trying to make a Period Mission, and players keep having the Tactical Eyeglass thing, or the Stealth balacklava, or stuff.
Additionally, one of our mod-packs adds a gas masks that's functional, and I want to restrict it, otherwise everyone always wears the gas mask.
How should I use that command?
If I place units in the editor, and use the loadout feature in the 3den editor, is there a way to do this for players and preserve what I've selected in the editor? or is it like I put that in the init, and then add whatever I actually want with a script after?
Put this in front of your gear script
initplayerlocal.sqf too
^ this should be the easiest.
If you do it in the initplayerlocal it shouldn't add goggles unless your gear script does
Hello all
hayo
How can we turn off police officers on the map?
Where do the police officers come from
Just guess.
I wanted to be sure but okay
yes yes @tough abyss
server config difficulty
but
You can not see your own place when mapcontent = 0. Is there any other way?
no clue, I always turn it off anyway
yes, lots of
there are lots of scripts especially if you just want to see your own position
i am understand but
I can hardly find it because it is not in my language. Can you sample? please
what is your language?
I do not know a foreign alias ๐ฆ ๐
I am very happy if you give me an example in this matter. At least what should I investigate?
I'm writing it
okey i am waiting
null = [] spawn
{
_marker1 = createMarker ["DNI_PlayerMarker", position Player];
"DNI_PlayerMarker" setMarkerType "mil_triangle";
"DNI_PlayerMarker" setMarkerColor "ColorYellow";
while {true} do
{
"DNI_PlayerMarker" setMarkerDir (getDir Player);
"DNI_PlayerMarker" setMarkerPos (getpos Player);
sleep 0.5;
};
};
Untested but if you put this in the initplayerlocal.sqf it should work
okey i am very fast try
๐
@plucky beacon I thank you for your help. you are a good person
๐
They are stackable. normal ones aren't
Yes but what's the benefit of using them?
having more than 1 eventhandler
non stackable eventhandlers like https://community.bistudio.com/wiki/onMapSingleClick can only be used once. Once you try to create another handler with different code it deletes the old one
I see, thanks for explanation ๐
There are two versions of stackables though. the BIS function that get broken as soon as someone uses a nonstackable version of that handler anywhere. and addMissionEventHandler
I haven't taken the game (engine) courses in uni yet so I'm not familiar with all concepts. Thanks for the tip too!
the BIS function one doesn't get recompiled before every execution as the addMissionEH one does. But that is expected to be fixed
Open-source Arma IDE with script Debugger in #production_releases ducks and runs away
flip tanks are fun!
i hear flip tanks?
PhysX
You say PhysX
I say huiiiiiiiiiiiiiii
You say PhysX
I say huiiiiiiiiiiiiiii
The best thing about Arma 4 will be the lack of PhysX.
in house physics
But Jets now also get PhysX, so maybe we have flip jets soon too.
they are working on their own system for enfusion engine so yeah
Can't wait for someone to jump start them by turning in place and then actually flying away.
Can someone tell me where about this model will be: Land_CarBattery_01_F
I have no clue which file directory to search through, and my ArmA 3 Folder will take wayy to long (Over 300gb of mods xD)
That is not a model, but a classname.
Editor -> Esc -> configViewer -> search for Classname -> MODEL = "PathToP3D";
there you go
ty โค
copyToClipboard configSourceAddonList (configFile >> "CfgVehicles" >> "Land_CarBattery_01_F");
sush, let them do some work
That also.
It's gender neutral, mate
Good point
triggered
Hey guys, do you know if you can transfer Objects without a varName through format? Like i got an Object C Alpha 1-3:1 and I wanna bind it to a button with buttonSetAction format["[0,_object] execVM 'bla.sqf'",_object].
sry %1, not object ^^
@plucky beacon You just don't count. Back in the corner and do your homework.
shush! go! shush
my_object = _object;
buttonSetAction "[0, my_object] execVM 'bla.sqf'";
โ
so i gotta transfer it into a global var?
Your fault for using ancient commands like buttonSetAction and not ctrlAddEventHandler
so thats a better solution then, why not putting this advice first ๐
You didn't ask for it.
You asked how to serialize objects into strings.
Objects cannot be serialized into strings.
I guess you can mess around with this:
BIS_fnc_objectFromNetId
thanks so far, thats all i needed
But meh
netId doesn't work in SP i guess
The BIS functions do work in SP
But I don't think the sqs snipped supports return values from functions, so...
Well i think i go with the EH, thanks so far commy ๐
[_control, "ButtonClick", {[0, _thisArgs] execVM 'bla.sqf'}, _object] call CBA_fnc_addBISEventHandler;
no wait
edited. Like this, should also work.
I'll give it a try! ๐
Be nice to know the difference with https://community.bistudio.com/wiki/setFlagTexture , except the args can be global
Is this a result of what we saw in the flag improvements?
I read Dscha's message from 5 hours ago, which is funny because I was actually doing homework
having this weird thing happening here. I added disableSerialization; at the beginning of the bracket in a new script aside from the initPlayerLocal. Keeps telling me that the variable shouldn't be stored in the missionNamespace
am I missing something here?
Instead of wasting your time, describing it -> Post it.
Good point.
I feel like I've been writing this script one line at a time, but in any case. if I remote execute a script to the server (2) that contains
if (isMultiplayer) then {
[[],"\DNI_FpsZeus\jip.sqf"] remoteExec ["execVM",2,false];
};
onPlayerConnected
{
[[],"\DNI_FpsZeus\client.sqf"] remoteExec ["execVM",_owner,false];
};
then it should remotely execute to the client that joined right?
oh ok, should work then
_owner: (since Arma 3 v1.49) Number - is owner id of the joining player. Can be used for kick or ban purposes or just for publicVariableClient.
looks like it checks out
not sure if you need the top script though?
just need to run the bottom one on the server once
it's for an addon so it all fits together
thats why OnPlayerConnected had to be remotely called to the server
not sure how \DNI_FpsZeus\jip.sqf can exist on the server, but an init script can't though?
Good point actually. I guess id have to remotely execute the command
just the last one i think, no need to tell the server to add the 'onplayerconnected' event from the clients (the server can just do it itself)
unless it's a client side mod.. then you'd have to do something like that
It is
remotexec onplayerconnected
Ya
sounds like you should actually use the 'BIS_fnc_addStackedEventHandler' or playerConnected event handler too
onplayerconnected might overwrite something on the server
if something else is using it
sounds like it from the blue/green notices on the wiki
Remotexeccall
Does the block of code count as a param in remote exec?
I've never tried that before
yeah
@subtle ore Your problem is solved, i assume?
having this weird thing happening here. I added disableSerialization; at the beginning of the bracket in a new script aside from the initPlayerLocal. Keeps telling me that the variable shouldn't be stored in the missionNamespace
am I missing something here?
You cannot store displays or controls in mission namespace variables or this error will pop up.
@plucky beacon Hello again ๐
https://www.youtube.com/watch?v=nJRpj3nV8CM&feature=youtu.be - problem ๐ฆ
Showing everyone's place ๐ฆ
If anyone who knows code pretty well and has 2 min i would like to ask a question about a a ogv not playing on my dedicated but on my local need some help with a line of code to activated it on dedi machine aswell
@soft crest are you familiar with the concept of locality?
very !!!!
thats whats happenign
but there must be a line of code to put before my script that should allow it to play
how is the playing of the video activated? through addAction? through a trigger?
through the init then this is the script
[] spawn {
scriptName "initMission.hpp: mission start";
["rsc\ARMA_3.ogv",0,0,1920,1080,true] spawn BIS_fnc_titlecard;
waitUntil {!(isNil "BIS_fnc_titlecard_finished")};
//titleText [WELCOME_MESSAGE, "PLAIN", 3];
};
sleep 35;
execVM "intro.sqf";
I haven't really used titleCard before so I'm unsure of its behaviour, but try adding a sleep 0.01; infront of the [] spawn { - this will cause the code to be triggered only AFTER the briefing screen is done
ok il ltry thanks
Anyway i can force AI to never eject their aircraft?
You may be able to lock it. No one can enter and no one can exit AFAIK
That works since i have no intention of any AI leaving any vehicle
But to be honest i thought i remembered a bug with damaged aircraft
They would just pop out anyway
ohh yeah, It's pretty bad. I always see a tank take a hit in the tracks and the crew bails and even leaves the gunner
there is a command for that but it's only for tanks
it's like immobiledismount or somethin
@jade abyss i found a workaround.
uhm, okay.
Is there any command or similar to switch interface size on a mission?
during a mission?
I don't think so, since you need to restart the game usually anyway
Cause when I make dialogs
They're different even though Im using safezone
So text gets bigger if you change interface size and resolution
Not the dialog itself
But the text
Maybe sizeEx = 0.04 * safezoneW + safezoneH?'
You'll have to trial and error some numbers because I don't know how much safezone effects it
oh uh, never tried that
try it
When you do UI -> Use Safezones
Definitions i used:
#define Txt_Small "0.01 * safezoneH"
#define Txt_Norm "0.02 * safezoneH"
#define Txt_Big "0.03 * safezoneH"
#define Txt_VBig "0.04 * safezoneH"
+define the Textsize in the .hpp itself (i assume you use that) by using it like: sizeEx = Txt_Norm;
@rotund cypress
Create a file named:
DispDefines.hpp
->
Add the Defines i posted above in it
->
include "DispDefines.hpp" in the description.ext (again: I assume you use that one) before you add the rest of the UI/Display/RscTitles Stuff
->
Use "Txt_Norm" instead of "0.02 * safezoneH" in the Cfg. way more easier.
I guess I could do that
Or just do safezoneH each time
If I want to use different sizes than the one defined
You can use definitions and just change the defined size?
Ye but why use a macro for this little
Don't call it a Macro^^
easy readability?
Its more like a defined Name for better readab... exactly
Its like in a Script:
_A = 1+2;
if(_A == 3)then{hint str _A;};
instead of
if( (1+2) == 3) then {hint str (1+2)};
lol
I'll know anyways without a macro, so no need ๐คฃ
what if you look at it months later and forget
Its not about understanding, but.. ah.. do what you want. pff... peasant
hahaha
Or what if other people look at it