#arma3_scripting
1 messages ยท Page 340 of 1
not in vehicles is what you mean
and vehicles function intrinsically different from infantry
it's not some reason, its two very different situations
you might as well just implement a fired event handler that deletes the projectiles and adds the ammo back
yes. im just think there muct be something other than default action, use mouse in this condition. this could work, we are firing from ammocount not add a scripted missile.. we can give it a shot though ๐
No, you are wrong. There doesn't has to be another action.
There might be, but there doesn't has to be.
That is not how it works.
And I am pretty sure there isn't any.
ok you are talking from speculation. i appreciate the help.
You are talking from speculation. I told you why that is bad.
Feel free to try all actions at once. I posted the list.
The only speculation would be that that list is fully complete ๐ค
You could maybe ask @still forum to get a list from the source code maybe.
mh?
Dedmen, this list: https://community.bistudio.com/wiki/inputAction/actions
But engine complete.
Looks quite complete to me
were wondering if firing a weapon in a vehicle might be a different action from firing a weapon as soldier
The completeness was questioned.
no i was questioning you
I'd say it's complete enough
did i say anything about the website?
lol
try to create drama
And I am pretty sure there isn't any.
so you are not sure
speculation
๐ฟ did someone say drama?
I'm pretty confident the list is not complete. But I am also confident that any missing action wouldn't help just as I am confident that all listed actions don't for this particular problem.
also, im not. im saying what commy says is truth, and your only option might be figuring out if theres a missing action that might help you
so what is the approach? inputAction?
I also am pretty confident that no one will come up with the magic answer. There isn't any. You can try all listed actions and maybe ask around for more. Nothing else anyone in this chat can do.
addAction
To block firing.
its ok commy you were thanked. i said id try something else. and you accuse me of saying someone else work isnt complete.
Doesn't work in helis when using manual fire.
no i was asking if it was something different.
oh that hack with the almost invis scroll action?
cptnnick was questioning if the list is complete afaik. Not UD1E.
@UD1E#2095 what is the approach? addaction hack?
The completeness was questioned. when he brought dedmen in. i didnt question completeness
right now yes
kk
method
But cpnnick did...
we have toyed with the mousedown as well
Working on it
cptnnick - heute um 17:52 Uhr
The only speculation would be that that list is fully complete ๐ค
Yeah there should be new actions for the plane panels and stuff, no?
They are on the list @indigo snow
Yes, there are very likely actions missing from the wiki.
well all i can say is that that addaction hack has limits. weird ones. and also that the addaction mgiht have to be on the vehicle.
is there a quick dirty way to push back what this key is doing?
Key yes. Mouse no.
what's the overall goal? like keep randos from firing door guns or something?
active dialogs take focus, but they likely block keyboard input too..
no its a lock on script for pilots. problem is we get doubles when we fire on a locked target. one vanilla missile go straight, one goes to target.
why dont you modify the original missile?
this the last "hurdle"
instead of spawning a new one
to do which?
@still forum ty
But I already found some that are not on the wiki
What about disabling manual fire?
isnt that only for drivers to take control of turret weapons?
they might still have driver weapons
๐ต๐ฟ how do you find these things dedmen?
we use manual fire so in case there is gunner everything can be normal
@rancid ruin Hex editor
'UseWeapon' < maybe?
Talking about that more specifically is forbidden
just like only want to override key while we have locked target, other times not block key, so more vanilla
i admit, i was just trying to get you banned
im open to all suggestions ๐
but uh the script itself UD1E, you create a second missile that you guide yourself?
why dont you guide the original missile?
delete non-guided missile and go home early imo
no its not "created" it comes from veh inventory.. on mouse mutton. pilot would lose every second missile..
do you spawn it in by script yes or no?
no
commy_disableManualFire = true;
addMissionEventHandler ["EachFrame", {
if (commy_disableManualFire) then {
private _unit = player;
private _vehicle = vehicle _unit;
if (isManualFire _vehicle) then {
_unit action ["manualFireCancel", _vehicle];
};
};
}];
Untested.
dude im trying to check if theres a better way to solve this problem instead of blocking input.
pilot fires but you wanna block that?
how come theres 2 then?
cant you just delete the original one and not remove a rocket from inventory when you spawn the other one in?
or guide the original missile?
a video doesnt help me with questions about how your script works man
this examle of doubling
you know things are fucked up when you have to solve this with an eachFrame EH
how is the second missile actually entering the game world?
your script creates it, yea?
createVehicle or something or other?
the script fires it but it is not created, it just goes by what is in the inv of current chopper. lol scripting a missile in in hindsight would have saved the week of getting each missile to work properly,
how does it leave the inventory of the vehicle and enter the game world
if (_an=='CUP_M_Ataka_V_9M120_AT9_Spiral_2_AT') then
{
_LASER='LaserTargetE';
if (side player==west) then {_LASER='LaserTargetW';};// if need ???????
_lasew = _LASER createVehicle getposATL _t;
hint format["|Fire at LASER ATAKA| LockSystem: %1 Ammo: %2", _result11, _an];
_lasew attachto [_t, [0, 0, 0]];
systemchat 'Fire CUP_M_Ataka_V_9M120_AT9_Spiral_2_AT';
(vehicle player) fireAtTarget [_lasew, currentWeapon (vehicle player)];
0=[_lasew] spawn { sleep 10; deletevehicle (_this select 0); player commandchat (str (_this select 0)+ ' DEL'); };
sorry
this is example of the work around we came up with for ataka
so is the created missile always the same as the pilot has selected?
yes
where is it removed from the vehicle magazine?
just dont do that
and delete the one the player fired
wait
that createvehicle doesnt do it, its the fireAtTarget bit yea?
delete the other fired missile and add it back to the player
@rancid ruin Well, I searched for an eventhandler to fire when picking manual fire, but there was none.
the create vehicle is for laser or whichever sensor
so either figure out a nice way to capture the missile the player fired, or delete it and add the ammo back
it works โข
You'll need to rethink your script, because blocking input is not possible reliably in this game. This is sad, but true.
this could be an idea.
on this script im more of the tester, troubleshooter. the scripter doesnt have a3, he has a2, it is my job to find the differences.. we know this is no easy task.
pretty unique but ok
just get him A3 /shrug
toos in a lunguage barrier
youll be missing out on useful stuff like with the sensors
yes i know since the update it put twist in this script
can you really trust someone who's still running arma 2 in 2017? that's the real issue here
he keeps up to date,
he keeps up to date if it's 2007 yes
i trust him, why wouldnt i?
we got sensors worked out.. some of those issues popped up immdiatly. had to change lock system because of it. he can move with the times lol.
script was born before jets..
i started on it with him after i "borrowed" and notice probs
we work together on the aas template, they have a server we have one
i offered to buy for him arma 3 he declined. no sure why lol..
see, i told you he's not trustworthy
Well he could have a pc incapable of running A3, then again, my cheap laptop does so ...
i think its bandwitdh im not sure, i not see how this would be much diff a2 but..
pc could also be a factor
but he also still play aas on a2, it seems there are just as many if not more a2 players
my goal with the template was to update to some of the bohemia functions that were not available when this was ported. playing helecoptors is just what we do when nothing to fix lol
is there no way to push back what they key is doing when press?. which action it revert to?
Could I do code in structured text?
Not officially
I'm doing a dialog similar to diary, where the contents can be edited and removed. I guess I'll just use createDisplay and make a different dialog defined for every entry
structured text with code/script would have been much simpler
what about unofficially?
There were bugs and might still be. that allow code execution inside there. But nothing that might do what you want
It's okay
how does the debug console work? just call compile a string?
yeah
Is there a way to force a specific object to render, independent of player view distance?
I don't know
so object setFeatureType 0 actually hides it or what?
Disables feature
So... no
Ohh this was the update that brought dynamic simulation and good performance stuff
actually jets DLC to make it easier to lock on from very far
I still need to make a script that's the same as dynamic simulation, but instead deletetes objects/units and saves their properties.
couple of months old apparently. good to see they're still adding useful scripting commands
More new and splendid features to the ever growing arma platform
splendid - jay on every new platform update lol
Haha yeah ๐ And he's got that smurk on his face everytime he says it
Lol yep.
I wish dynamic simulation had functions I could browse for inspiration for the grid detection system
nigel, thats awsm
Are they not available? Maybe engine based hard code?
I've thought of a few alternatives like attaching markers/triggers to players/units to avoid range checking. I wanna know how their grid system is like
Grid based, you mean like terrain grid based? Or sort of like multiple zone specifications?
multiple zone spec
Yeah that'd be a cool concept
Ooohh...i believe that's only available in the debug exe or is it available in the regular client exe?
No clue, this is from https://community.bistudio.com/wiki/Arma_3_Dynamic_Simulation
There are commands and diag commands but no functions
I've done thinking of doing https://community.bistudio.com/wiki/inPolygon based on player FOV and view distance
Shouldn't eat perf as much as lineIntersects
Thing is the alpha of the markers gets darker in areas with higher simulation afaik.
That could be use to cache crap for EXTREME size missions
Yep
I think what the dynamic simulation uses is hideObject/enableSimulation
I've had missions with a few hundred units with those before and performance was bad.
It's better to delete and save the data
What about recreating it when time comes to see the object?
I don't have issues with that I got a few SSDs and I believe that if you preload the assets like the unit which will be created and all the items, no stuttering will be had. Just can't uncache more than a couple per frame
Well i wouldnt doubt perf issues even with just one.
300 units with simulation disabled//30FPS
300 units deleted //60FPS
Pretty much the dream is combination of the both
Cool, where is the data being stored?
Sweet
unit/object active <500m
unit/object checked for inPolygon <1800m //uncache if inPolygon based on player FOV
unit/object simulation disabled <2000m
unit/object deleted >3000m
also custom coef for different types. a distance could be based on view distance also coef for player speed / altitude based on object type
buildings etc would be ~1500m
small objects like beer cans ~50m
I have so many ideas for big missions so I will make something like this eventually, because It's either that or laggy mission, which is a no-go
There would have to be many checks and functions to ensure units would be saved correctly and could continue where they left from
It's an awesome concept so far.
Gotta dream big ๐
Cans/small props should be closer like 15 or 25 in my opinion. Lol, sometimes too large of a goal. Since a big chunk of that mission would be in that caching concept of yours
yeah exactly
I managed to create a rope between the 2 objects I wanted, making it seem the speakers are wired up.
Is there a specific reason why we have to convert an item to a vehicle just to create a rope between 2 non-driveable objects?
I feel like this would be an easy fix just adding the possibility, then again, I only have limited knowledge of what's going on UTH.
https://image.prntscr.com/image/8aNw3D-vR6a8a0RofkrnMw.png
^
firstOne = "ARM_rokit5car" createVehicle [(getPosATL player) select 0,((getPosATL player) select 1)+0.5,(getPosATL player) select 2];
secondOne = "ARM_rokit5car" createVehicle [(getPosATL player) select 0,((getPosATL player) select 1)-0.5,(getPosATL player) select 2];
secondOne setDir ((getDir firstOne)+180);
firstOne enableRopeAttach true;
secondOne enableRopeAttach true;
theRope = ropeCreate [firstOne,"TRS",secondOne,"TRS",20];
hint format ["Tried attaching rope from %1 to %2",firstOne,secondOne];
Oh thanks, I'll add that to my list of rules on ropes.
Yes, indeed, that's why I've gone through the effort of making non-drivable carX speakers.
Flagpoles are ThingX iirc?
It's a good thing to know the child object inherits.
Say, one was to attach a speaker to a car, and yet another one to a car... then connect both speakers, disconnect both cars and delete cars. would that work?
I understand the need for physX on parent, because the draggin etc.
but if both objects are static and will remain so, why not enable ropecreations between them?
I'm actually building speakers, mixing table and would like to wire them up.
So if the concept works, one could create all sorts of cables.
Chains, powerlines, ...
WIP, but imaging the jack on the end. I defined mempoints for both TRS and XLR and plan to make the cables as well.
The problem is not that, it lies in the creation of the rope.
One can't create a rope between 2 ThingX classes, the parent class has to be of class CarX.
And I'm unable to get around that. Maybe I'm missing something.
Everywhere I look, people use UAVs, Karts, etc...
@hasty violet That almost sounds better than ACE Nametags
Ace has some really good nametags. FadeOnBorder is important
hey, is there someone here who would help me with some extDB3 scripting? I've got a few things written already but I am unsure how to proceed. Already asked assistance twice in the Exile discord, but so far no one has been able to help. If possible, assistance in PM to keep channels from spam ๐
Do you mean SQF or SQL?
@tough abyss I don't know what you mean.
I have a question of my own. I'm trying to sort an array of strings in alphabetical order. That works, but I have a second array that needs to be sorted out in the exact same order. How can I proceed? For example:
[["58001","911","12345","79302","98765"],["Jesus","Emergency","Original","Random","Original Part 2"]]
Should become
[["911","58001","12345","98765","79302"],["Emergency","Jesus","Original","Original Part 2","Random"]]
Yes, yes. Got that one.
@still forum SQF mostly. SQL I have some experience with
_array = [((_array select 0)sort true),((array select 1)sort true)];
Wouldn't the indexes become completely unrelated?
yes they would
Yeah
Or ["NAME","NUM"] in my case so I can sort by alphabetical order.
porbably easier
or maybe sqf _digits = ["xxx","xxxx"]; _string = ["xxx","xxxx"]; (do sorting here) _array = [_digits,_string];?
_newArray = [(_oldArray select 0) sort true,[]];
{
(_newArray select 1) pushBack ((_oldArray select 1) select ((_oldArray select 0) find _x));
} forEach _newArray select 0;
that might do it
@tough abyss that would still scramble the indexes.
hm yea I just saw only one part is sorted
@still forum honestly at that point I'll just change the way I build the array. There was no particular reason why it was built that way anyways.
Yeah. That's a better Idea.
But still, thanks for your suggestions.
so, @still forum you know how extDB3 works or was it just a question earlier?
Was just a question. But if you are just asking about SQF I can probably help you.
[NESTED_ARRAY,{_x select 0},"ASCEND"] call BIS_fnc_sortBy @tardy yacht
If you are asking about extDB3 specifically you should maybe ask the Author directly in #arma3_tools. I don't see extDB3 talk in here that often so I'd guess there are not many "specialists" here.
could try, not sure Torndeco has that time for a starter in sqf/sql combinations ๐
Or you could just ask a more specific question here and see if anyone has the answer. If not you probably have to refrain to google or some extDB3 specific Forums or something like that
People tend to just ignore people who ask "Can someone help me with a something?" Because why bother asking what that something is. If you want a answer you have to ask a specific question.
@indigo snow I'll have a look at that one if re-doing the way my array works is too much. Thanks!
Im also not quite sure what youre doing with it that needs sorting, but if youre adding them to a listbox you can always just sort the listbox after youve added all the entries or something
lbSort and lbSortByValue
Just checked, lbSort does just what I need. Thank you for that.
cool. The function i linked earlier would work with your orginal array structure either, i just realized. The example i wrote was for nested pairs ([[name,num],[name,num],...])
well that's true @still forum but I was asking if someone had extensive knowledge and could help with a few steps in extDB3 SQF/SQL so I guess it's rather precise ๐
so #arma3_tools is where you recommend asking?
Try forum thread for mods etc.
haven't found a forum for extDB3 to ask for personal assistance
@tough abyss torndeco is mostly around in #arma3_tools and extDB3 is a tool
seems a poor place to ask personal assistance without posting everything there first
other question, if I were to update the database with all current objects on map (buildings, vehicles, respawns, tasks) would it be wiser to wipe the database first and import all new or remove the objects in the database that aren't on the map and insert all objects on the map that aren't in the database?
you mean a update. Or the first push of data in the current run of the mission?
on an update you should generally only update. And not completly rebuild
yea basically a zeus has made an initial base somewhere and saved it to the database. Next mission this zeus deletes some buildings in the initial base and builds another somewhere else. One could wipe the data in the database first and then import the objects as if it were an initial build or one could check all objects if they are known in the database and delete/insert where necessary
(mission restart and possible server restart included)
I know what he asked.
Ok, sorry my bad.
checking if objects are already in the database is probably quite processing heavy.
yea that's what I thought
How do you identify an "object" ?
by it's netID?
For updating or inserting objects you can just do a update_or_insert kinda thingy. Which checks the primary key and if it already exists updates the existing entry
hm no I was thinking of a function that finds all buildings that weren't initially on the map (the default map)
Hmm, maybe check how wasteland does it, there are other mods that have done this and might have ran into the same question.
but for deleting objects you still need to check
put that in an array
and run the inserttosql script for the length of the array
AFAIK wasteland uses the server profile, no?
My preferred way would be to just use init and deleted eventhandlers on all the stuff
and then add them on init and remove on deleted
how would one add such eventhandler to objects build by Zeus? A persistently running script?
(or function)
CBA XEH would be the easiest
well the modpack we use on the server contains CBA yea but I might try to let it run strict vanilla too
There is also a eventhandler for CuratorObjectCreated or Placed or something like that
if I use CBA on server, is it required client side too?
I think so.. yeah
You can just add that Handler in init.sqf to detect spawned buildings and then add the deleted EH to them
you also need to add the EH to all thingies that you load from the database at mission start
You should also probobly detect all the map objects which are destroyed or damaged?
hm thanks I was looking to keep all functions in a server addon so I can deploy it on multiple servers and different maps at once without too much re-editing
Yeah.. Nothing stops you from doing that
@peak plover that even handler needs to be defined for every object right? How would that work for objects that are added during a Zeus op
@tough abyss I already answered that question
You can use the CuratorObjectPlaced eventhandler on the Zeus player
Dedmen said
There is also a eventhandler for CuratorObjectCreated or Placed or something like that
hm let me look that thing up ๐
How could you save destroyed buildings and stuff 'tho?
No hits on google`?
if it gets damaged it'll be manually deleted anyway
no it gives me stuff about Malden
I searched for "Arma 3 CuratorObjectPlaced" and first result was https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#CuratorObjectPlaced
There is also CuratorObjectDeleted
I get arma3.com/dlc/malden
and the question if I meant the same thing with spaces in between
And you add them to the Curator Logic so they might also fire serverside
okay I see different EH for markers and objects (I assume that's construction stuff and vehicles). Any way EH for respawns and tasks? Or just write a script that finds them all?
I can just use the EH to call the function that saves the object to the database?
Yes. Ofcause.. You can do anything you want in there
oohhh let's see how that works out
oh just saw I need to do it for 3 zeus slots. Can I write a function that runs at the init and adds the EH or will that not work server side?
In SQF you can do anything.. (almost)
except use player on server ๐
would this do it? sqf do { this addEventHandler ["CuratorObjectPlaced", { object_placed = call (fucntion) }]; this addEventHandler ["CuratorObjectDeleted", { object_deleted = call (fucntion) }]; this addEventHandler ["CuratorObjectEdited", { object_edited = call (fucntion) }]; this addEventHandler ["CuratorMarkerPlaced", { marker_placed = call (fucntion)] }; this addEventHandler ["CuratorMarkerDeleted", { marker_deleted = call (fucntion) }]; this addEventHandler ["CuratorMarkerEdited", { marker_edited = call (fucntion) }]; } for AllCurators;
will it also work for objects that are imported and placed by the server for the database?
is that supposed to be SQF?
this is wrong
XD
@tough abyss That is not valid SQF. I don't know what the return values of your functions might be. You spelled function wrong.
Answer to your question. No. I already told you that before.
that (function) is just a placeholder @still forum
the entire structure of it is wrong im afraid
[what should this be then?] addEventHandler ["CuratorObjectPlaced", { object_placed = call Requiem_fnc_object_identification_created; }];```
how so @indigo snow
all functions return true
can change to nil too
how much experience do you have with SQF? I recommend looking up forEach on the wiki first.
@tough abyss If you already know what all the functions return. Why do you store the returned value?
And [what should this be then?] is wrong. That shouldn't be an array.
...
this is probably correct.
oh so that was correct
this only exists in init boxes
if you add it in the Editor in an Initbox then that is correct
hmmm
Which I suppose is exactly what you are doing for your Zeus modules
i can also guarantee you want _x there, though
no it's in a function actually that I want to run post-init
if you look up forEach
ah that may be the thing then
{
_x addEventHandler ["CuratorObjectPlaced", { object_placed = call (fucntion) }];
_x addEventHandler ["CuratorObjectDeleted", { object_deleted = call (fucntion) }];
_x addEventHandler ["CuratorObjectEdited", { object_edited = call (fucntion) }];
_x addEventHandler ["CuratorMarkerPlaced", { marker_placed = call (fucntion)] };
_x addEventHandler ["CuratorMarkerDeleted", { marker_deleted = call (fucntion) }];
_x addEventHandler ["CuratorMarkerEdited", { marker_edited = call (fucntion) }];
} forEach AllCurators;
object_placed is wrong
Oh. forgot the forEach.. yeah the this was definetnly wrong then
ah I thought I could leave the Each out because it already had allCurators
object addEventHandler ["type",FNC_NAME] if you dont use the return anyway
no what
that wasnt a valid sqf structure at all
you cant just go make things up
following sqf mySoldier addEventHandler ["Killed",{hint format ["%1 was killed by %2",name (_this select 0),name (_this select 1)];}]
where the code that runs on firing lies between the { }
im familiar with it
then why is it wrong in this way?
your addEventHandler wasn't wrong. Besides the this
like to store the value to check if the function worked
like gradually checking if every script does its job correctly
@indigo snow object addEventHandler ["type",FNC_NAME] is a bad Idea performance wise. object addEventHandler ["type",{call FNC_NAME}] is much better
No.
ah?
Because it converts the code to a string and only stores the string and recompiles it before every execution
If it would use the code type variable the first variant would be better
it event converts to string internally? good to know, wouldntve thought that
sqs legacy i guess
@still forum for the issue of objects imported from the database, would a script that adds all those objects as editable to the Curator, allow the CuratorObjectEdited / Deleted to be fired?
the Curator eventhandlers are fired whenever a Curator does something
alright cool so that should be solved in that case
If the curator can't access the object then ofcause he can't delete or edit it
Answer to your question. No. I already told you that before. thought you meant with that the objects cannot be used anymore at all for database operations
Dedmen - Today at 12:23 PM
you also need to add the EH to all thingies that you load from the database at mission start
that's odd don't seem to find that message
ah there we go
search function to the rescue
can you explain me why the EHs must be added to the objects and not just the Curator? (This handler is supposed to be added to curator module, not player. - EH page you referred to)
Because that's how it is.
The curator Module IS the curator
The player just takes possession of it
The documentation on curator modules and eh is plentiful. Grab a hot beverage and read it throughly. Take your time.
okay so the EH are only supposed to be added to the curator object (the curator module I assume). That isn't saved in the database, so that only needs the post-init function to add the EHs doesn't it
yes
aaah I thought you meant it had to be added to the objects (buildings and vehicles) that came from the database
how can I differentiate the object from being a regular construction object or a vehicle ? TypeOf/IsKindOf
I believe TypeOf is too specific for this?
typeOf will compare classnames, isKindOf will check if object belongs to the same subcategory.
hm so is there one suitable to determine if an object is a car or construction object (any other object that isn't a vehicle such as buildings, tents etc)
either grab a list of suitable base classes or check the simulation property in the config i guess
hmm that could be rather tricky if modded objects are involved :/
It will be even trickier to not whitelist if there are mods involved imo.
what do you mean with the whitelist?
_theWhitelist = ["typeName1","typeName2","typeName3"];
if (typeOf _objectTocheck in _theWhiteList) then {
//code here
};
modded objects wil still have simulation entries and correct base classes
every infantry soldier will be a child of CAManBase
Suitable base classes are not tricky with modded objects. As they would also base their object off of a suitable base class.. Unless they are out of their mind
hmm would AllVehicles work? (Found that on a dump on base classes)
Guess you're right, so find out which ones you need then?
get the configParents from lots of objects and compare, i guess?
AllVehicles might work.
Yeah, best thing is to try it out and see really.
That contains a real ton of stuff though. Try it out
no documtation on it unfortunately (as far as I can see in the google results)
in the debug menu I try do {hint "Found";} forEach AllVehicles; I am missing a ; somewhere..
where do you keep getting do from
isn't that how it's supposed to be written?
I see it most of the scripts using a forEach
not in working sqf scripts you dont
do {objectsToAdd = (entities "AllVehicles" - entities "Animal" - entities "RoadCone_L_F" - [Quartermaster,Quartermaster_1,Quartermaster_2,Quartermaster_3,artyMLRS,artySorcher,Quartermaster_2]); publicVariable "objectsToAdd";{_x addCuratorEditableObjects [(objectsToAdd), true]; } foreach allCurators; sleep 180;};};
``` Why does this work flawlessly then
im having issues reading that but freak accident?
do is a binary command accepting a construct on the left side and a code type on the right side
@tough abyss Because that's not the full code
ah i see it
ah must be the "while" that needs it
{_x addCuratorEditableObjects [(objectsToAdd), true]; } foreach allCurators;
do
{
objectsToAdd = (entities "AllVehicles" - entities "Animal" - entities "RoadCone_L_F" - [Quartermaster,Quartermaster_1,...]);
publicVariable "objectsToAdd";
{_x addCuratorEditableObjects [(objectsToAdd), true]; } foreach allCurators;
sleep 180;
};
};
That code still doesn't work after reformatting though.
yea missed a part of the code because I thought the do was linked to the ForEach
turns out it's for a while
Also this code is broadcasting a potentially HUUUGE array to all players. Although that is apparently not needed
and you're right allVehicles doesn't do anything
its a classname in the configFile
No one said AllVehicles doesn't do anything ๐ฎ
in aforementioned script ๐
Ah.. Thought you were referring to entities "AllVehicles"
Yeah.. A non-script command is not a script command... Who would've thought.
its a very high level one, yea
id use Thing or ThingX to check a chair against or something
guess I'll have to go with "Air", "Tank", "Car", "MRAP", "Truck", "Boat" and "Submarine" or something
MRAP isnt a child of Car or Tank?
theres also CarX, TankX and a few other for physX types
think a few mods have the category
MRAP is below Car afaik
this isnt about the categories you see in the editor
theyre separate from config (base)classes
okay so no MRAP then
you can set a plane to show up under tanks if you want
but in config the only plane that might be a child of a tank class might be the A10 ๐
what about the submarines, do they in "Boat"?
yea id guess, boat is top level for water stuff last i checked
best to check yourself tho
check out this command: https://community.bistudio.com/wiki/configHierarchy
found these "Car","Ship","Air","Armored","Submarine","Autonomous","Support"
on the WIKI but is it an actual class or just a category name
Car Ship and Air are classes
rest probably category name
Just check ingame config viewer
it tells you everything
just did, they are vehicle classes
unfortunately mods use others hence need to be imported separately
is there a short command that could output all of those to a file?
diag_log
All classes? No. Entire config tree? no. But over 98% of that Data is stuff you don't want
I already told you. Grab a vehicle. Check config Viewer.
I know but the mods I use create a ton of other vehicle classes
okay maybe a question I should've asked earlier. Is it necessary to make a distinction between buildings objects and vehicles if I am not concerned with damage or lock status?
as both vehicle and building follow the same creation sqf _constructionObject = createVehicle [(_data select 1), _position, [], 0, "CAN_COLLIDE"]; _constructionObject setPosATL _position; _constructionObject setVectorDirAndUp [_vectorDirection, _vectorUp]; _constructionObject enableSimulationGlobal true; _constructionObject setVelocity [0, 0, 0]; _constructionObject setPosATL _position; _constructionObject setVelocity [0, 0, 0]; _constructionObject setVectorDirAndUp [_vectorDirection, _vectorUp]; _constructionObject setVelocity [0, 0, 0]; true
is there a thing as AllCurators for tasks and respawn points?
https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3 Not really I guess
hmm so creating an event handler to store respawn points and tasks if not viable then
unless a respawn module placed by Zeus leaves a marker?
ooooh wait... it's an object too? Gotta find its class name then
@still forum would this work for the classification? sqf if (_x isKindOf "ModuleVehicleRespawnPositionWest_F") then { respawn_insert = call Requiem_fnc_spawn_insert; } else { if (_x isKindOf "ModuleTaskCreate_F") then { task_insert = call Requiem_fnc_task_insert; } else { object_insert = call Requiem_fnc_vehicle_construction_requiem_insert; }; };
only after closing the else statement, right?
(and the function call)
correct now?
awesome ๐
Does anyone have a script for suicidal ai?
@tough abyss disableAI "AUTOCOMBAT"; setbehaviour "AWARE"; enableAttack false;
Then set a waypoint and let them rush it
Ohh yeah, suppression also causes them to lie down. setSkill ["courage",1]; helps a little with that
Thx
Anyone of you know how to maintain a picutre's aspect ratio when used in a menu button?
Hmm, is using control groups inside control groups broken?
I'm getting wrong positions even if I use normal positions
I wonder if anybody could explain to me why no matter what I put in the trigger, that it will only ever spawn the default vehicle?
https://pastebin.com/F1sS7aJx
well I'm probably wrong here, but in most languages, you need to return for each case block, or it will go on to consider the next case, and the next falling through to the 'default'
don't know whether SQF switch is different somehow
ok, read the wiki, ignore me
it seems to work on my other server
which is why im confused
it works exactly the same way
yeah, what I said doesn't seem to apply to SQF, there's an implicit break for each evaluated case
I believe I got around this last time by editing the mission.sqm
but for some reason any mission file I make, theyre just looking really odd
nvm, fixed it
http://i.imgur.com/XrXcu8c.png
Using a control group inside a control group, can't get the X/Y to work.
If i use 2 controlgroups, the pink one is always on the bottom (no matter if it's defined before or after)
I need to either, fix X/Y of controlgroup inside control group
or
Make the pink control group always on top
controlBackground for the main control group did it http://i.imgur.com/kveelDh.png
X,Y = 0,0 at the top left of the parents controls group for ctrlSetPosition
But not for ctrlPosition iirc.
That didn't work when controlgroup inside a controlgroup
a control inside controlgroup works fine 'tho.
Weirdly enough ctrlSetPosition 0,0 are not the parent control group coordinates
_textPos params ["_oldX","_oldY","_oldW","_oldH"];
_textPos = [
(_oldX + 0 * (_GUI_GRID_W)),
(_oldY + 0 * (_GUI_GRID_H)),
5*(_GUI_GRID_W),
5*(_GUI_GRID_H)
];
_textCtrl ctrlSetPosition _textPos;
_textCtrl ctrlCommit 0;
systemchat str ctrlParent _textCtrl;
systemChat str ctrlParentControlsGroup _textCtrl;
all correct
Except in theory I should not need the _oldX and should be able to use 0 and 0
NEVER MIND
Stupid me. I used safezoneX, (not 0)
And that's why my control group inside a control group would not work
Damn I was stubborn
is there a function similar to contains, aka check if string contains a specified string?
find, case sensitive
thanks
I always use resistance, because I can never remember independent vs. independant.
Like "pendant" ๐
guerillia/gorilla/gourilla/gourillia/gurillia/gurilla/guerillia
"resistance" is a term from physics, so I know how to write it by heart...
Gorilla warfare.
@little eagle: are you a physicist?
engineer.
so apparently fired RPG warheads are local to the player that shot it whereas fired bullets are global!?
๐
standby again. sorry <face palm>
Bullets are local objects and every machine owns one. Missiles are global objects and the shooter owns it.
owns one for every round fired*
weird.
op1 addEventHandler ["FiredMan", {_this execVM 'fireEH.sqf'}];
op2 addEventHandler ["FiredMan", {_this execVM 'fireEH.sqf'}];
// from fireEH.sqf
params ["_shooter", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle"];
player globalChat format ["shooter = %1 | proj = %2", _shooter, _projectile];
when op1 shoots, both clients say a round was fired but bullets have different numbers
What's wrong with them having different numbers?
when op1 shoots a rpg, op1 has a rpg object but op2 has a objNull
nothing
the issue is the objNull on the rpg for everyone else (namely the server where i'd like to do the tracking)
i'm likely going to save the projectile to a more global varialbe space, or on the shooter, it's just annoying and i'm going to have to restructure a couple things
thanks for letting me cathartically vent.
slash confirm what i was seing
ยฏ_(ใ)_/ยฏ
if ever there was an emojii for Arma scripting, thats it.
does anyone know where I can download Mikero's Tool (Eliteness)? WithSix, dev-heaven don't seem to work
need it to create a $PBOPREFIX$
You don't need Eliteness to create PBOPREFIX
^According to the forum thread
$PBOPREFIX$ is literally a text file
...Does the bis addon builder support $pboprefix$?
:/ didn't think so
it ignores the file. But you can set the prefix in the options
Yeah, but having a pboprefix is a tad easier than changing the options thing
@sand pivot There is a bug where the fired eventhandler reports null for missiles fired from units on remote machines.
params ["_unit", "_weapon", "", "", "_ammo", "", "_projectile"];
// http://feedback.arma3.com/view.php?id=12340
if (isNull _projectile) then {
_projectile = nearestObject [_unit, _ammo];
};
That's what i was thinking of trying. Thanks @little eagle
It's the first thing I was taught by my SQF mentors.
I gotta remember to look in phab for these nuggets
Imo this stuff belongs on the wiki, but KK would just delete it, so...
@still forum: more of a pseudo text file, since it has no extension.
Files don't need extensions you know?
That's just to help Humans to better differentiate
A file without extension can be a text file. And I think most of them are.
on Linux files without an extensiona re probably a executable
I see. I haven't gotten into Linux.
I write down stuff in random text files and never bother giving it the .txt extension.
I only do it because notepad++ adds it automatically if I don't
Only if it's code. For the syntax highlighting of ST3.
I wonder why people consistently name their scripts .sqf. People don't give a shit about conventions. Or even people that are strongly against logical intelligent conventions still name their scripts .sqf
I think the concept is weird. The filetype should be in a header and not the name.
I guess Lifers would be confused if people start to name their scripts .stuffzstuff
They don't know any better and think it's needed. But I'd do it merely because of the syntax highlighting...
or fn_stuff.exe ๐
The ultimate obfuscation is naming the script .paa
Would that actually work?
We (BWA3) did this to hide a texture randomizer for a rare texture.
That's pretty cool.
The benefit of naming it .paa was, that gitlab converted it to a 4kb text file dummy for the public repo automatically.
Since we don't OS textures and models.
Ahh :3 Neat
New Steganography scheme! Append encrypted zip files to textures and pack them in a pbo and publish it on workshop
IP laws made numbers illegal. Think about it.
But is .paa faster than .sqf ๐ค
so it is not only me who just now opened a beer tonight?
I drank over 3 liters of juice in the last 2 hours
sugar shock
youre still all in
Wow, that's impressive, @still forum.
Good teamwork
i usually experience that when i drink 1.5l energy drink in ~30minutes
Can't be healthy ๐ฌ
you get a sugar shock and the coffin is "killing" you ...
feels like you breath but no air is comming in
still ... getting work done better then without
Just disconvered our super market sells 2L bottles of energy drink stuff
would love that :(
our max is 1.5l
Need to try someday. #offtopic ๐
Mean while I'm sitting here drinking nothing but water...
on linux a file without an extension can be anything, linux doesn't need extensions, although they do help to provide clues to the file type so it doesn't need to probe the file to figure out what it's contents might be
oh ffs, f' you discord
Hey, does anyone here have the default path for the grey version of the Gryphon jet?
I am trying to find it but can't
gryphon? dlc? may still be ebo
Place gryphon in Eden. Right click. View in Config browser. Profit
is it possible to compile code during runtime with say a text field input?
Have you used the debug console?
Or are you wishing to prompt input from a singular script?
@BoGuu input prompt from a singular script.
I'm looking to allow the player to add their own task conditions.
@subtle ore Have you ever used Debug console? Because that's exactly what it does.
99% of Arma scripts are compiled during "runtime"
No. I think you're missing my point, probably not the correct words either. Control -> Inputted Code Via String - > Executed -> Task created with player's custom conditions
I'm not missing your point
Mis understanding?
No.. I don't think so
I don't wan't to give the debug console to anyone
I never said that
You want the player to be able to enter a script that will then be used as condition in a task.
yes
The debug console is doing the same. The player enters a script. Which then get's compiled and executed
So yeah.. It's possible
Okay, bear with me here. How might I go about that?
https://community.bistudio.com/wiki/compile to compile the code
Okay, that works. Thanks.
then you can execute that and get the result true/false returned
Btw by doing that you are basically giving the Debug console to anyone who can enter code in there
Going to disclude anything that doesn't match up
so you are going to disallow call,compile,format and all the addEventHandlers? and remoteExec and endMission and.. stuff
Well no, that's like trying to compare something to all rather than what's needed. _str != "name" versus !(_str in ["1","2","3","4","5"];)
what's needed would be strictly something like alive getDammage and inArea type commands for tasks
So you want to write a script parser in SQF and pick out all the commands and check that against a whitelist?
sure you could say that
Have fun then ^^
Heh, thanks.
Not to mention players might execute code to assign value for a global varible to break a script etc
Will be nightmare to secure if its for any sort of public server. Better off to have pre-defined options imo
Midnight is going to forbid the assignment operator probably. so that's not a problem.. theoretically
Been looking for solutions online but everyone does really weird shit: How can I put a texture on a button, and make the texture keep the correct aspect ratio?
hello lads if an event handler is attached to a zeus module server side, will it trigger when a zeus places something? The only thing I see in the logs are sqf 16:13:10 "Debug menu used!" 16:13:16 Server: Object 4:28 not found (message Type_127) 16:13:16 Server: Object 4:29 not found (message Type_121) 16:13:16 Server: Object 4:30 not found (message Type_114) 16:13:16 Server: Object 4:38 not found (message Type_451) 16:13:16 Server: Object 4:39 not found (message Type_121) 16:13:16 Server: Object 4:40 not found (message Type_114) 16:13:16 Error: Object(4 : 37) not found 16:13:17 Server: Object 4:48 not found (message Type_451) 16:13:17 Server: Object 4:49 not found (message Type_121) 16:13:17 Server: Object 4:50 not found (message Type_114)
whereas the function called using the event handler ran on the server by debug menu does create the expected message in the logs
if a player takes control, the zeus module will probably change locality to his client
alright thanks. Is there a way to call a function globally instead of on the server only/client only?
see Dedmen above, remoteExec
watch out with what data you send, dont send huge data bits
setVariable already has a global flag
X setVariable [name,value,true] to broadcast to all clients and server
yea but in this case the server must first know it has to send it, via the event handler ๐
hm remoteExec still doesn't cause the logs
using addEventHandler ["CuratorObjectPlaced", { object_placed = remoteExec ["Requiem_fnc_object_queue_insert", 2, false]; }]; (because only server needs to do this)
What is the question?
you are storing the return value of remoteExec?
the addEventHandler is running on the client?
okey... mh
runs firstly on mission start, then everyone JIP
just put a diag_log right into the eventhandler to see if and where it executes
maybe it does actually execute on the server but you made a mistake elsewhere
CuratorObjectPlaced only fires on the machine where the curator logic is local.
We know that. But where is that?
The machine that has the player looking at the zeus interface.
okay, so that client must know what the function is, because the remoteExec on server only doesn't reacht the server for some reason (after placing 4 griffons)
Everyone must know what the function is, otherwise remoteExec will fail on those machines that don't know.
remoteExec does not transfer the named function over the net. It would be very inefficient if it did.
it only needs to run on the server
Like addMPEventHandler ...
@little eagle remoteExec tries to exec it on the Server. Only the server knows the function
then it should be fine right? server has function, client RE's to server
so something else is going wrong
Yes, but idk what remoteExec on channel 2 does in SP.
it's for MP
Are you testing in MP too?
And the problem is?
that the only thing in the function attached to the event handler is a diag_log with some text
which doesn't appear after placing objects
in the server logs
You wrote:
addEventHandler ["CuratorObjectPlaced", { object_placed = remoteExec ["Requiem_fnc_object_queue_insert", 2, false]; }];
But there is the object missing on the left side of addEventHandler
let me post the rest, one sec
{
_x addEventHandler ["CuratorObjectPlaced", { object_placed = remoteExec ["Requiem_fnc_object_queue_insert", 2, false]; }];
_x addEventHandler ["CuratorObjectDeleted", { object_deleted = remoteExec ["Requiem_fnc_object_queue_delete", 2, false]; }];
_x addEventHandler ["CuratorObjectEdited", { object_edited = remoteExec ["Requiem_fnc_object_queue_update", 2, false]; }];
_x addEventHandler ["CuratorMarkerPlaced", { marker_placed = remoteExec ["Requiem_fnc_marker_queue_insert", 2, false]; }];
_x addEventHandler ["CuratorMarkerDeleted", { marker_deleted = remoteExec ["Requiem_fnc_marker_queue_delete", 2, false]; }];
_x addEventHandler ["CuratorMarkerEdited", { marker_edited = remoteExec ["Requiem_fnc_marker_queue_update", 2, false]; }];
} forEach AllCurators;
diag_log "Curators initiated";```
yea youre not sending any arguments with the function
how would the server know what object was actually created?
?
the only thing that function does is diag_log "Object placed in queue"
ah right, i still had the object not found thing in the back of my head
haha np
And that string doesn't appear in the servers RPT when placing an object with the zeus?
that is correct
the diag_log from the code above does appear
but the diag_log from the function does not
haven't checked but it does appear on the server
thats irrelevant
Check if it appears on the clients.
The eventhandler has to be added on every machine.
Because it requires the logic to be local.
I do that with sqf engineID = remoteExec ["Requiem_fnc_curator_eventhandlers", -2, true]; diag_log "Gentlemen, start your engines!"; nil
remoteExec ["Requiem_fnc_object_queue_insert", 2];
^ enter this via debug console (LOCAL EXEC) and see if it makes the string appear in the servers RPT.
(server takes a while to load)
No hurry.
if youre restarting everytime, i dont think you have to to update a mission
what do you mean?
restarting the entire server or just the mission?
this whole thing is server sided PBO
Oh boy.
so to update it, the server needs a restart
id do the dev work in a normal mission pbo, would save you a lot of time during dev
or look into filepatching
Put your scripts into the mission.
wouldn't that later prevent the functions to be moved to the server pbo later?
Why would you create that mess in the first place?
So, did the log appear on the clients?
hmm found some spam in it
_x addEventHandler ["CuratorObjectPlaced", { object_placed = remoteExec ["Requiem_fnc_object_queue_insert", 2, false]; }];
_x addEventHandler ["CuratorObjectDeleted", { object_deleted = remoteExec ["Requiem_fnc_object_queue_delete", 2, false]; }];
_x addEventHandler ["CuratorObjectEdited", { object_edited = remoteExec ["Requiem_fnc_object_queue_update", 2, false]; }];
_x addEventHandler ["CuratorMarkerPlaced", { marker_placed = remoteExec ["Requiem_fnc_marker_queue_insert", 2, false]; }];
_x addEventHandler ["CuratorMarkerDeleted", { marker_deleted = remoteExec ["Requiem_fnc_marker_queue_delete", 2, false]; }];
_x addEventHandler ["CuratorMarkerEdited", { marker_edited = remoteExec ["Requiem_fnc_marker_queue_update", 2, false]; }];
} forEach AllCurators;
diag_log "Curators initiated";```
```sqf
16:05:16 Error in expression <zeus_admin t allCurators>
16:05:16 Error position: <t allCurators>
16:05:16 Error Missing ;```
I don't know where the part of zeus_admin comes from
somewhere else
zeus_admin is nowhere used
its not appearing from thin air i promise you ๐
Search "zeus_admin" (0 hits in 0 files) searching in the folder that the functions are in
search mission.sqm
zeus_admin might not be the entire term
haven't set it to match whole word only
The t seems wrong.
yea but I have no idea where the zeus_admin or t comes from
it's not anywhere in the functions themselves
diag_log str allCurators;
Is it just magic
It's probably somewhere in the mission.
Or one of your scripts you delegate from that server addon to the clients.
@peak plover "zeus_guest","zeus_admin","game_master"
Your problem seems to be that you're trying to find errors in the scripts, but the problem is somewhere in the way the scripts are executed (or not).
hmm alright ignore that error entry, it seems to originate from the debug menu, not the server addon
You have to fix every script error or any other script may behave unexpectedly.
found it
17:10:18 "Gentlemen, start your engines!" on the server
but not on my client
I don't know which script this is from. Is this good?
What function does print this string?
engineID = remoteExec ["Requiem_fnc_curator_eventhandlers", -2, true];
diag_log "Gentlemen, start your engines!";
nil```
That is the value of the function, but what is it's identifier? What is it's name?
it's function run postInit
Then this function is never executed on the clients.
Therefore the string will not be logged on the clients.
-2 would be everyone but the server I read
oh yea I must be mistaking the diag_logs
diag_log "Curators initiated";```
this should appear client side but doesn't
Yeah. This string will only run on the server.
as a part of sqf { _x addEventHandler ["CuratorObjectPlaced", { object_placed = remoteExec ["Requiem_fnc_object_queue_insert", 2, false]; }]; _x addEventHandler ["CuratorObjectDeleted", { object_deleted = remoteExec ["Requiem_fnc_object_queue_delete", 2, false]; }]; _x addEventHandler ["CuratorObjectEdited", { object_edited = remoteExec ["Requiem_fnc_object_queue_update", 2, false]; }]; _x addEventHandler ["CuratorMarkerPlaced", { marker_placed = remoteExec ["Requiem_fnc_marker_queue_insert", 2, false]; }]; _x addEventHandler ["CuratorMarkerDeleted", { marker_deleted = remoteExec ["Requiem_fnc_marker_queue_delete", 2, false]; }]; _x addEventHandler ["CuratorMarkerEdited", { marker_edited = remoteExec ["Requiem_fnc_marker_queue_update", 2, false]; }]; } forEach AllCurators; diag_log "Curators initiated";
this should appear client side but doesn't
Yes.
And what is the name of the function you just posted?
fn_curator_eventhandlers.sqf
Requiem_fnc_curator_eventhandlers
?
Requiem is the tag
Sure. A functions name is Tag + _fnc_ + function name
then it's correct right?
Is Requiem_fnc_curator_eventhandlers defined on the clients?
hm no
Then remoteExec will fail on the clients.
should I make it remoteExec [ {_x addEventHandler etc etc etc ];?
remoteExec only transfers the functions identifier as string ("Requiem_fnc_curator_eventhandlers")
and then just go for a call
And the executes it from the mission namespace.
to let the server run fn_curator_eventhandlers
If the function is undefined, nothing happens.
so if I were to revert to a simple call for the fn_curator_eventhandlers, then in that function use remoteExec for the event handlers?
?
remoteExec ["{
_x addEventHandler ["CuratorObjectPlaced", { object_placed = remoteExec ["Requiem_fnc_object_queue_insert", 2, false]; }];
_x addEventHandler ["CuratorObjectDeleted", { object_deleted = remoteExec ["Requiem_fnc_object_queue_delete", 2, false]; }];
_x addEventHandler ["CuratorObjectEdited", { object_edited = remoteExec ["Requiem_fnc_object_queue_update", 2, false]; }];
_x addEventHandler ["CuratorMarkerPlaced", { marker_placed = remoteExec ["Requiem_fnc_marker_queue_insert", 2, false]; }];
_x addEventHandler ["CuratorMarkerDeleted", { marker_deleted = remoteExec ["Requiem_fnc_marker_queue_delete", 2, false]; }];
_x addEventHandler ["CuratorMarkerEdited", { marker_edited = remoteExec ["Requiem_fnc_marker_queue_update", 2, false]; }];
} forEach AllCurators;
diag_log "Curators initiated";", 0, true];```
would that work?
Requiem_fnc_curator_eventhandlers remoteExec ["BIS_fnc_call"];
You could do this ^ to execute a function on machines regardless if it is defined.
But note that the whole function will be transferred as longish string, which is pretty bad for connection. Red chain etc. when you abuse it.
would that work?
No, you need to at least escape the quote marks in strings.
Definitely.
There is no benefit in using a server only addon for this. It only creates trouble and headaches.
Everything you can do with a server only addon, you can do with a mission... And you don't have to worry about locality and race conditions (as much), because all scripts are transferred before the mission starts on the client.
I tried to make it all server side so I could just create a small base on a new map and not having to transfer all the scripts to the mission pbo
and saving to database later, doubt it works for a client
Make a template mission then. That only has the scripts and maybe the lobby units.
question in-between, if the log shown a Object not found (Type_XXX) would that interfere with anything?
ah there we go
it's spamming the diag_log after I spawned a composition
working ^^
now if I were to pass an argument (the placed object) to the server, how that go? as _x is taken by allCurators
Ignore the object not found stuff.
alright thanks
The placed object is passed in the _this ARRAY variable. You pass _this via remoteExec.
okay cool!
Object not found (Type_XXX) is a serious issue, take it seriously
{
_x addEventHandler ["CuratorObjectPlaced", { object_placed = _this remoteExec ["Requiem_fnc_object_queue_insert", 2, false]; }];
_x addEventHandler ["CuratorObjectDeleted", { object_deleted = _this remoteExec ["Requiem_fnc_object_queue_delete", 2, false]; }];
_x addEventHandler ["CuratorObjectEdited", { object_edited = _this remoteExec ["Requiem_fnc_object_queue_update", 2, false]; }];
_x addEventHandler ["CuratorMarkerPlaced", { marker_placed = _this remoteExec ["Requiem_fnc_marker_queue_insert", 2, false]; }];
_x addEventHandler ["CuratorMarkerDeleted", { marker_deleted = _this remoteExec ["Requiem_fnc_marker_queue_delete", 2, false]; }];
_x addEventHandler ["CuratorMarkerEdited", { marker_edited = _this remoteExec ["Requiem_fnc_marker_queue_update", 2, false]; }];
} forEach AllCurators;
diag_log "Curators initiated";```so like that?
It's BI's way of showing they don't give a fuck ๐
hahahaha
_this already is an array. No need to put it into another one.
okay updated code above
lgtm, but I have no idea what these globals are for.
oh the object is passed to a global array for SQL database actions
That is not what you're doing here.
no, but that's done by other functions
Then what are these globals for?
remoteExec reports nothing with the not-JIP version.
the server doesn't JIP, does it?
The globals make the script look more complicated than it has to be.
The server can not JIP.
then why is the JIP false wrong?
Well, the result will be the same, but you already have issues with the script so in my opinion, the scripts should be written as simple as possible.
what issues would be arising?
Like you can add commy = false; in between every line and it wouldn't change a thing, but
Why?
How to
recompile functions compiled in CfgFunctions in mission description.ext?
The issue could be that the one that has to look at the scripts later might be unnecessarily confused about what is happening here.
Which is pointless when you don't cache them, but not surprised.
Will hyperlinking in structured text open in steam overlay? Can it be forced to not?
Hi! this can work with say3D instead of playSound? playSound "contact"; call BIS_fnc_MP; I want that a soldier walk and sing but can't be hear in all map, only near.
from say3D "sign"; call BIS_fnc_MP;
with say3D?? "contact" remoteExec ["say3D"];
[from, sound] remoteExec ["say3D"];
Bis_fnc_MP say that its deprecated, but I read this From version 1.50 the function bis_fnc_mp will use the engine based remote execution. This will positively affect its performance, namely processing speed and amount of transferred data. Then, its deprecated or is recomended to performance?
It is deprecated and was changed to use the same method to not be a total performance hog.
There is no reason to use the function.
ok, thanks @little eagle
Does setvariable with the global parameter onyl support missionNamespace or are the other namespaces also supported?
Only mission namespace.
Objects are also supported
^
if they are global
Also GROUP
But, note that groups are very wonky at mission start.
They are local things at the start and then get replaced by the global one later or something like that.
So variables might go AWOL when set that way at the mission start...
TEAM_MEMBER probably works to.. But let's not get into that region
Not mentioned in the wiki. TEAM_MEMBER tho ๐
Thx ๐
mission parameters can be code or a variable as well?
Essentially settings file, in which you change all the parameters default values
Only integer numbers
Any workarounds ? I guess parameters can't be added later on etc....
class p_respawn_type
{
title = "Respawn Type";
values[] = {0,1,2};
texts[] = {"Instant Respawn","Wave Respawn","Timer Respawn"};
default = 0;
};
into
class p_respawn_type
{
title = "Respawn Type";
values[] = {0,1,2};
texts[] = {"Instant Respawn","Wave Respawn","Timer Respawn"};
#define RESPAWNS_SETTINGS_PARAM_TYPE
#include "settings.cpp"
#undef RESPAWNS_SETTINGS_PARAM_TYPE
};
//in settings.cpp
#ifdef RESPAWNS_SETTINGS_PARAM_TYPE
// Respawn type mission parameter default value
default = 0; //Default respawn Type; 0 = insta, 1 = Wave, 2 = Timer
#endif
bad idea ?
yes, but this will allow for all settings to be in one file
My wifi didnt load it in at first, sorry
I don't want to go through 5 different files every time I want to change settings and parameters for the mission
1 file to rule over all settings
Why not #define them all in a central file once and use macros?
That would work?
Can I use that file for other settings past pre-processor later as wel?
You can #include in any file
as in #include settings.cpp
and then use the macro in SQF
Is macro ok with that 'tho?
me using it in a regular function
Uh yea ever looked at cba macros?
That's a mod
Do they all funky in the mission ?
As long as theyre in files and you #include them you good
No call compile "#include hhh" shenanigans
Heck ive seen people #include their mission.sqm in their description.ext
Dont ask me why but ive seen it
Sounds so dumb it might just work.
It works, mission.sqm follows the same config structure after all
I just dunno what youd ever use it for
worked*
unless you save your mission unbinarized
Fair
I think you need quotation marks around the variable name.
private "_entity";
I'm not super great at coding but that was the first thing that jumped out at me. The next thing is line 209,
} count _entities;
should that be
} foreach _entities;?
if its only doing it once i would think its the quotes.
if the var is defined before you private it and if you private it without quotes it does this:
private _entity;
// Error type number expected array, string```
but if it were a string it would do this:
```_entity = "_somethingClever";
private _entity;
// ^ == private "_somethingClever"; (i think)```
your options with private (according to the wiki) are:
```private _var = data;
private "_var";
private ["_var1","_var2",etc];```
@hasty violet Because you are not initializing a variable. You are setting them to nothing. Which is still undefined. You have to initialize to something private _entity = objNull
the private keyword is only a modifier to the assignment operator (=) if you don't have an assignment then the private keyword won't work.
And if it's not a keyword then the game thinks you probably meant to call the private command with a variable as argument
Don't use private "_entity" that's slower and will also initialize to nothing
@delicate totem count does essentially do the same as forEach just without _forEachIndex thus being a little faster
explain what?
Please don't bother BI employees for stuff that the community can help you with. Would you prefer them to work on the Game and fix bugs. Or to help you with your unability to google?
Need help with vehicle respawn module, vehicle wreck dissapears when module is set to preserve wreck
The two @ mean, that you tagged a whole group of people, not someone names "Biminions". Check out the discord's member list over there >>>
Dear Bohemia Interactive Studio, please allow some sort of lightweight rope creation between two static objects for decorative purposes. Thank you Bohemia Interactive Studio, Amen.
TIL:
private _display = allDisplays;
createDialog "RscDisplayEmpty";
_display = (allDisplays - _display) select 0;
^ this works to get the display. Might be interesting to someone only doing missions, not addons.
The RscDisplayEmpty you just created.
That's acutally quite useful
Has anyone writtin an in-game scripted mortar/artillery calculator? I've written a browser calculator that people can use from their phones, but it only has values for the mortar at present.
How do I delete all controls from a control group / retrive list of children to a certain control
@shadow sapphire ace3?
i am seeing references on forums that you can't edit the direction of a turret via scripting, is this correct?
@peak plover https://community.bistudio.com/wiki/allControls
Thanks
@peak plover, need it in script form, no mods. Maybe I'll have to check how theirs works and get inspired that way, though.
Exactly
kinda weird there is no command to get Control children but there is a command to get a Control's parent ๐ค
I guess I would have to loop through all controls and then select the ones that are gucci
yeah
@little eagle Thanks for the reveal function- hint, the chess pieces now get recognized way faster.
Am also looking for a way to allow players to interact with a 2D chessboard instead (and sync the 3D movements); to consider personal preferences.
Works great, thanks marcel ๐
Hello math guys ๐ do you have a better way of calculating the steepness of a hill?
My code (currently not sure if its rigth)
vectorUpToDegree={
_u = surfaceNormal position player;
_v = [_u select 0,_u select 1, 0];
90-acos((abs(_u vectorDotProduct _v))/(([0,0,0] vectorDistance _u)*([0,0,0] vectorDistance _v)));
};
and for testing
0 spawn{
while {true} do
{
hintSilent str call vectorUpToDegree;
};
}
https://community.bistudio.com/wiki/BIS_fnc_findSafePos
you can look inside of &
acos (surfaceNormal _origin vectorDotProduct [0,0,1])
???
Hmm, preview of SVG doesn't work in discord.
But essentially this. b is [0,0,1], a is the surface normal and phi is the angle you want I think.
a not c, derp
That is not a command, nick^^
Really? How?
hmm, wait I need paper.
I have it on my pc but phone atm
http://i.imgur.com/xGhlM2j.png I just went a bit too overkill, but thats why I was asking. ๐ฌ
Youre already helped by the fact theyre directional vectors of length 1 so you can cheat a lot
You don' t need to normalize the vectors. They already are unit vectors.