#arma3_scripting
1 messages ยท Page 206 of 1
how do i make squad invincible this script isnt working {_x allowDamage true;} forEach units group dog_company_grp;
try false to disallow damage?
mb i said it wrong, i wanted to make them be able to take damage again. I figured out it's working like this {_x allowDamage true;} forEach units dog_company_grp;
Nvm so if i run this script via debug it works but if it's ran via script it says undefined variable
Any fixes?
Does anyone know a way in which I can just skip team selection when previewing a mission in MP (From editor).
where is dog_company_grp defined, by which machine is the script run?
dog_company_grp is player group so it's already spawned in editor
and script is ran
{_x allowDamage true;} forEach units dog_comapny_grp;
};```
think its working now i didnt know i had to remove this ; from allowDamage true
you don't need to
idk when i had that it gave me error now when i've remove it, it seems to work
try adding it again, it should not matter ^^ anyway, good thing it's solved ๐
As a backup solution, yes, because my mission will break unless the helicopter lands close to the coordinates I have selected.
Ideally, I would like to try for a better solution, though. Would it be possible to monitor those coordinates for objects that could impede landing and then shift the landing a couple of meters away? Then rinse and repeat this as it is landing to make sure there are no new obstructions.
Or how about this idea, a check to see if the landing spot is blocked, then a warning to tell players to move? Then check again and reinitiate the landing. Though I like this less because it might be unrealistic, since IRL the pilot would just land a few meters away.
Probably setVelocityTransformation and an eachFrame mission event handler
If they're physics objects you can use standard setVelocity and addForce for true physics crushing, but you may have to apply them more than once over time if you want to keep a constant speed
About it being multiplayer, you want to make sure that the objects are being managed by one machine only - if every client is trying to do it at the same time, it could cause problems. Usually the server is the machine of choice for this sort of thing. remoteExec, isServer, and the "server only" checkbox in the trigger's settings are potentially useful tools for this.
He wants to allowDamage false eventually. Don't allowDamage require local argument? Wouldn't the proper way be to "remote" exec for each member where they are local at the time you want it to happen? (For this particular scenario, I guess a "safe" way would just be to remoteExec globally).
Locality can change dynamically, like say AI leader is killed and player takes over, isn't locality of AI transferred to player machine?
Feel like I'm going crazy. I have a script that creates a group based on the detected side of a given class:
private _reinfGroup = createGroup _factionSide;
Literally anywhere later in this function when I call _reinfgroup, like for this line:
_enemySpawned = _reinfGroup createUnit [(selectRandom enemyInfantry),_reinfSpawn,[],0,"CAN_COLLIDE"];
I get an error undefined variable in expression: _reinfgroup
_reinfGroup is created at the start of this function so its not a scope issue, why the fuck
When debugging, if I do this, _reinfgrp is correctly defined:
private _factionSide = [east, west, independent, civilian] select _sideIndex;
private _reinfGroup = createGroup _factionSide;
Nevermind for now, seems like my function is not correctly receiving the faction class I've been trying to pass it
fuck
@still forum Just some feedback on the new "Promises" on dev branch:
Would be really useful if continueWith could accept an "args" parameter, that would be passed to the code as _thisArgs. For example:
[_handle, [1, 2, 3]] continueWith {
diag_log _this;
diag_log _thisArgs;
}
@blissful current hay friend me i have something for you:
a virus
๐ณ๏ธโ๐
In setVariable when should i set the public field to true? If i set it to false, does that mean during getVariable, the client will still receive the updated version?
afaik, you should put it true when you want the clients to receive the information as well
if not, it remains local only to the machine that executed
Ah okay. I should mention, in my case it is part of the missionNamespace, so i assume a getVariable request would be directed to the server, who has the updated version stored?
it doesn't matter what space you use, it's local to the machine that executed it
if you want send the information to the clients as well, you should put it true in the public parameter
Hi there. I got some help coming up with "talking" NPCs. We are really happy with the results, and understand there are limitations to Arma's code. Here we simply have a "hidden" disabled custom channel, and a painfully simple sqf. Is there by any tiny chance, a way to disable the part that shows my screenname sending the message to myself? If possible, I want only the white part of the text in the chat stream in the photo to be visible.
We could use systemchat channel, but we don't want the drab grey text. If there is a way to change the color on that, I believe that would work as well, but my gut tells me that is hardwired.
Haha, last message before a response. If it would be possible to change the displayed name in the red text that would work as well. Not picky about the method, just the result.
what commands are you using it?
This with a simple addAction and execVM in the NPC. We have local and server triggered notifications, so our hint stream is busy enough. We also have color coded text channels, and the stream there can be busy. I will make the sleep much higher, so things are not as chaotic. We just want this channel to stand out as much as possible, to make it easier to read and focus. Some of these NPCs give important tutorial info. Any ideas or workarounds welcome.
[unit1, "Hello!"] remoteExec ["globalChat", thePlayersMachineNetworkID]``` works perhaps? You need to query the unit and player id in advance though.
From my understanding, since the remote execution is limited to the player client, it should not appear in anyone else's global chat.
Yes, it only plays player side, which is exactly what we need. The issue is my screenname "RatherBoringGamer" displayed before the NPC's name "Endyou321." We want to eliminate the player's screenname display to itself, if possible. Or have the player screenname changes somehow to the NPC's. To make it seem a bit more natural that the character is talking to the player.
The player's name is taken, because you let the player send the message to custom chat. You need to have "endyou321" send the message though.
I thought this would be the issue. Can a unit with disabled sim be made to send a message to the chat stream?
hmm, i assume in this case "_unit" in the code above refers to endyou321 in this example?
so you can try _unit customChat ...?
I think that may work! Thanks, I would have never thought of that. I will test it with this simple one first.
And if that doesnt work, look at my remoteExec example above. "unit1" is the one sending the message and "thisPlayersMachineNetworkID" the id of the receving player
I recommend reading https://community.bistudio.com/wiki/remoteExec
Wow, thanks! A ton of great info. I need to learn more about queries for some other ideas we had. I will try the first recommendation, and if needed will move to this.
tested it on unit with disabled simulation and had no issue, you'll just need to make sure that AI unit is added to the radio channel and that you change their identity's name to Endyou321, which arma will substitute in for %UNIT_NAME in your channel callsign: ```sqf
// Unit's init field:
your_custom_channel radioChannelAdd [this];
// Action:
_unit customChat [6, "Hello world!"];```
in this case, remoteExec shouldn't be necessary since the action already runs local to the client that activated it
Hey, i want to check the existence of a mod, but i'm a little lost at finding the correct name.
So here's an example from ACE
if (isClass(configFile >> "CfgPatches" >> "ACE_Medical")) then {...```
Now i tried with DUI squad radar
```sqf
if (isClass(configFile >> "CfgPatches" >> "DUI - Squad Radar - Radar")) then {...```
but nothing happens, so i probably search for the wrong thing. What exactly is the name that goes there? Where can i find this exact naming for a given addon? I just went with the Addon name appearing in the CBA Addon menu, but that seems to be wrong.
afaik mod authors can name their patches anything they want, so reading config.cpp is the most reliable way to know exactly what it is
Thanks! I will get to this soon.
So is it whatever the preprocessor macro puts to "name"?
uhh not that one, the class itself
whatever CBA generates for ADDON would be the class name you check for
OH, so the "ADDON" macro
alright ty!
Related to debugging this, do you know if there is a way to speed up reloading missions in a server? I always recompile mission -> restart server -> restart client, but it takes so long. Especially for small naming issues like this lol
sidenote, did confirm the class is named diwako_dui_main exactly as the pbo itself is named, thanks cba conventions :)
oh god, for a windows server it would lock the mission file so i used to have two .pbo copies and then switched between them with #mission command to reload it without a restart, and after a few runs my client would also start disconnecting after downloading the mission file (maybe it didn't want to overwrite MPMissionsCache?), so i set up symlinks to my MPMissions directory to avoid client restart as well
Oh, i have to remember this! Sadly co10 autogenerates 1000+ missions using an executable, so i probably have to manually find and rename the mission. Still faster xD
So, in my case this?
I was stuck in preprocessor hell, tried to find the definition of ADDON, but it was 10 includes and addon itself was defined of other components with a custom preprocessor function
i believe for CBA with hemtt, it's simply the prefix in project.toml* + the name of the addon directory with an underscore: ```toml
project.toml
prefix = "diwako_dui"``` so for addons/main/, the final ADDON would be diwako_dui + _ + main = diwako_dui_main
-# *did some more research and now as far as i understand it, CBA's ADDON macro actually only depends on script_mod.hpp => PREFIX and script_component.hpp => COMPONENT, meaning hemtt's config doesn't affect it at all >.>
Ah okay, also i assume it doesn't care about capital letters? Since "ACE_Medical" should probably be "ace_medical". I use ACE - No Medical, so i can't say for sure, but there everything else is lowercase.
yeah either should work, their canonical patch names are lowercase but config lookups are case insensitive anyway
Aye, thanks a lot!
Omg, it works! Finally I can have unconscious color tracking inside DUI
I there a list of these somewhere? "Man", "Tank", "Car". I need to add static weapon emplacements and whatever else but idk what they are called in game.
private _objectsNearby = ExtractHelipad nearEntities [["Man", "Tank", "Car"], _clearRadius];
ok, this gets interesting ... location placed on the map is actually object not location ... is this normal ?
They are base classes .
Look up the class of the static vehicle in cfgVehicles.
try "StaticWeapon"
It should have parent class Static or turret
I have an idea, making it real is a problem - how can I register a sequence of pressed buttons to execute code? Something like the built-in cheats work
I am trying to implement something a member helped with above. I am new to this, so I needed some clarification.
In this photo example, would "_unit" = the variable entered in the unit in the editor? and would "your_custom_channel" be the _channelID?
maybe using this https://community.bistudio.com/wiki/User_Interface_Event_Handlers#onKeyDown and try to get pressed keys under some array that checks for some pre-maded pattern... or just make a CT_EDIT and a button and should do it, like those cheat box from simcity games
No. Edit in SP. Or use the funky script KK made?
yes
you can just look up the commands on wiki to see what is supposed to be placed in those spots
https://community.bistudio.com/wiki/radioChannelAdd
https://community.bistudio.com/wiki/customChat
I would like not to use GUIs
Thank you! I wasn't even close, but see where my errors were. I am terrible finding the correct terms on the wiki, so many thanks ๐ป
but you can add that UEH to display 46 and try to work with it, no? can't remember
lol
@blissful current @winter rose No it's not a virus: it's a Demo mission of my chopper command
@winter rose i think you know enough by now: that i'm a good guy
lol
your funny Lou: love you my brother
yeah see i made this Awsome chopper cammand: that Dart helped me with: he's Awsome btw: and its works Awsome: i was thinking i would share it:
he already got it working
I am nearly finished with our talking NPC "mini framework" thanks to help here the last several days. The only problem left to resolve is the displayed unit name. It is displaying "Liosi" when I have changed the identity to the desired "Endyou321." Is there a script to force a name change, or have I overlooked something? Thanks for the help, so close to the finish line.
what is your custom chat channel?
the channelID is 6, if that is what you mean?
no, how are you defining it, specifically want to see the callSign parameter
Oh, ok. Just a couple minutes, when I get back to my office I will send what I have for that channel in the initServer.
I used the template from the Bohemia wiki. I believe the only two things I changed were the channel display name and color.
does it function (the right name) when previewing in SP and failing in MP?
I have only tested on MP so far.
test on SP real quick
if it does work in SP, but not MP, create a custom identity in Description.ext and use setIdentity. Or you can see if setName (idk if the note about it working in SP only is outdated or not) works. Both of these are local commands so you either need to run them via remoteExec, or in a global script spot such as the objects init.
during the mission, what does name return when run on the unit in debug menu
It works in SP but not MP, the person who helped earlier just did super quick a quick test to get me going. I will look at both setIdentity and setName right now.
A simple setName in the init and it is working perfectly!
I have serious memory issues, but I think there were about 6 of you who each pitched a piece to this puzzle! We will put it to good use, with triggers and other simple scripts, we plan to make a complex web of unique NPCs, like the old Pokemon or Zelda characters that always kept a player reading their rambling monologues, lol.
Grab some digital beers as a thanks: ๐ป ๐ป ๐ป
we need to work on your script though. just from that screenshot, it looks messy
I am always open to improvements. Are you referencing the channel script, the unit SQF, the unit init, or a combo?
see how many repeat lines you have in the channel script? try to reduce those. see what you come up with
Thanks for the second look, and pointing me in the right direction! I will start working on that tomorrow.
Hey people ๐
Im into scripting an chair interaction. My current problems belongs to following:
- If sitting, players cant move their heads
- If sitting, players can only stand up with a scuffed solution you can find it at the end of the post
My final result will need to be capable to return an value during the player is sitting
so I could switch via "condition" of UserAction between "TakeSeat" - "StandUp"
Those are my current sources: https://community.bistudio.com/wiki/Category:Command_Group:_Animations
Maybe you know some more I could read about
Scuffed "solution" I would like to improve
if ((((animationState player) == "hubsittingchairuc_idle1")
|| ((animationState player) == "hubsittingchairuc_idle2")
|| ((animationState player) == "hubsittingchairuc_idle3"))
) then {
hint "Sits!";
} else {
hint "Stands!";
};
Update:
Ive implemented my askworthy solution in the script like Ive shown to you on
the screenshot. Does anyone sees or knows a better solution where people could maybe move there heads etc?
just use ace :v
-# And VScode 
oh hell yeah: i made this script: that has like 5 diff functions in it: that runs like a (M99 M-Code in Machining) its cool ๐
its like the function's leap frog to the one that's needed when its called or spawned
no looping and no waiting ๐
i guess being a Machinist for 25 years had some good things to it: it helps me with Arma 3 Woohoo ๐
woowa this is cool ๐
#include <iostream>
// Represents a CNC operation that can be called repeatedly.
void performCuttingOperation() {
std::cout << "Performing a cutting operation..." << std::endl;
// In a real CNC controller, this would send commands
// to the hardware to move the tool.
};
int main() {
std::cout << "Starting main program..." << std::endl;
// The equivalent of M90 G00 X10 Y10
std::cout << "Rapid move to start point X10 Y10" << std::endl;
// The equivalent of M98 P1000
performCuttingOperation(); // Call the function (subprogram)
std::cout << "Continuing main program after subprogram returns." << std::endl;
// The equivalent of M30
std::cout << "Ending main program." << std::endl;
return 0;
};
Just interesting facts that all friends
Plot twist: I dont want to
why that doesn't surprise me
you shouldn't use the ambient animation function for this.
first, see if you animation even supports head movement. just run it on yourself through debug. if it does, then have the unit change to that animation, then set direction, then set position.
If it's for sitting, you'll also want to attachTo the unit to the chair, otherwise it'll be pushed out of it by collision
Should I learn about to create own animations or what would you recommend me?
Thats why Ive used the BIS_fnc. I gues its arriving with an attachTo.
But Ive also used my own later for better offset.
Hey, anyone here using VSCode can tell me which linter is more updated or preferred? There's SQFLint and SQF-VM Language Server. Also some people recommend HEMTT Language Server & Utils but i haven't quite figured yet how to integrate it and if it contains linting.
https://marketplace.visualstudio.com/items?itemName=blackfisch.sqf-language + https://marketplace.visualstudio.com/items?itemName=BrettMayson.hemtt is what I use
Extension for Visual Studio Code - Full SQF Language support for VS Code. Forked and updated from https://github.com/Armitxes/VSCode_SQF
Real OGs remember Squint
https://community.bistudio.com/wiki/Category:Community_Tools#Code_Editing ๐ Squint is listed
how do you make the hemtt extension work? It says "Activated by onLanguage:arma-config event", but idk how to trigger this. I need it on sqf files
ah nvm, that means it's already activated
it doesnt do any linting though...
It definitely does
really strange xD
do you perhaps need a whole hemtt project? Is the VSCode Plugin alone sufficient?
Not sure, I've only used hemtt in recent times because I never looked back after learning about it
I wouldn't imagine it'd require a project to use hemtt for the basic lintings
Are you using hemtt's sqf language? It has one included
wait, i can disable SQF Language (only other i still have loaded)
still no linting. Also the plugin has no settings for me
Same for you?
Because it doesn't have any
same for me
I also checked the logs of HEMTT & HEMTT Language Server, everything seems fine and initlialized
only thing that could remotely look like a problem is this line
2025-09-26T19:22:15.089609Z DEBUG tower_lsp::service::pending: client asked to cancel request 1, but no such pending request exists, ignoring
Could ask in the hemtt channel in the ace discord
Good idea, ty!
I ditched hemtt extension because the keybind for open last rpt did nothing. But perhaps I need to revisit it. Let us know if you get it working. Been using this one for rpt lately. https://marketplace.visualstudio.com/items?itemName=bux578.vscode-openlastrpt
It definitely does work
It opens it as a proper log file for vs code, so you can have it open and update live
It doesn't open anything for me. Is there more to getting it to work other than installing the extension?
Both of your code color choice is different than mine as well. Is there a reason for choosing those other than personal preference?
Just reinstalled hemtt. ctrl+alt+r does nothing for me.
idk really, my colors were from "SQF Language" addon, but disabled it looks different yet again
It's dependent on your theme
The shortcut doesn't work for me either. But pressing Ctrl + Shift + P and typing e.g. "RPT" works
Speaking of which, anyone who actually uses my CfgFunctions (and CfgRemoteExec) generator extension in VS Code? I'd love to have some feedback about it. It was really buggy in the beginning as it was my first time both writing TypeScript and utilizing VS Code API, but after numerous bug fixes and feature additions I think it's somewhat decent now. (Or is it?)
Hello gamers, i've made a mission where the players start in a truck and get transported to the HQ, but upon spawning they dont seem to stay seated but rather get drumped on the ground taking a lot of damage. any ideas?
Ran into an odd issue with vanilla SDB bombs. When spawned from directly above a Strider GMG and targeted with scripts, it would hit the top of the vehicle, destroy the main gun, and do minor damage to the car's main health pool. Thought I was going crazy. The other missiles/bombs don't do that. It seems like a unique issue with the SDB, but only with certain flight paths. And it's not just the Strider, it's the same issue with Varsuks etc. There doesn't appear to be any submunitions. Does anyone know if maybe I'm missing something, or is the munition really just configured this way?
Video shows me spawning 4 of them directly onto a strider. Script is:
player allowDamage false;
_fnc = {
params ["_height"];
private _sdb = createVehicle ["ammo_Bomb_SDB", [0, 0, 1000], [], 0, "CAN_COLLIDE"];
private _bombsite = getPosATL cursorObject;
_bombsite set [2, _height];
_sdb setPosATL _bombsite;
_sdb setVectorDirAndUp [[0, 0, -1], [0, -1, 0]];
_sdb enableSimulation false;
sleep 5;
_sdb enableSimulation true;
};
50 spawn _fnc;
40 spawn _fnc;
30 spawn _fnc;
20 spawn _fnc;
(Also does not appear to be related to speed. I can setVelocityModelSpace to [0, 100, 0] which is about the max the munition can go and it does the same thing.)
I have been trying to make players spawn In the air using the respawn module with no luck. Does anyone happen to have a script a solution to this problem?
use the expression field of the module
I have attempted to do this. I had no luck.
show us what you did
The line of code has been placed In the expression area. My Issue now Is that It does not update as the marker moves.
what code
what marker
Sorry I had posted In a different chat
// Define the respawn position (adjust marker name as needed)
private _spawnMarker = "respawn_west";
private _spawnPos = getMarkerPos _spawnMarker;
// Create a new position at a high altitude
private _spawnAltitude = 200;
private _parachutePos = [_spawnPos select 0, _spawnPos select 1, _spawnAltitude];
// Teleport the player unit to the parachute position
player setPos _parachutePos;
// Give the player a parachute
player addBackpack "B_Parachute";
To be honest If there Is someone I can pay to get this down It would save me a whole hella time.
smells like chatgpt, where are you calling this?
Took this from online.
You are right. It Ia AI
don't use AI for arma scripting ๐
that's why we have a whole wiki for that
you have to provide us all the information on how are you doing this so that we can help you
That line of code Is AI generated It seems. There Is no other Info to provide other then what type of script I need and the person I can pay to make It.
Not sure what else to say here.
The only thing I had was the AI script. I just need the respawn module synced to players as a spawn point to have players spawn In the air 300 meter high with a parachute.
The marker has to update every 10 seconds or so.
If this Is something someone here can code I am willing to compensate them.
if no one helps you with that, I can help you when I get home
Sounds good. Please be sure to contact us P.M
Question - while I've been writing scripts for years - I only started with mods. It seems everything in a mod is geared towards functions - even a onetime init script - is this correct - or should one-shot functions really be scripts so they don't stay running forever? Or am I missing something?
If a bit of code only ever runs once, then there's not really a point to use a function, you can just use call compileScript [..]; with the path to the file. CBA and ACE-esque mods do this for stuff like settings and keybinds
If something is run more than once, you should compile it to a function to save Arma having to read and process the file multiple times
thanks - that was kind of what I thought - appreciate the confirmation - I have some stuff to change... ๐
If you already have functions then there's no point going to the trouble of changing them back
Being functions also makes them easier to reference, and it also makes them visible in the Functions Viewer so you can see how they work
It's also the only way to do mission-init scripts in a mod, because mission event scripts like init.sqf aren't available for mods. CfgFunctions init / preinit / postinit attributes are the only way to do that for a mod.
CBA's pre/postInit event handlers as well, with the benefit of running unscheduled
I wonder how those event handlers manage to run on pre/postinit
or should one-shot functions really be scripts so they don't stay running forever?
I just want to address this directly: being a function does not mean that a script will keep running forever. Any function will exit when it reaches its end and will not continue to run unless executed again. The only thing that keeps running forever is awhile {true}loop. There's no downside to having your scripts be functions, unless you register like a million of them and clog up the compilation process during mission loading.
Anyone knows which script I need for make In-game cutscenes for public Zeus? Instead of just using circle around module of EZM which is boring.
Appreciate all the insight !
I have this condition, which fires if all alive players are in a helicopter:
((allPlayers select {alive _x}) - crew ExtractHeli) isEqualTo []
Is there a way to filter out downed players though? I want it to fire even if there is downed player outside the heli (apparently they count as alive)
Depends how your revive script works, but usually they use setUnconscious so you can use lifeState _unit == "UNCONSCIOUS" at least.
I think this is vanilla. It is in my SOG mission but I do not have their custom revive module installed.
This one? Probably uses setUnconscious:
https://community.bistudio.com/wiki/Arma_3:_Revive
I've never scripted with it.
Those screenshots look like my editor so Ima say yes this is what I'm using.
I'll start testing with this one first. Does this look OK?
((allPlayers select { alive _x && lifeState _x == ["HEALTHY"] }) - crew ExtractHeli) isEqualTo []
remove the [ ] in the "healthy" part
lifeState returns a string
Copy that. I will test now.
HEALTHY might not work because INJURED exists.
you want lifeState _x != "INCAPACITATED" in combination with the alive check.
either that or lifeState _x in ["HEALTHY", "INJURED"] without the alive check.
I was just thinking that. I would accidentally block injured players.
I'll try this one:
((allPlayers select { alive _x && lifeState _x != "INCAPACITATED" }) - crew ExtractHeli) isEqualTo []
This is working great. Thanks ya'll!
hello all: if i get into a vehicle as driver e'm i now a (vehicle player) or how does that work
vehicle is just a scripting command to figure out what vehicle a unit is in. You can then detect the vehicle by doing vehicle player or check if the player is in a vehicle at all by doing (vehicle player == player). The player object itself doesnt change at all
i don't think i've ever created a mission in the MP Editor
I had to do some reading before I got things going here, so I deleted my post and came back. I think I am ready to jump into something:
I want to make a virtual market place for players to post items for buy or barter. I have virtual shops, and know how to make UI/dialogs for such. Is this below where I would need to start? Or should I head into the "Namespace" variables? I know this task will be complex, so start broad please!
I do not know how to store the items in the database, while the player has them listed, and then have them sent to the correct player after transaction. I don't know much DB side stuff.
https://community.bistudio.com/wiki/Arma_3:_Scripted_Database
Do you want the market place contents to be persistent between mission/server restarts? If you need them only during a single session, a database is not mandatory
Our server is pretty much always open, and all data and stats are persistent. So it would have to be good after outages, and even simple restarts.
You can make a scripted database then, it just needs to be saved either via extension to an actual database or the server's profileNamespace mentioned in the article. HashMaps can be useful too here.
IIRC serialization of a scripted DB entries to JSON drops the size of the DB a lot and equally improves performance in general. In other words, when you're saving stuff to database, serialize it as JSON (toJSON command) and when you load stuff from DB, do the opposite operation (fromJSON)
Ok, I am sorta getting there. the JSON is good to know, our DB has housing, vehicles, etc, and our economy has hundreds of items, so keeping things compact and moving well is a must. I assume that the script would just put a hold on the player's ability to use the item until a business decision is made, to sell or withdraw? Or will this need to be a new category in my DB?
I'm not sure if I understood it correctly, but yeah, you probably don't want an item or entity added to the marketplace to be accessible/usable while it's there (i.e. not sold or withdrawn)
But that's different level of abstraction and not directly coupled with the technical aspect of DB design
Sorry, early and need more coffee. The item must be frozen from use regardless. I think what I actually would like is to have it go to a new category, to make it easier to see and keep track of on the admin side. We have "housing," "vehicles," and "players" (which includes all items and stats). I am thinking it would be better to have the items placed in a new "marketplace" one. It would keep things orderly, easier to observe from the back end, and probably simplify the script. If that is not a good way to go, I am open to any suggestions.
No worries, I have the same issue ๐
So you want like a general marketplace with all the things? The good thing is that you have pretty much complete freedom to decide how you organize the marketplace (and the database) on a business logic / game design level, as long as you take care of the DB performance and not hitting technical limitations in general
That is great to hear! I will come up with an outline, and start piecing things together. Thanks for the help, I am sure I will be back more than once on this one, but it is more doable than I though it would be ๐
Btw, what kind of database are you running currently, if you have the three categories there already?
We are managing everything through phpMyAdmin. We started with the Altis Life 5.0 framework by Tonic. We have been at it for over a year, and have edited so much of it, that I don't know what is left of huge parts of the original.
I don't know how Altis Life is programmed when it comes to DB stuff and don't know PHP well either, so can't help there unfortunately ๐
Was just thinking that if your team has the needed skills, you could also keep using the current database and just reorganize it (as an option)
No worrries! It is a niche area, took a lot of research to figure out that team's mind, lol.
I have edited our current one quite a bit so that shouldn't be a problem.
You might even be able to keep the database structure as is and just rewrite the SQF part to handle the new marketplace
Yeah, that should work!
Outside of this DB line of Q's, if we wanted to make this market place have a barter system, would the following work?
Player A lists x Diamonds, Player B lists x Gold.
Player B uses the dialog to place an automated message to the other player, which they will see when they next access the market. (Stringtable with all the % variables to get the info right).
Player A reads the message, and presses accept deal.
I assume that is the gist of how that would be scripted out?
You can do it like that yeah, or just use money for everything instead. I think barter system would be kinda nice (personal opinion), but using money instead would be much more flexible for players especially if the player count or activity level in the marketplace is low. I would probably choose money as the trade mechanism thanks to the massively better flexibility. (Also just as a thought, having a small mobile app for the barter system (if implemented) would be cool lol)
Haha, great minds! I actually plan to ask this week about more dialog related scripting to do new menus. As for the barter, we plan to have both options. Buy/Sell/Trade was our goal, and I think I can piece it together, now. I am sure I will get my butt handed to me a few times, but this will be a great addition. Our gameplay is economic and business grand strategy, so this would really up things.
Yeah, that sounds good! In that case, you could incentivize using the barter mechanism by adding a considerable "service fee" and/or a tax to the deals made with money. So players would always prefer the barter system and the money based transactions would serve as a fallback if the barter mechanism didn't have suitable combinations available
Anyways, I think we need to continue this discussion e.g. in #game_design if needed ๐
I just made a cup of coffee. If you want to workshop, I am always open to ideas, lol.
Hey whats usage of โ in game?scripts
A what
I just remember use it before some variable on init.sqf
use what
what
โ
- We don't know that term
- We don't know what you're trying to say
- We don't know what you've ever used
a delta?
show us an example
A delta maybe is related to SQF. ฮ never is
You can technically use emojis in sqf so I guess you could use that delta symbol too
๐
I'm messing around with the weapon wheel mod, by default it makes the unit equip the chosen weapon via selectWeapon but it only works with equipped weapons. How do I let player equip a weapon from a backpack without having to delete it and then use addWeapon?
private _data = createHashmap;
_data set ["๐ธ","I love frogs!"];
_data get "๐ธ"
// returns "I love frogs!"
The applications for this are immense, as you can see.
You could try action / actionNow with "TakeWeapon", but you're always going to run into some limitations because weapons in inventory aren't unique objects.
loved ๐
They are https://community.bistudio.com/wiki/uniformContainer
@jade acorn
I didn't say uniforms, I said weapons
Ah sorry
Does anyone know if it's possible to create a 3D progress bar through the Draw3D eventhandler?
Well, just tried. At least TakeWeapon can access a weapon that is stored in a backpack
This could be your best bet
will play with that thanks
That is genuinely so not sane and funny at the same time
Never really thought of doing that, or if it was possible 
It's just UTF :P
What would be the easiest way to have a vehicle-smoke-screen effect on a vehicle or position that doesnt have one natively? Like, an instant concealment over an area for a landing ship, say. ETA: Found an option from an old thread, but it's rather chunky.
Drop grenades in an arc?
is it a bug that when adding a displayAddEventHandler in a mission, it does not remove itself after this mission's restart? Right now I have to go back to editor and play it again to have it gone, otherwise it just stacks
Unless the display is deleted when the mission restarts, I would imagine that the event handlers attached to it hang around.
I guess it does not by itself which is a bit inconvenient
I don't know of any documentation on which displays are permanent vs temporary.
I have the EH attached to 46
Draw3D is used for the map only.
Is there anyway to persistently save data to a mission? I have an eden module that creates objects and I want to save the class / position / etc. so it will be the same when the mission is launched and when run from a dedicated server.
missionNamespace is reset between mission loads and missionProfileNamespace is saved to the player's namespace (so it would be different on a server)
Use missionProfileNamespace (or profilenamespace) and read/write the data on the server.
So far, only 2D progress bars can be made. But I think it's possible (not sure if anyone has tried) to create a progress bar model and then animate it.
which could take a long time to do.
I have something going on with this in one of my missions, idk if it helps
Long time? 10min
it sounds like your data should be represented as eden entities or module attributes (create3DENEntity / set3DENAttribute) since they're saved to the mission.sqm directly, but i've never touched eden-related scripting before, so i'm not sure of an appropriate entry point to run those commands from...
wouldn't work with dynamic data though... in that case, write an extension and HTTP POST your module namespace to a webserver to be fetched by clients with same mission hash? 
oh yeah, if you're actually trying to edit the mission then the 3DEN commands I guess. I'm not entirely sure what the question meant.
I guess I could make then 3den objects, but I want them as simple objects for the actual mission for performance reasons
Still has the issue of I need to somehow save which objects are created by the module
can the objects only be created at mission runtime, or would it make sense to pre-generate them in the editor?
set3DENLayer?
You can set 3den entities to be simple objects, so I'd guess you can do that with set3DENAttribute too.
Well not with the 2D models (they are relatively easy to create), but creating a model that acts like a progress bar with animations (similar to what you would see with compasses and watches) may take a while to do. ๐
I'm not sure what your question is about, they're already being created in Eden. I'm then saving the class / position / etc. to then make them as simple once mission actually starts
Option isn't there for everything, and I'm making them as model simple objects since they don't need the extra stuff like being able to change textures / materials
I thought the only objects that didn't have the setting were the ones that it didn't matter for.
Not sure, but I assume the checkbox uses the class simple objects instead of model path
Would need to look in-game to verify that though
ah okay, i was imagining your module existed by itself and at mission start it would create the objects
I personally love premature optimization, but I'd certainly check whether there's a benefit here before making life that hard for yourself :P
configFile >> "Cfg3DEN" >> "Object" >> "AttributeCategories" >> "StateSpecial" >> "Attributes" >> "SimpleObject" didn't have anything special in it, not sure where else the logic for it would be
I'm not prematurely optimizing, I have the default object count at like 300 (module is creating lots of objects in a rather large area), and get a decent stutter when using entities instead of just simple objects
It's also just a whole lot of clutter, though I could move them to their own layer and possibly disable transformation directly
Even that
yeah but class simple rather than model simple? Not sure if that ever makes much difference.
Not that long to create. A simple Anim (moving to 2 Points from Left to Right) isn't "Time consuming".
if this data was persisted as an eden attribute on the module, model/pos/orientation/..., could that work instead?
Yeah, though that'd be a lot of data. Not sure if there's any kind of potential issue there.
Probably will just settle for eden entities with simulation disabled / simple object enabled, though both will bloat mission size by a fair amount
Then how would I be able to control the speed of the progress depending on what is being loaded?
in model.cfg min=0 max=1 || bar animate["bar",0-1];
thats it
(btw. idk if you can animate the 3D Obj, but should be possible)
If it has a data property then it's handled inside the engine.
And if you want to store a lot of data you could save it as a string not as array. See the inventory attribute for crates in eden
Tried to follow the wiki's examples for adding a module to Zeus, but didnt have much luck. Would there be a good guide somewhere that I can't find on Google without its AI getting in the way?
Spoiler: It's painful
So im experiencing t_t
You can create particle effects in sqf. For example this script, you just need to create a smoke grenade for each direction and then pass it in here, then delete the smoke grenade.
params ["_asset"];
private _smokeGrenades = [];
private _radius = 2;
for "_i" from -90 to 90 step 20 do {
private _x = _radius * sin (_i + random 5 - 2.5);
private _y = _radius * cos (_i + random 5 - 2.5);
private _smokeGrenade = createVehicle ["SmokeShell", _asset modelToWorld [_x, _y, 1], [], 0, "FLY"];
_smokeGrenade setDir (getDir _asset + (_i + random 5 - 2.5));
_smokeGrenade setVelocityModelSpace [0, 15 + random 5, 5 + random 1];
_smokeGrenades pushBack _smokeGrenade;
};
sleep 2;
{
[_x] call WL2_fnc_smokeScript;
} forEach _smokeGrenades;
sleep 10;
{
deleteVehicle _x;
} forEach _smokeGrenades;
And this is the smoke script:
params ["_smokeEntity"];
private _smokePos = _smokeEntity modelToWorld [0, 0, 0];
_smokePos set [2, 1];
private _smoke = createVehicle ["#particlesource", _smokePos, [], 0, "NONE"];
_smoke setParticleParams [["\A3\data_f\ParticleEffects\Universal\Universal", 16, 7, 48, 1], "", "Billboard", 1, 10, [0, 0, 0], [0, 0, 0.5], 0, 1.277, 1, 0.025, [1, 16, 24, 30], [[1, 1, 1, 0.7],[1, 1, 1, 0.5], [1, 1, 1, 0.25], [1, 1, 1, 0]], [0.2], 1, 0.04, "", "", _smoke];
_smoke setParticleRandom [2, [1, 1, 1], [1.5, 1.5, 1], 20, 0.05 + random 0.05, [0, 0, 0, 0.1], 0, 0, 360];
_smoke setDropInterval 0.2;
private _smoke2 = createVehicle ["#particlesource", _smokePos, [], 0, "NONE"];
_smoke2 setParticleParams [["\A3\data_f\ParticleEffects\Universal\Universal", 16, 12, 7, 0], "", "Billboard", 1, 5, [0, 0, 0], [0, 0, 0.5], 0, 1.277, 1, 0.025, [1, 16, 24, 30], [[1, 1, 1, 1],[1, 1, 1, 1], [1, 1, 1, 0.5], [1, 1, 1, 0]], [0.2], 1, 0.04, "", "", _smoke2];
_smoke2 setParticleRandom [2, [1, 1, 1], [1.5, 1.5, 1], 20, 0.05 + random 0.05, [0, 0, 0, 0.1], 0, 0, 360];
_smoke2 setDropInterval 0.15;
sleep 45;
_smoke setDropInterval 0;
_smoke2 setDropInterval 0;
(Should definitely just disable the ai features, they're always useless)
If you need to do anything with ui it's a bit of a pain because you need to set it up yourself. If you just want something like you can place the module onto an object and run some code on the object then you can do that pretty easily without UI
Does anyone have pointers on how to disable NVG for scopes?
Not an easy way via scripting afaik
damn, oh well. I know how to do it for NVG and stuff but ye
VisionModeChanged may trigger for scopes with built in nvgs, only thing I can think of
I found this script but for thermals
addMissionEventHandler ["Draw3D",
{
if (currentVisionMode player isEqualTo 2) then
{
if (isNil "A3W_thermalOffline") then
{
"A3W_thermalOffline" cutText ["THERMAL IMAGING OFFLINE", "BLACK", 0.001, false];
A3W_thermalOffline = true;
};
}
else
{
if (!isNil "A3W_thermalOffline") then
{
"A3W_thermalOffline" cutText ["", "PLAIN", 0.001, false];
A3W_thermalOffline = nil;
};
};
}];
It works, but well. I wonder if there's something for Night Vision specifically
You'd change the the 2 to a 1
That also doesn't change the player's vision mode at all Oh I see, it's just blocking out the screen with it
!code
```sqf
// your code here
hint "good!";
```
โ
// your code here
hint "good!";
It works for thermal at least which makes it a bit easier... still trying to experiment atm on how to disable NVGs
currentVisionMode player in [1, 2]
Though I wonder if https://community.bistudio.com/wiki/disableNVGEquipment works for optics as well
It does not
It does work for vics at least! ๐
Yeah, I should've specified I meant handheld weapon optics
Thanks tho for helping! I'm still looking for other solutions
That would be ideal; I have a function put together that makes a ship drive forward until it hits land, throw up a smoke screen, dismount troops and/or vehicles and make them charge forward, before backing out and retreating. If I could get it into a module token to drop on a boat, thats all Id really need.
Yeah, thats pretty similar to the solution I pulled up. Guess if its the best option I got, Ill stick with it - but thanks ๐
Then you could do that fairly easily. This is how all of my basic modules are set up, but you may want changes to it
class CfgVehicles {
class Module_F;
class YourPrefix_moduleBase: Module_F {
scope = 0;
scopeCurator = 2;
author = "Your Name";
category = "YourPrefix_modules"; // class in CfgFactionClasses
isGlobal = 1; // 0 for server only, 1 for global execution, 2 for JIP global execution
curatorCost = 1;
};
// Make sure to add YourPrefix_module<Name> to your CfgPatches >> units array
class YourPrefix_module<Name>: YourPrefix_moduleBase {
scope = 1;
author = "Your Name";
displayName = "Module Name";
function = "YourPrefix_fnc_module<Name>"; // Should be a function name, not code directly
curatorCanAttach = 1; // When placed on an object, the module will be attached to the object
};
};
// fnc_module<Name>.sqf
params ["_logic"];
if (!local _logic) exitWith {};
private _object = attachedTo _logic;
deleteVehicle _logic;
// Assume the script should exit by default, and then switch over invalid cases
// Each case condition should be what must be true for the module to work
private _exit = true;
switch (false) do {
case (!isNull _object): {
[objNull, "Must select an object"] call BIS_fnc_showCuratorFeedbackMessage;
};
case (alive _object): {
[objNull, "Object must be alive"] call BIS_fnc_showCuratorFeedbackMessage;
};
// You should do extra checking here as well
default {
_exit = false;
};
};
if (_exit) exitWith {};
// Do whatever your module should do
Thanks, Ill give this a go when I get a chance ๐
I found a cheap way, remove and add back the scope. I never found anything after hours of looking.
You have tried https://community.bistudio.com/wiki/disableNVGEquipment I assume?
I tried that but it's still there ๐
Works perfectly, but only for vehicles
Though I wonder if https://community.bistudio.com/wiki/disableNVGEquipment works for optics as well
It does not
It only affected your equipped nvgs when I tested it
Yeah sometimes these commands work on units as well.
Oh I think i do this:
Store optic info
Remove optic
Replace with dot sight or something with no nvg or thermal
Remove optic
Replace with original optic
See if this cheap method helps. Might not be required to remove it so many times but I wanted to be safe.
I'm not home to look at the code specifically, I can send it later though.
Oh sure! I'd definitey appreciate that!
It's not ideal I just wish there was a better solution. But it works..
It's better than nothing but I really appreciate it! ๐
Some years ago, i made that for someone, don't remember if it also worked for infantry scopes.
Worth a try
player addEventHandler ["VisionModeChanged", {
params ["_person", "_visionMode", "_TIindex", "_visionModePrev", "_TIindexPrev", "_vehicle", "_turret"];
//systemChat "VisionMode changed";
if (_visionMode != 2) exitWith {};
if (!isNull _vehicle) then
{
_TIDisabled = (equipmentDisabled _vehicle) #1;
if!(_TIDisabled) then {_vehicle disableTIEquipment true};
};
_person action ["nvGogglesOff", _person];
}];
That won't no
For scopes unfortunately it doesn't work
let's cut to the chase: you cannot without a mod. Contact did it by having assetName (disabled) configs, aka same model without NVG features
I see, I tried looking for mods everywhere on the workshop that would allow me to disable NVG for the scopes but if it doesn't exist then I'll just try to keep on experimenting or hope someone will reply with a solution.
Here's what I ended up settling with. Not ideal, but it did the trick for me. As you can see there's some extra things in there with it you'd have to remove.
[{
private _currentWeapon = currentWeapon player;
private _hasThermal = false;
if (player getVariable ["pvpmode", 0] isEqualto 1) then {
private _visionMode = currentVisionMode player;
if (_visionMode > 1) then {
//force off the players thermal goggles if they have some on
player action ["nvGogglesOff", player];
hintSilent "Thermal imaging is due to PvP mode!";
//disables gun optics thermal modes but allows nvg
if (currentWeapon player == primaryWeapon player) then {
_currentoptic = primaryWeaponItems player select 2;
_currentweapon = primaryWeapon player;
player removePrimaryWeaponItem _currentoptic;
player addPrimaryWeaponItem "optic_ACO_grn";
player removePrimaryWeaponItem _currentoptic;
player addPrimaryWeaponItem _currentoptic;
};
};
//forced camera back into first person
if ((cameraView == "external" )&& (vehicle player == player)) then {
player switchCamera "internal";
};
};
}, 0.1, []] call CBA_fnc_addPerFrameHandler;
I'll try this!
here's with some excess stuff removed that was either dead code or not acting right or were moot for the topic at hand, I'll leave both up to show you how the original one worked despite the dead pieces in it.
[{
private _visionMode = currentVisionMode player;
if (_visionMode > 1) then {
//force off the players thermal goggles if they have some on
player action ["nvGogglesOff", player];
hintSilent "Thermal imaging is disabled!";
//disables gun optics thermal modes but allows nvg
if (currentWeapon player == primaryWeapon player) then {
_currentoptic = primaryWeaponItems player select 2;
player removePrimaryWeaponItem _currentoptic;
player addPrimaryWeaponItem "optic_ACO_grn";
player removePrimaryWeaponItem "optic_ACO_grn";
player addPrimaryWeaponItem _currentoptic;
};
};
}, 0.1, []] call CBA_fnc_addPerFrameHandler;
Okay! So this works with disable thermals in scopes at least or prevents them from being used! For NVGs, not much luck tho. Will try to experiment tho!
How would I disable the NVG mode while in an optic as well for this
Got it! Did some guessing and used this as reference.
https://community.bistudio.com/wiki/currentVisionMode
changed the digit in "(_visionMode > 1)" to 0 and done!
Thank you so much!

oh
execvm you say
this may explain my localization issues
hmmm
need me some JIP compatibility
it's just where you executed
@steel spoke initPlayerLocal has a second parameter to get JIP as a boolean
I rarely use this one (the second parameter)
yes, it will get the player object and if he is JIP (true or false)
it's useful when you want to show stuff just for the player that starts with the mission
if a player enters the mission later (jip), then it won't show for him
I've got choice paralysis regarding the design of my helicopter sequence and I'd love some opinions on the matter:
- All players must be in the heli to RTB. Easier to script since I dont have to account for other possibilities. Not realistic?
- Anyone can trigger the RTB. Means players can leave others behind. Not totally mission-breaking since respawn is allowed. More realistic? Heli wont stay forever and under fire.
Currently, the heli is a one way trip. I could script it to return, though that opens up a can of worms. But maybe that's more realistic giving players more freedom.
it's your scenario, your job to figured out what's best
think that we have no idea what your scenario is like
Could check that all players within X distance are in the area and then leave.
I.e. "if all players within 1km of the area are in the rtb zone, rtb".
Assuming the reason players aren't there because they died and respawned or something
They're just asking for opinions on whaf to have the condition as
Hello, I need some script to be able to respawn the bots who spawned at the beginning from the playable slots. I want generic code, I ignore their loadouts, numbers and groups.
I am thinking about storing in a variable as arrays of arrays the loadouts of all AI units in initServer.sqf, then read these arrays to createUnits then setUnitLoadout.
Do you see an easier alternative? Thx
Alright, I've been tinkering with this for a little while and unfortunately haven't had any success T_T
I've added the function's bit and integrated it what I presume to be correctly, but I can't get the module to appear in my Zeus interface.
My mistake, I just realized I removed / didn't include the scope = 1; from the example. You'll need that and to have the class name in your CfgPatches >> units list for it to appear in Zeus
Had me hopeful there for a second, but no dice. I'm very grateful for your help, all the same ๐
In missionroot\SRD_Landingcraft\config.cpp:
class CfgPatches
{
class SRD_Landingcraft
{
units[] = {"SRD_module_BoatAssault"};
requiredVersion = 1.0;
requiredAddons[] = { "A3_Modules_F" };
};
};
class CfgFactionClasses
{
class NO_CATEGORY;
class SRD_modules: NO_CATEGORY
{
displayName = "SRDModules";
};
};
class CfgVehicles {
class Logic;
class Module_F;
class SRD_moduleBase: Module_F {
scope = 0;
scopeCurator = 2;
author = "ShiningRayde";
category = "SRD_modules"; // class in CfgFactionClasses
isGlobal = 1; // 0 for server only, 1 for global execution, 2 for JIP global execution
curatorCost = 1;
};
// Make sure to add SRD_module<Name> to your CfgPatches >> units array
class SRD_module_BoatAssault: SRD_moduleBase {
scope = 1;
author = "ShiningRayde";
displayName = "Begin Boat Assault";
function = "SRD_fnc_beginassault"; // Should be a function name, not code directly
curatorCanAttach = 1; // When placed on an object, the module will be attached to the object
};
};
Ah well that'd be your issue, you can't create modules in a mission
It has to be a mod
In a way I suppose, but not really as an easy thing you can do from zeus
I suppose I'm a little fuzzy on the difference; I've made a companion mod for Mike Force before, running a blank copy of the map and utilizing functions and scripting.
oh yeah Zeus i forgot
The wiki entry conveniently leaves off that detail X_X
Are you placing your config in an actual mission folder (i.e. MissionName.MapName)? That's what I assume what you mean by missionroot in your message
Missions in general are very limited config wise. The main things you can make are sounds, music, and sound effects (the CfgVehicles ones)

oh hi Lou lol ๐
Yeah, it's in a mission folder. I had a JImmy Neutron Brain Blast moment and tried to Local Mod load just the SRD_Landingcraft folder but got correctly informed it has no Addons folder.
The Zeus Enhanced mod has their own way of making Zeus modules via script, but I've never used it before so I'm not aware of any limitations it might have
I used that previously and had success with it, but wanted to make this more generally available.
Indeed, I got it in a few attempts, just had to remember how to arrange a .pbo conversion X_X
The module appears, and seems to run the code! At least, until it hits a bug, being passed an array instead of an object, but that's life.
What's the exact error and where it occurs?
I see what I did, had a second helping of Params in there between your section and my script.
Or... thought I did, at least. Hmm.
Alright, it was reading the function I had in the mission file, not in the addon.
But removing the function from the mission file leaves me with a bottom-screen error of 'cannot execute module, error found in 'the function name' '
Is your function defined in your mod?
I'm guessing not, hmm. That wouldn't just be a description.ext file, would it?
Nope, you'd need to define it in your config.cpp
If you're using CfgFunctions, then you can just copy/paste it over and just change the path to the function
Something as:
class CfgFunctions
{
class SRD
{
tag="SRD";
class functions
{
class beginassault
{
description = "Launches Assault Boat";
postInit = 0;
};
};
};
};
It threw an error on loading up the game that the function wasn't found, despite Addons/functions/fn_beginassault.sqf existing.
That was copied direct from the original description.ext from the mission version.
Probably pathed wrong, I'm sure x_x
The default file path is different for mods (not sure why honestly)
I think that should technically be fine since you have the category as functions, but I'd personally always use the file parameter in the category class to specify exactly where they are
https://community.bistudio.com/wiki/Arma_3:_Functions_Library
You'll need to start the path with your pboprefix, which is using addon builder will just default to the folder name you're packing
So something like file = "@SRD_Landingcraft\Addons\Functions" ?
What there is the folder you're packing?
Ah, right, Addons
You have to pack each addon, which in that setup would be Functions, individually
You'd also want the folder name to include your prefix, e.g. SRD_Functions
I'd be packing the srd_functions folder as it's own pbo?
Yeah
Nevermind, got a step closer; no error, and it shows up in the functions viewer under configFile ๐
๐
But then throws a script error. But at least that I can wrap my head around.
Bah... an exit clause I swore I fixed up, checking if the object if a boat or not.
You can post the script here if you'd like
I got it, originally did a dumb '!iskindof', then forgot that it still needed to be inverted to (!(_vehicle isKindOf "Boat"))
Some unexpected behaviours I wasn't seeing in my initial scripting tests, but otherwise it seems to be working ๐
Thank you so much, Dart!
No problem, glad it's working for ya
Now on to other problems... like my supposedly bulletproof plan of using setVelocityModelSpace to force boats to ground themselves directly ahead working fine on larger modded ships, but little boats that can dip and rise suddenly becoming airborne :c
the speed boats work great for that
lol i like sliding up on the Shore at full speed and jumping out ๐
They do, but the AI drivers dont.
This is a tool for making AI driven landing assaults more effective and cinematic.
really hmm i never had Ai try it ๐
A much older version I used vectorLinearConversion, which works but seeing boats smoothly glide along between start and end points, heedless of waves or dangers was... unnerving.
And meant that the mission maker had to plan out specific nonconflicting boat paths.
There we go, just had to give the while-do loop forcing the speed a bit more breathing room between loops.
for water landing assaults i just have a player as the driver of each boat and the Ai as riders
if i have the Ai on that is
but i see your meaning
Ok same implementation, except the way you do respawn your bots.
Finally, I go with this implementation:
// SAVE AI INITIAL LOADOUTS AT STARTUP
if (isServer) then {
{ [_x, [_x, "INITIAL_LOADOUT"]] call BIS_fnc_saveInventory; } forEach (allUnits - allPlayers);
};
// THEN REVIVE AI WHENEVER IT NEEDS
revive_ai = {
{
_unit = (group _x) createUnit[typeOf _x, position _x, [], 0, "NONE"];
[_unit, [_x, "INITIAL_LOADOUT"]] call BIS_fnc_loadInventory;
deleteVehicle _x;
} forEach (allDeadMen - allPlayers);
};
That is not a Armed Assault Script File. As it says on the top.
addMissionEventHandler was only added with Arma 3.
So, if I make a mod to add a zeus module, will it only utilize functions designated within the mod files? Or can I tell it to run a function from the mission its run in?
Repacking the .pbo each time is kinda soul and time draining, and Im hoping theres an easier way Im just not thinking of.
It doesn't matter as it is just an SQF. You can use any script
yeah i made that script myself: it just had the incorrect header: i changed the header now for you:
@manic sigil do you have PBO manager its way easy that way
I do not, just using the Arma Tools packer :x
i see maybe you want to look into PBO manager
its super fast
@modern plank that will save all loadouts on All Ai even the enemy
is that want you intended
sure.
ok
I have been working on some "talking NPCs." Thanks to the help here, things are going great. The next thing I want to do, is add a randomization to some of the chats when you trigger the addAction. For example, if there were five lines of chat, each would have a 20% chance of displaying when a player interacts. If anyone could point me to a wiki that would help with that, many thanks. The above is the simplest example of what we have. It could be better, but it works well enough.
NPC (Non Player Character) ๐ or Ai as it were
@tough abyss i just use addMissionEventHandler
You can just use a selectRandom (or even selectRandomWeighted if you want to fine tune stuff more)
private _message = selectRandom ["Message 1", "Message 2", "Message 3"];
customChat [6, _message];
That's not related to what they're asking
oh ok sorry bout that
or you can use selectRandomWeighted to set up weight for each values, if you want some text to show more than others. I love this command.
https://community.bistudio.com/wiki/selectRandomWeighted
wow cool i never saw this before
@thin fox & @tulip ridge Sorry for the ping, but you guys each nailed it. I already can see uses for both ๐ป
Absolutely amazing! We used a simple example script for variables in our mines (different metals and minerals), but it is really static and gets predictable. This will be used for way more than just the NPCs.
@tulip ridge is that posisable to use inside the addMissionEventHandler
Yeah
On the selectRandomWeighted wiki page it says: "If numbers of items and weights do not match, the shortest array is used." Can someone explain that to me? With very long lists of items and weights, I can easily see making some mistakes and not having a 1:1 setup. So, I am curious what results that would yield?
It means that doing:
selectRandomWeighted ["Val1", 1, "Val2"];
Will only use Val1, because there's no value for Val2.
Similar thing for the alternate syntax:
["Val1", "Val2"] selectRandomWeighted [1];
Only Val1 would be selected
Perfect explanation, thanks! I can't afford that, so it is time to get some paper and a pen and do math. I don't have to do it often, but it is my least favorite part of scripting so far, lol.
You just need to have the same number of values as you do weights, that's all it's saying
There's no math required for that
Gotcha, I was unclear with my wording, I just meant time to get to work on it, and griping about it. Need more coffee today, brain is mush!
Working example:
I use numbers like 0 to 1, to mimic %, you can use 0 to 100, any number.
private _selected = ["CIVS", "ENEMIES"] selectRandomWeighted [0.8, 0.2];
switch _selected do {
case "CIVS" : {
[] call PIG_fnc_civilHighwaySpawn;
};
case "ENEMIES" : {
[] call PIG_fnc_enemiesHighwaySpawn;
}
};
So the weights in that expample make an 80% and 20% chance?
so it's like "80%" spawning civs and "20%" spawning enemies
Great to know! I don't think we need more than 1% increments, should be fairly easy.
The only thing left I would need to know, is how to make "like" NPCs use the same .sqf if possible. In my example above that is one avatar, out of five total identical ones. Each is at an airport. We also have "shop vendors" in our businesses, and four towns on each map, so four identical units per industry. So, for an example, I would like to have units with the variables "Endyou321_1", "Endyou321_2", "Endyou321_3, all function the same way, but without needing to update separate files each week when we change their various monologues. I am not sure how to tell it "if/or" between the units, and have the same end result.
use arguments
pass the object as an arguments, and use params to get it in your script
like [Endyou321_1] execVM "myScript.sqf"
and in the script, on the top, put:
params["_unit"];, the variable _unit will be the object that was passed as an argument, and you can place it where you need it in your script
I was way overthinking it! Thanks @thin fox , I believe we don't need to do anything more to this humble system. You helped on several steps for this the past week or so. Our players loved the prototype. They have an oldschool Nintendo rambling character vibe, and it is a good nostalgic touch.
faster use random and >
and you dont need pass empty [] in fnc.
if (random 1 > 0.2) then {
call PIG_fnc_civilHighwaySpawn;
} else {
call PIG_fnc_enemiesHighwaySpawn;
};
thx Prisoner โค๏ธ
You do, because not including it implictly passes the _this variable
If you intend to call a function with no arguments, you should use []
You can run into unexpected issues if you don't do that
// foo takes a number and does X with it, and calls bar
_fnc_foo = {
params [["_a", 1, [1]]];
call _fnc_bar; // params error because _bar expects a string, but is being passed a number
};
// bar takes a string and does Y
_fnc_bar = {
params [["_str", "", [""]]];
};
call _fnc_foo;
The correct usage would be to use [] call _fnc_bar
the called functions doesn't have params/arguments
would still be a problem?
and the function that runs the random stuff doesn't have either
No, but you should still explicitly call it with an empty array. Semantic reason is that it's "more correct"; but some function along the chain might eventually take some parameters, which could lead to several Bad param errors
Thx for the info Dart
True, I didn't remember.
Thanks for explaining
@blissful current I sadly don't have the time anymore to debug the HEMTT addon issue or do arma modding / follow the ongoing discussion, but if you ever get it to work, please tell me ^^
Same. Ima wait till I start a fresh mission to dive into that. In the meantime I can test code with linting with the Advance developer tools mod.
Hey , how i can do :
Vehicles move to wp1 then stop 5sec then move to next wp and delete
You could use setWaypointStatements to spawn code that does something like stop true / sleep / stop false.
the waypoint has its own timer system, use it, and for deletion do what john said
I guess there is setWaypointTimeout which in theory does exactly what you want.
yes, I misunderstood the question
Then when i use setwaypointtimeout for a hold wp i give that wp an sleep and then next waypoint started right?
it's a command that sets a delay to the completion of the waypoint, then the unit follows the next one and so on
Nice it must work for me
There i need an sleep time for player to take some weapon from truck then truck leave to next wp
Does anyone know the script that mods often use in Spaceships? The one where you press addaction and it boosts your aircraft forward to like 800kmph and addaction where it quickly deccelerates you to almost 0. I remember seeing it in Star Wars opposition mod long time ago, used for tie fighters and such, as they were helicopters and couldnt go at speed without it
is it possible to make an array of classes?
It's not one specific script, but the tl;dr is that it's just setVelocity on a keybind
You can see our implementation here, but this is not permission to reupload, repack, etc.
https://github.com/Legion-Studios/LegionCore-Public/blob/master/addons/impulsor/functions/fnc_impulsePFH.sqf
Like this || array[] = {class Example1, class Example2};
you mean for config scripting or .sqf?
config
ah. Well yes it is possible on some terms.
Hey, the main target
Spawn truck set waypoint to move to marker1 wait for 5s then set waypoint to move to marker2 wait for 2s then delete vehicle
The waypointtimeout or statement or script not worked , am run code from debug console on zeus , vehicle spawned move to waypoints but no react about timing or removing
st =
{
_tc = "isc_ia_gaz66_o";
_tr = createVehicle [_tc,getMarkerPos "spawn", [],0,"NONE"];
_gtrd = createGroup independent;
_trd = _gtrd createUnit ["C_Tak_01_C_lxWS",getMarkerPos "spawn",[],0,"NONE"];
_trd moveInDriver _tr;
_w1 = _gtrd addWaypoint [getMarkerPos "stop",0];
_w1 setWaypointType "MOVE";
_w1 setWaypointBehaviour "CARELESS";
_w1 setWaypointScript "hint '123'";
_w2 = _gtrd addWaypoint [getMarkerPos "delete",10];
_w2 setWaypointType "MOVE";
_w2 setWaypointBehaviour "CARELESS";
_w2 setWaypointStatements ["TRUE","deleteVehicleCrew _tr;
deleteVehicle _tr;"];
};
[_tc] call st;
Like for example: Units[] = {myUnit1, myUnit2, myUnit3} ... as seen in the CfgPatches
where is the timeout set up? I'm blind
_w1 setWaypointTimeout [5,5,5];
but it's not in the code that you provided
same for CfgMusic too
Not matter , i test it before, you think that i check it in thesetwaypointscript position
I test one by one and its my last one
yeah that's where i got the idea from
I'll test your code later, but from my experience, setWaypointTimeout works
I'm wondering how I could apply that in my own script
The setWaypointStatements there won't work because it's referencing _tr that doesn't exit in the context.
Look i test this codes
_wp1 setWaypointTimeout [5,6,7];
[_gtrd,wp1] setWaypointTimeout [5,6,7];
Where it must be to work?
read the wiki about that command pls
I test it before with hint code to , that not work too
["true","hint '123'"];
For waypointstatement
Should run if the waypoint actually completes.
So if I had an array of classes like so: items[] = {class item1, class item2};
shrugs
Maybe i must run it via external sqf file to work?
We use setWaypointStatements regularly. It works. Main issue is that the code runs everywhere, but that won't be a problem here.
Also that it runs in some cases where it really shouldn't. Which also isn't a problem here :P
Do its the correct writhing?
_w1 setwaypointstatement ["true","hint '123'"];
you missed the s off the end of statements
Its simply bro , look at this code
In _wp2
how would I be able to use the data inside of the array?
I already told you that why that code is wrong.
Just for that _tr?
u mean acquire data from a config and place it into an .sqf array?
I stop using that command and start using the waypoint group EH
My inclination on the next rewrite would be to stop using waypoints entirely given that it's a layer of opaque and buggy trash that you don't need :P
yes
Guide me too for use eh
lol. so you want an array inside an array? ๐
like Jonh said, for your case you don't need it, just use that command, the problem in your code is that the _tr is not defined in the waypoint space, _tr is a local variable that only exists in that scope of your code, the waypoint deals with a different scope, and that scope doesn't know what _tr is. Read the wiki on that command (https://community.bistudio.com/wiki/setWaypointStatements), particularly the description, you can use this or thisList to get the object that you want
Bro i say its correct about that _tr
But what about test hint
Hint not work too
Not just that _tr part
You didn't paste any code with a correct test hint in it.
and item1 and 2 are defined classes
one sec
Original one is using setWaypointScript incorrectly. setWaypointScript takes a file path, not a code string. Read the wiki.
Does anyone know if there a setPose function we can call? I want to be able to set the pose of my unit to the tactical/scoot crouch. Wiki says there is no such thing, has anyone done this? Tried messing around with: switchMove "<class_name>"; this setUnitPos "DOWN";
i have a question - if i try to get a variable using GetVariable "varName" but the group doesnt have a Variable with this name in it, what does it return? nil? i think so from checking wiki - so i should be able to check against this using isNil?
like ```sqf
_groupComposition = _group getVariable "groupComposition";_groupComposition = _x getVariable "groupComposition"; if !(isNil _groupComposition ) then {...};
nil, yes.
but your usage of isNil is incorrect. The variable name needs to be in quotes there.
Hello! I would like to ask for a little assistance. I wrote this script: ```sqf
while { (player getVariable["fw_alcohol_level",0]) > 0 } do {
sleep 180;
_alclevel2 = player getVariable["fw_alcohol_level",0];
_novyalclevel2 = _alclevel2 - 1;
player setvariable["fw_alcohol_level",_novyalclevel2,true];
};
can be that this is being called multiple times?
yes, this loop can actually be called multiple times, therefore i do that getvariable setvariable so each individual loop can always work with the most recent value
I think the main problem is the sleep command's position in the script. If the script detects that alcohol level is > 0, it will sleep three minutes at first and only after that update the value. The parallel scripts might have modified the variable during the sleep. Try this: ```sqf
while { (player getVariable["fw_alcohol_level",0]) > 0 } do {
_alclevel2 = player getVariable["fw_alcohol_level",0];
_novyalclevel2 = _alclevel2 - 1;
player setvariable["fw_alcohol_level",_novyalclevel2,true];
sleep 180;
};
oh i'm an idiot, you're right, forgot about that ... but i can't use your suggested solution, the sleep has to be at the top in the first place, earlier in the script before the loop there is another script that adds 1 to the variable, doing it your way would cause adding +1 and right away immediately subtracting -1
So are you essentially controlling how quickly the variable value decreases by running multiple decrement loops at the same time?
Because that sounds like it might be better to redesign the whole script
would an exitWith after the sleep help in your case?
@tender fossil @thin fox thanks for ideas, i think i can actually do what Ezcoo suggested if i add one extra sleep before the loop begins. The whole script is supposed to let players drink beer in game. Each bottle adds alcohol level by a given amount + a random value. Then over the next 10 minutes the alcohol level climbs up and once it reaches the top, the loop begins and each 3 minutes reduces alcohol level by one simulating sobering. If someone drinks multiple bottles, the alcohol level climbs up faster but thanks to the script running parallel, it also decreases faster, therefore the time from drinking to being sober again is still +- the same regardless of the number of beer bottles.
Here's the whole thing: ```sqf
hintC "You drank a whole beer bottle. Now press ESC to close the window.";
_alclevel = player getVariable["fw_alcohol_level",0];
_novyalclevel = _alclevel + 4 + random 3;
player setvariable["fw_alcohol_level",_novyalclevel,true];
sleep 180;
_trialclevel = player getVariable["fw_alcohol_level",0];
_novytrialclevel = _trialclevel + 1;
player setvariable["fw_alcohol_level",_novytrialclevel,true];
sleep 180;
_sestalclevel = player getVariable["fw_alcohol_level",0];
_novysestalclevel = _sestalclevel + 1;
player setvariable["fw_alcohol_level",_novysestalclevel,true];
sleep 240;
_desetalclevel = player getVariable["fw_alcohol_level",0];
_novydesetalclevel = _desetalclevel + 1;
player setvariable["fw_alcohol_level",_novydesetalclevel,true];
sleep 180;
while { (player getVariable["fw_alcohol_level",0]) > 0 } do {
_alclevel2 = player getVariable["fw_alcohol_level",0];
_novyalclevel2 = _alclevel2 - 1;
player setvariable["fw_alcohol_level",_novyalclevel2,true];
sleep 180;
};
// drinkBeer.sqf
// Run this when a player drinks a beer
hintC "You drank a whole beer bottle. Press ESC to close the window.";
// --- Configurable values ---
private _initialBoost = 4 + random 3; // immediate boost
private _stages = [180, 180, 240]; // times between extra +1 increments
private _decayStep = 1; // how much to lower per tick
private _decayDelay = 180; // how long between ticks
// --- Apply initial boost ---
private _level = player getVariable ["fw_alcohol_level", 0];
_level = _level + _initialBoost;
player setVariable ["fw_alcohol_level", _level, true];
// --- Apply staged increases ---
{
sleep _x;
_level = player getVariable ["fw_alcohol_level", 0];
player setVariable ["fw_alcohol_level", _level + 1, true];
} forEach _stages;
// --- Begin decay loop ---
while { (player getVariable ["fw_alcohol_level", 0]) > 0 } do {
sleep _decayDelay;
_level = player getVariable ["fw_alcohol_level", 0];
player setVariable ["fw_alcohol_level", (_level - _decayStep) max 0, true];
};
AI remake
Not sure what these variable names mean exactly, but I think I get the idea. You could maybe write a function that takes the incremental "delta" value as parameter and updates the function/script accordingly
You can utilize the same value symmetrically when adjusting and simulating the rate of sobering
So the end result is same, even your idea (which I think is kinda clever in itself), but you'd avoid bad practice in code and make it much less prone to bugs
It would be like switching from FM to AM radio: instead of adjusting frequency you'd adjust amplitude. (Sorry, my currently insomniac brain is a bit restless) ๐
Taking someone's script, feeding it to some LLM bullshit machine, and pasting the results, is not helping. Please don't contaminate this channel with useless LLM garbage.
Thank you @tender fossil ๐ I appreciate it
@cosmic kayak ```sqf
this setUnitPos "Middle";
Thanks for you words, think you'd find its the exact same.. and anyone who doesn't "trust" AI to be "efficient" probably also has Palestine flags on discord ๐คฃ๐คฃ
Goodbye ๐ Mr Palestine
They/them and a pally flag oops.
"trust" AI to be "efficient" are you kidding me: no way
Yeah robots and efficiency usually go together till it starts to attack you I guess...
Anything that makes something quicker, is efficient. I'm not a dictionary tho.
Ai don't know how to do ArmA scripting
So if you can't trust that that's efficient you are probably a fast typer!
I never said it does.. but It can read and rewrite... So if your script is valid it won't break it mate. Test it ๐
Ai is efficient at giving you the run around
Yeah maybe if you ask it for magic. Not perhaps to rewrite or give advice.
Guess I find that obvious!
yeah sorry m8 we don't use Ai or any chatGpt or LLM here on discord
Okay. But the point still is valid anyone who can actually read what AI says to them and perhaps check it will be more efficient using it
I get that the more it's used the better it gets... So don't use it!
my Ai is the guys here on discord: i don't trust anything else
Good point but logically it's not AI have a goodnight mate didn't mean to cause offence .
Apart from to Mr Pallyshtine who's probably enraged
im not offended
๐คฃ for what mate ... Is this a strict server?
for beign stupid
You can't support it anyway
Your profile pic haram.
Thanks for calling me stupid!
he didnt say u are stupid he said your being stupid
Okay.
In my opinion someone who does stupid things is stupid. But yeah I must be wrong
just remember no ChatGPT or any other kinda Ai stuff on here ok m8
Yeah ๐
roger that HooWha
bye
This server woke me up to that lol
Ah is that the point the mods take offence.
Lol ๐ find Jesus.
another day another troll on Internet
@gleaming token easy m8 take it easy dont push it
I'm not trolling lol! They/them and pally flag is literally trolling but hey ho!
plz don't make us use the block thingy ok m8
Yeah you're right
thx m8
Hope you agree tho Scotty
Your bros political views would land him in danger if he practiced them.
no one has political views on here m8
Ah I just assumed then again... Looking at the guys profile.. perhaps I shouldn't.
everyone has but this is not the place to express it
dude you need to relax
<@&105621371547045888> sorry to ping you, but this guy is just talking sh*t
Wtf lol seems you're the one with the agenda
I'm simply here to help others... Go read the chat lol yes I took offense to someone calling me out for simplifying repeated script with AI. I'm sorry
@gleaming token time to step off the keyboard for a moment
@gleaming token hay m8 lisson to m8 plz im 64 so i lived some life plz relax and plz don't try so hard
Thanks for the wise advice Scotty I'm not trying to get banned by Antifa but it may happen now I have only replied to people
I've read the chat. you wore out your welcome.
Great lol at what point
Reality is I'm trying to answer and be fair. But see it as you want
no you been insulting people left and right
Okay if that's what you say I made 1 insulting comment which wasn't directed.
theres many
Nah mate nothing offensive said
If I repeat someone's pronouns without adding anything and you take that as offensive that's your issue.
If I describe the community of a whole game as a type of person (obviously not true) and you take that as serious that's the same story.
ok see you m8 have a good day or night
anyway. back to scripting
is anyone able to help me with a script to check is all living players from a side are present in a trigger area to fire as true?
i tired:
({alive _x} count units this) == ({_x in thisList} count units this)
i found that in a reddit post but it throws errors
this isn't even valid in a trigger activation statement so I'm not sure what they were aiming for there.
yeah i'm really new to this and not sure what I'm doing really
Any particular side?
blufor
its a PvE coop mission and I want the task to complete once two units rejoin at the rendevous area
Count of all live players on blufor:
{alive _x and isPlayer _x} count units west
If your trigger is only counting blufor players then just {alive _x} count thisList should be the count of players in the trigger area.
For testing in the debug console you can do list myTrigger instead of thisList.
ok, so like this:
Ah there's no blufor players option. I guess this then:
{alive _x and isPlayer _x} count units west == {alive _x and isPlayer _x} count thisList
blufor/present is probably as good as you get.
Now the issue is that if you don't start with any blufor players it might just trigger immediately.
0 == 0
whether that's a problem depends how you're running your mission.
well there will always be atleast 1 blufor player since that is their only side
It would also trigger if they all died :P
yeah that just uato triggered and completed when I started the mission
oh wait didn't sync them whoops
didn't see the blue line wasn't there
With zero filter:
private _countBlue = {alive _x and isPlayer _x} count units west;
_countBlue > 0 and _countBlue == {alive _x and isPlayer _x} count thisList;
ok yeah that autocompletes at mission start since it counts all the players as dead
LimitSpeed negative on a helicopter makes it fly backwards... ironically, if I could get that on a boat that'd solve a big headache right now XD
For some reason, small vanilla boats, when forced to move backwards by setVelocityModelSpace, force a hard turn on the driver even with AI disabled.
Which leads to them spinning about and, sometimes, driving up the beach backwards.
lol wow
Excuse me, why you worry about SP being played by 30 players?
It's the same thing, assuming you run that code on each player's own machine
E.g. like an initPlayerLocal script or something
player always returns one object
Depends. Just "player whatever 1000" will not run for everyone automatically
depends on what your respawnOnStart in your description.ext is
then you're fine.
to test this yourself, you can turn off battleye, and hit play multiple times to start multiple instances of the game. no dedi server needed.
Also, you can learn one thing: LA, LE, GA, GE where BIKI states
Especially LE and GE, means "effects only the computer that runs it" or "effects on every MP clients"
running into an interesting thing here
When using the fire command the AI seem to want to rotate their turret up as soon as they start firing, happens if they fire 1 bullet so its not recoil
Im trying to get them to just stare at a specific object and dump a mag so them rotating up is a bit troublesome
I tried a mixture of lookAt, doWatch, and doTarget but nothing seems to stop making them doing it
I've also tried disabling AI and only have WEAPONAIM enabled but that also did not work
Also try forceWeaponFire or BIS_fnc_fire
what sort of weapon was that btw?
Tested with a couple
base game HMG turret, rest was an assortment of OPTRE turrets
mostly the big AA guns
yeah he went right to the Gen chat: and did the same thing:
Interesting angle, guess LLM's are always accurate and never make mistakes
why would any one ever use Ai crap when we have great guys in discord
Clearly gave up on thinking and had the LLM do that for him too ๐
wouldn't be the first time
Oh I'm glad I went straight to bed after posting that message. Dealing with that guy would've ruined my whole day
yes sir i left also lol
How would you extract information from a vehicles config, in particular maxSpeed, etc?
i just use the config viewer in the esc menu of ArmA
Arma*
Yeah, but like, within a script :p
yeah you can copy that stuff out of the config viewer
https://community.bistudio.com/wiki/configOf + other config commands ๐
You mean, like a loopback'd server to test multiplayer with two clients?
yeah how do i do that
Sorry I misread
I use TADST which has a toggle for looping back the launched server, but I believe its also a value in the server config file. Just set that, then launch arma and then launch another copy through the .exe in the install location.
ahhh ok i see yes i used that before
Literally the example on the wiki for getNumber xD Thanks!
Id say I dont know why google couldnt parse my questions to get that page, but AI have a few hunches...
oh thats cool @cosmic lichen
There was like an entire month the Wiki didn't even show up in Google search results- I imagine due to integration of their LLM. I don't know why all these companies have to integrate AI for everything now 
it might have been due to CloudFlare "bot control" that prevented Google to access/reference pages
now fixeded hopefully
Also our bot protection on wiki, should effectively prevent any LLM learning setup from reading it and learning from it.
Not sure if thats a good thing
Hey all, working on the dismemberment mod for arma 3.
I had some questions about effects for you guys, particularly in particles vs objects.
Currently, for the head explosion mechanic, I am spawning various different items (Such as skull, brains, etc)
I am spawning each particle in a for loop, creating an emitter object for each"
IE { _emitter = createVehicleLocal ["#particlesource", _pos, [], 0, "CAN_COLLIDE"]; _emitter setParticleParams [ [_x, 1, 0, 1], // shape name other particle code here ]; _emitter setDropInterval 6000; } forEach _objectstospawn;
Am I utilizing the particle system correclty here, or is this ill advised?
Would it be better to just create a physx object for each object instead?
Thanks in advance
Am I utilizing the particle system correclty here, or is this ill advised?
if you are creating one emitter for every particle, yes
otherwise no ๐
Thats what im thinking, Im not sure if an emitter for each one is the best - I cant drop because each particle is different.
But the simulation is more efficient for particles no? vs fully simulated physx object?
hold on, hold on.
the above code - what is in _goreItems?
Just an array containing the paths to the 3d objects
so for each models, create one emitter that shoots 1 drop every 6000s?
Yes basically the emitter only drops one particle each
the emitter gets deleted long before the 6000s
I am going to change it to physx objects instead, see if that gives me good performance
It is actually making not much of sense. Please post the entire context
if you have duplicates in _goreItems, better configure one emitter properly to generate them all dupes
Yes but they are all unique shapes
In the first place, there is a command to drop ONE particle each execution: drop
Ah - I saw that while browsing the wiki recently. Is this more efficient than an emitter?
It is not about efficiation. It is about dropping one particle
Well, it is efficient than your code anyways, though
Would that be better than say, spawning a physx simulated object for each instead of a particle?
That is absurdly bad
here you create one emitter for one drop, it's faster to just drop directly
I have a framework with a text message system which uses the hint system to display messages to other players. Our players will have an option to "build" a PC by combining virtual items, and exchanging them to an admin, to have a prop computer placed in the player's home. This feature is to offer "online shopping" from home.
Our team wants to add an "email" system, to the same, where a player uses the same basic feature, but can check the message from the addAction in the prop, at their leisure. I got some help here starting script for an online market (player to player virtual buy/sell/trade shop). Am I looking at the same process basically?
So far the gist is, use a scripted database, profileNamespace, info to JSON, store, and reverse functions. I know that is extremely watered down. Just seeing if I am in the ballpark.
โฆwhat is the question here?
I apologize, brain injury from time in the army, makes cognition rough.
To make an email system, from an existing text message system, would this be the basic flow of the scripting?
Scripted database > profileNamespace > info to JSON, store > and reverse functions.
Man I would have so much fun developing life stuff if I had the time for it ๐
I'd build a whole computer and phone. Multiple apps, E-Mail addresses, phone number with calls, SMS, maps, online banking. So much fun ๐
Haha, if only there were more time in the day. Real life makes it tricky.
I don't see how E-Mail is different from "text message system" which you already have.
On the backend side (assuming you store text messages) to me it sounds like its the exact same thing
There is my question! The messages are not stored, they are only displayed in game if players are present. So, that is why I was assuming the above steps from the virtual market project.
Ah then yes.
Server has a database (hashmap) that stores every players inbox. Which is saved to profileNamespace.
When player sends mail, it tells server, server puts into receivers inbox.
When player receives mail, it asks server for inbox list, server grabs inbox list and sends it back
Perfect! My brain is clinical mush 60% of the time, but I will get to it the other 40%, lol.
If you don't mind me asking (just curious)- how come you you're not sure it's a good thing? Are you afraid it'll lead people using it as a learning resource farther astray? Or do you think AI assistance in code production is still sort of the way of the future so to speak? Or am I entirely off base and your thoughts are something else?
I think it would be good if AI can learn from the wiki to produce better SQF code
Ah okay, totally understandable. More avoided instances of stuff like setFOV haha ๐
nvm found a workaround
Also don't wanna blow up poor Dedmen's mentions but since I saw the topic of life stuff being brought up. The life framework for Arma was initially what got me into Arma 3 and writing SQF. Genuinely such a blast- a lot of fun stuff you can make and do. This was my most recent large project I am pretty proud of 
One thing I did wanna add is a form of instant messaging, which would have read receipts and even an indicator to show when another player is typing. Only thing that really holds me back from doing stuff like that is just that with our mission having existed for 10+ years, there is also a lot of older and more interesting written code that can make reworking things a little daunting sometimes. I am not an SWE or anything IRL but I imagine that kinda just goes for any project lol.
Half my bugfix PRs for Antistasi these days end up being refactors as well :P
At some point you gotta stop stacking up the trash.
Me be like "Hey I could spend some time working on this old project"
Me then: spends days just refactoring and not really changing anything meaningful
Me after: "Okey I've spent enough time on this project, time to switch to something else"
That's cool you work on Antistasi- I didn't know that! I have played a little bit of it with friends from time to time and had a blast. Since I work on life framework stuff, we pretty much never do anything AI related but think I remember saying to you a while ago I got a lot of respect for you guys who know AI stuff really well the way you guys do. Seems like magic to me haha
Arma AI is sadly pretty close to magic. If you follow certain arcane orthodoxy then it usually works out. If you stray then you open a portal to hell.
Too many layers of broken shit between your code and the results. There are paths that work but a lot of non-obvious and undocumented ways to screw up.
We definitely go through our lapses of that hahaha- typically what @dusk gust does after a couple of beers
. Even if it isn't really changing anything the user notices- it sure keeps the rest of us saner for it ๐
I disagree. Studies have shown that LLMs are fundamentally incapable of not hallucinating even with perfect sources. I don't see any place for that in fact-based work, especially in a context that already has enough human-generated dodgy ideas. I'm absolutely fine with LLMs being excluded from SQF.
I don't think they're great at learning from documentation anyway because they lack comprehension. Forum answers and github repos are more useful for them.
Great work! The script is cool, but that dialog is really slick, too.
Thank you ๐!!!
Which is super dangerous. Most good code is private. And forum posts... Well that's self explanatory...
Arguable whether it's more dangerous when the code is obviously or non-obviously wrong. I consider it a good thing that LLMs are so bad at SQF that they usually make it obvious.
Copilot's made my sqf coding like 50x faster, and now with inserts, it frequently catches very trivial errors for me (like syntax issues or forgetting an underscore here or there). This is made more important by the fact that sqf language tools in vscode generally don't have semantic tying info and won't catch/autocomplete those. It hallucinates scripts from time to time but I just press escape and move on.
Once you get used to the language you don't make a lot of syntax errors. I think the worst one is where you miss an underscore in an if statement and Arma just ignores it.
Syntax checking is probably the best use for the things though. LLMs get syntax.
I've coded in C-like languages for 15 years, and without an IDE that does it for me or catches it with squiggly lines, I'll still forget a semicolon at least once every 10 minutes of heads down coding.
In arma 3 that's catastrophic for productivity because the sqf vscode extensions don't catch it and because that's a 20-30 second issue to fix at least, more if it's a mp test. And that's just semicolons. There's the forgotten underscores. Brackets/paran (at least this one gets caught by my IDE without copilot). The typos. The forgotten parameters inside spawns/event handlers. Being able to read my mind and make formats for text. All adds up.
And then there's the tedium like:
private _whateverX = ...
Ok, now it can do _whateverY by itself.
Another is annoying vector math, though that one I usually take outside my IDE to chat gpt which will hallucinate 80% of the sqf commands and syntax but once I put it next to my code, copilot will automatically translate it nicely because its context field includes my last touched files.
Hey i need an example for a truck spawn then go to first waypoint wait 5second then move to last waypoint and got delete
Am try to know the statements part of waypoint so i need better examples to know it
@ruby spoke you just want to put "items1, "item2" in that array. Then go through the items[] array and use config to format config path from the array elements.
What I did was just put the class names of "item1", "item2" in the array. So all i have to do to get the data is run BIS_fnc_getCfgData on the selected array element.
Don't know why I didn't think of it before.
Can you put a hyperlink in a hintc ?
When we do a "createUnit", is there any recommended check to be done before the unit is actually ready?
Something like:
_unit = _group createUnit[_class, _pos, [], 0, "NONE"];
waitUntil { not isNull _unit };
Maybe another test than not null ?
No
The unit should never be null immediately except you provide a wrong class name .
But then the check would run indefinitely and break anyway.
Ok, so the created unit is immediately avail. and "usable", no need to wait like for a player.
@formal grail stop useing big words i don't understand lol "hallucinate" ๐ joke lol
@grand oracle hintC shows up on your schreen right
@grand oracle hyperlink is mostly used to link map markers imho
Yeah that's how you're supposed to do it ๐
You can replace entire functions ingame in arma 3, I use advanced developer tools mod and just soft work ingame if doing fast iterations. So I never even have to close the game to test my fixes etc.
Then for larger changes will then do restarts, then move back to ingame for small fixes
Advantage is ADT has syntax highlighting and even undefined variable detection due to being live.
You can recompile functions without restarting
Personally I use hemtt with filepatching, it's got some fairly advanced linting and will catch a lot
in ADT?
In general
Vanilla and CBA's function setup can both recompile
That's unrelated to ADT
And function in variables can also just be overwritten
ah makes sense
Assuming they're not compileFinal'd, yes.
For vanilla, just setting recompile = 1 will allow recompiling via BIS_fnc_recompile.
In personal experience (though I don't use vanilla's at all anymore), it's rather slow to use the default parameters so I would recompile specific functions rather than "everything" (which was still only the ones I was manually doing).
I've just use CBA's PREP ever since I switched to hemtt, much nicer to work with imo
For developing you can also do that without the function libary.
{
// missionNamespace setVariable [(_x #0), compileScript [_x #1]]; // protected against overwriting - for the live build.
missionNamespace setVariable [(_x #0), compile preprocessFileLineNumbers (_x #1)]; // For developing - not protected!
} forEach
[
["fnc_abc1","fnc_abc1.sqf"]
];
Then you can just edit the SQF files and execute it again to recompile the functions.
Alright, digging through the config files didn't leap out at me; is there a way to Get how long a vehicle is? Bounding box dimensions, anything?
Not in config. But there are commands for it.
Yeah, should have figured, I assumed it was more AI delusions since no proper links showed up T_T
sizeOf should do fine, I think.
Eh, 90% accurate. Good enough for what I need.
why not use the bounding box?
I just need a roughly scaled multiplier for how far back to send boats after they drop troops off.
Or rather, how far back to make them back up, before giving them back control to turn around and drive off
Sorry if this is the wrong place to ask, but does anyone know if there is a way to play around with the aiming deadzone in arma 3? What I mean by that is if it's possible to get or set the offset from the weapon deadzone? Sorry if I'm not clear, but basically when you enable deadzone to the max, you can move your character's upper body independently similar to holding alt while aiming down the sights. Is it possible in any way to get control over this via modding?
you can set it in the options, but not through scripting.
AI be like: setDeadzone
I've been having issues with a script. I'm trying to create an "extraction beacon" scenario where players can execute a hold-action on one of several beacons and it will produce 3 outcomes:
- A hint telling players that an extraction beacon has been activated (this part works)
- Move an invisible item labeled "LZ_Marker" to the same position as "Exfil_X" which is a landing zone near each beacon (This should work but doesn't)
- Create a map marker to show players which beacon was activated (This I have no idea how to make what I have work)
Here's what I have for code (It's inside the activation of a Hold Action):
LZ_MARKER setPos [getPos Exfil_2];
"Safety can be found at the Outpost!" remoteExec ["hint"];
private "_mkr";
_mkr = createMarker ["outpost_marker", getPos _target];
_mkr setMarkerShape "ICON";
_mkr setMarkerType "mil_dot";
_mkr setMarkerColor "ColorBlue";
_mkr setMarkerText "Outpost";
You should use one set of getPosASL/setPosASL, getPosATL/setPosATL rather than getPos/setPos. getPos and setPos are slower and don't actually use the same type of coordinates as each other.
Now for things that might actually be the issue: What is contained in the variable Exfil_2? Object, marker...? If it's a marker you'll need to use getMarkerPos instead.
Your syntax here is wrong:
LZ_MARKER setPos [getPos Exfil_2];```
Leaving aside which position commands are being used, what you're doing here is creating an array _containing a coordinates array_, which is not what `setPos` expects to receive.
Let's say `exfil_2` is located at coordinates `[10, 10, 0]`. If you do this:
```sqf
[getPos Exfil_2];```
Then the end result is `[[10, 10, 0]]` - an array inside an array. `setPos` and its counterparts expect to receive _just an array_, e.g. `[10, 10, 0]`.
So if I were to define _exfil as a private variable, would this work?
_exfil = getPosATL Exfil_2;
LZ_MARKER setPosATL _exfil;
It would work, but you don't have to use a private variable. (It's handy to do so if you want to use that position again in the script, so you don't have to get it again, but not required to make it work.) You just have to not add the extra [].
(btw it's not a private variable unless you use private or params. A leading underscore makes it local scope, but not private. https://community.bistudio.com/wiki/Variables#Scopes)
Well, that solved most of that problem, but now the helipad duplicates and the one with the variable name LZ_Marker goes to the debug corner
I am aware, I just didn't want to re-type all the code just yet
For more compact privating, you can use private as part of the initial assignment of the variable, rather than needing a separate thing for private "_myVar";. See private syntax 3
The script you've posted doesn't create any new helipads, so you have something else going on if there's duplication
It may be the actual exfil script. I'll post it here in a second
Actually, I found it almost immediately, the original version of the exfil script was when LZ_Marker was still a marker
Now the heli lands in the right spot, but then it takes off immediately.
private ["_lzPos","_spawnPos"];
_lzPos = getPosATL LZ_MARKER;
// Spawn extract
_spawnPos = _lzPos getPos [3000, 135]; // 2 km SE
_spawnPos set [2, 750];
EXTRACT = createVehicle ["B_Heli_Transport_03_F", _spawnPos, [], 0, "FLY"];
createVehicleCrew EXTRACT;
EXTRACT flyInHeight 75;
EXTRACT move _lzPos;
waitUntil {sleep 5; EXTRACT distance _lzPos < 200};
// Land
EXTRACT land "GET IN";
// Wait until all players on board
waitUntil {sleep 10; {alive _x && _x in EXTRACT} count allPlayers == {alive _x} count allPlayers};
// Take off
EXTRACT flyInHeight 100;
EXTRACT move (_lzPos getPos [1000, 270]); // fly west
// Music cue
playMusic "Mephistos_Lullaby";
sleep 60;
// Fail state
EXTRACT setDamage 0.7;
EXTRACT setFuel 0;
waitUntil {sleep 5; (getPosATL EXTRACT select 2) < 50};
// Trigger outro
[] execVM "outro.sqf";
You might want to restrict the crew's AI by setting them to Careless or using disableAI, otherwise they might get spooked by reported contacts and try to leave.
It's also possible that because of using the "GET IN" landing type, it's checking to see if it has any synced waypoints of units that want to get in, seeing there are none, and immediately deciding its job is done and leaving. You could try using syntax 3 of landAt to set a wait time instead.
I need it to avoid taking off until all players are on board. It's meant to be a cinematic failed extract
Well, you can just set a super long wait time, then cancel it with landAt mode "None" when all the players are aboard
Threw an error and wouldn't land
Well, I don't know what you actually did, so ๐คท
Replaced
EXTRACT land "GET IN"; with EXTRACT landAt _lzPos;
Well, that's not a valid syntax for landAt, so not too surprising
So, rather than being condescending let's try helpful
https://community.bistudio.com/wiki/landAt
We're looking at syntax 3: heli landAt [position, mode, waitTime, putOnSurface]
heli is obviously EXTRACT. Then on the right side we have an array of parameters. position is presumably _lzPos. mode, I would imagine, is "GET IN". For waitTime, we could try something like 999999999 since we're not expecting it to run in full; it will be manually cancelled. putOnSurface doesn't matter too much if the LZ position is accurate, so we can omit it or just go with true.
Hey everyone, I'm trying to make a self/emergency revive script that works with the default revive system. I managed to get the below to work, except upon revive the player cannot scroll through the action menu. It took me forever to figure this out and I can't find a next step, any idea what to change? ["#rev", 1, player] call BIS_fun_reviveOnState; player setVariable ["BIS_revive_incapacitated", false, true]; player setVariable ["#rev_state", 1]; //stops #rev_bleed from coutning up, removes greyscale player setDamage 0; //heals player setUnconscious false; //makes player getup
When it's time for the helo to lift off again, we can cancel the wait mode by doing it again but using mode "None" and skipping everything after that.
BIS_fun_reviveOnState should probably be BIS_fnc_reviveOnState
Embarrassing, thanks, tried it again but no action menu still
Got it working. Now I just need to improve a few other details.
What is the best way to rewrite this statement? I get that hemtt is suggesting configOf but it only returns the path not the display name...
warning[L-S30]: Use configOf instead of typeOf with configFile for variable `_x`
โโ addons/main/functions/fn_addNewObject.sqf:15:77
โ
15 โ private _newObject = _x getVariable ["PEPE_CustomObject", getText (configFile >> "CfgVehicles" >> typeOf _x >> "displayName")];
โ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use configOf
โ
= try: configOf _x
getText (configOf _x >> "displayName")```
we help scripting here ๐
Can someone tell me why the trigger I placed down is showing as "no shape" even though I assigned a and b values for its size?
negative values?
Does anyone know how to set banking degrees on a camera object? On wiki someone said setVectorUp command can be used for this purpose, but I tried _camera setVectorUp [1 * (sin _bank), 0, 1 * (cos _bank)], nothing happens with the camera.
I tried [_camera, 0, _bank] call BIS_fnc_setPitchBank, still nothing happens
BTW I'm on arma 2 oa, does this command only work on arma 3?
i tried only in a3
BIS_fnc_setPitchBank is an A2 function
You sure you use the right camera or number to set
not sure, but I was able to use triggerArea with it so i guess its of no concern
_camera is initialized by calling "camera" camCreate [0, 0, 0], so it should be the right object, _bank's value seems valid as well.
Post the entire code
I tried my best to come up with this minimal example
_playerDir = ((getdir player)-90)*-1;
_playerPos = getPosASL player;
_cameraAngle = INIT_CAM_ANGLE;
_cameraDir = [ cos(_playerDir+180) * INIT_CAM_DIS_Y, sin(_playerDir+180) * INIT_CAM_DIS_Y, INIT_CAM_DIS_Z ];
_cameraPos = [ (_playerPos select 0) + (_cameraDir select 0), (_playerPos select 1) + (_cameraDir select 1), (_playerPos select 2) + (_cameraDir select 2)];
_camera = "camera" camCreate [0.0,0.0,0.0];
_camera setPosASL [_cameraPos select 0, _cameraPos select 1, _cameraPos select 2];
_camera camSetTarget [ (_cameraPos select 0) + (cos _playerDir) * (cos _cameraAngle) * 100000.0, (_cameraPos select 1) + (sin _playerDir) * (cos _cameraAngle) * 100000.0, (_cameraPos select 2) + (sin _cameraAngle) * 100000.0];
_camera camCommit 0;
while {true} do
{
// Some other stuff.
_bank = _bank + 0.01;
[_camera, 0, _acbank] call BIS_fnc_setPitchBank;
};
I'm modifying GCam 2, the entire script is nearly 4k lines long
You sure it is about GCam 2 or your code? Does your code work on its own?
No I'm not saying it's about GCam 2, GCam 2's code works, just mine doesn't. I'm mentioning it because posting the entire 4k lines of code is simply not viable.
No I'm not saying that. Are you sure your code being broken or injecting your code is
Let me try executing my code in mission editor
Didn't you do that yet?
It is showing you where you should use it, with the errors.
Note the errors stop before the >> displayName
Sorry I only started learning about arma modding yesterday.
In mission editor it shows this error:
'[_camera, 0, -45] call |#|BIS_fnc_setPitchBank'
Error Undefined variable in expression: bis_fnc_setpitchbank
The script is this:
titlecut [" ","BLACK IN",1]
_camera = "camera" camcreate [0,0,0]
_camera cameraeffect ["internal", "back"]
;=== 14:51:29
_camera camPrepareTarget [-55102.08,84473.38,19.82]
_camera camPreparePos [3724.91,3606.90,0.45]
_camera camPrepareFOV 0.500
[_camera, 0, -45] call BIS_fnc_setPitchBank
_camera camCommitPrepared 0
@camCommitted _camera
~30
_camera cameraeffect ["terminate","back"]
camdestroy _camera
end1=true;
exit;
I just recalled you need a Functions module in Editor
@camCommitted _camera
Wuht, is that SQS?
Question - I have a medic script that works quite well - until the squad is at a STOP from a vanilla STOP command. What is the trick to release just the medic to treat wounded? I've tried everything I can think of - I can't get the Medic to leave his STOP spot.
I was just throwing what can work in the mission editor, don't quite know the difference between sqs and sqf๐
pls add Eden support ๐
hi, im a newbie with some little skils in sqf, im working on an arma3 project with extDB3, and i need some kind of help how to use it properly,
what's extDB3
some old stuff, invented probably by turning himself
so its like a config file ?
arma 3 has no persisntent saving , so extDB3 is a module that gives u kinda this ability, it gives u the chanse to send data into a database and request it
ahh i see
You can make a scripted database in Arma 3 nowadays though
?! tell me more ๐
hm, like saving stuff in xml and loading it at restart ?
Hmm, is that deprecated info now?
arma 3 has no persisntent saving
It does.
https://community.bistudio.com/wiki/saveProfileNamespace
https://community.bistudio.com/wiki/saveMissionProfileNamespace
It has a info tag right at the top.
You really shouldn't use that system. Building your own with Hashmaps is more efficient
Was just typing that HashMaps are probably the way to go ๐
Well yeah, could've linked their page directly indeed
@glossy matrix
//.sqs is Very old:
.sqs - uses goto
.sqf - uses while { } do { };
//and many other kinds
//i remember useing sqs way back in OFP :)
//sqs - goto - is kinda like CNC machining M99 and m98
//where you can jump to diff parts of a script or looping as it were
//i find .sqf way nicer then sqs
//Ex 1 sqs ===================================================
if (!isServer) exitWith {};
_grp = group (_this select 0);
_range = _this select 1;
_delay = _this select 2;
_ranX = 1;
_ranY = 1;
_origPos = (getPos Player);
#patrol_again
_origPos = (getPos Player);
{_x setBehaviour "AWARE"} forEach units _grp
?(random 1) < 0.5: _ranX = -1
?(random 1) < 0.5: _ranY = -1
xx = random _range * _ranX
yy = random _range * _ranY
units _grp commandMove [(_origPos select 0) + xx, (_origPos select 1) + yy];
{_x setBehaviour "Safe"} forEach units _grp
~_delay
goto "patrol_again"
//Ex2 sqf =========================================================
//here how to exec-- [leader _grp, 100, 10] execVM "Randpatrol.sqf";
//==================================================================
if (!isServer) exitWith {};
sleep 0.5;
// Setting variables
_grp = _this select 0;
_range = _this select 1;
_wtime = if (count _this > 2) then {_this select 2} else {10};
if (_wtime < 0) then {_wtime = 10};
_timeout = 0;
_ranX = 1;
_ranY = 1;
// getPos (leader _grp);
_origPos = getPos (leader _grp);
// Have the units patrol
while {{alive _x} count (units _grp) > 0} do
{
{_x setBehaviour "AWARE"} forEach units _grp;
if ((random 1) < 0.5) then {_ranX = -1};
if ((random 1) < 0.5) then {_ranY = -1};
xx = random _range * _ranX;
yy = random _range * _ranY;
units _grp commandMove [(_origPos select 0) + xx, (_origPos select 1) + yy];
{_x setBehaviour "Safe"} forEach units _grp;
If (!alive _grp) exitWith {};
_timeout = time + 10;
waitUntil {moveToCompleted (leader _grp) or _timeout < time};
};
so you say its better to make a sisytem with namespace then extDB3 ?
using steamid as name of variable ?!:) and set giant string in it ?
sounds doable
cool are u interested in teaching a noob how to do so :)?
it would take like 10 years to do so
Pretty sure you need one of teh namespaces with profile in them. So no I would not use missionNameSpace. Like dedmen says above
what i could do is send you 1 of my missions: and you could rip it apart and see what i have done: and that would be a good start for your learning
i need just some independeds patrol around in defined areas , they hate blue and red ๐
let's obsolete https://community.bistudio.com/wiki/Arma_3:_Scripted_Database and redirect to those instead?
Its been a while since I've seen sqs code
small private server and not many players = profileNameSpace is fine
Open public server with many players and much data = extDB3
I think just kinda depends on what your servers constraints are and what you're also intending to store.
Using a hashmap on server would be far easier to setup and would be more efficient in saving data.
With ExtDB3 you are able to organize data better and even use it within other applications like web apps. The draw side is just that it is really old and slow, so if you were to use it; I would advise caching data and only using it to update that cached data very sparingly and infrequently.
@not alive player
We store our information in a database but we also have a crap ton of players. Realistically for smaller missions and servers using hashmap methods would be far more efficient, easier to deal with syncing wise and is entirely appropriate
its like combo altis life and exile so stuff is on the ground ... permanent
like its a lot of stuff to save, lot of things, im right now checking how to save that in missionNameSpace, and how loong can a variable be ?
@not alive player yeah Lou that = waitUntil not alive player in sqs
i want every weapon car etc to be unique, having stored owner permanent even if owner is not online etc
Putting a obsolete banner on top.
I guess the page is still useful for people who want to uset he old obsolete stuff
If you're planning for the server to be a larger multiplayer environment you will probably want ExtDB3. I would just use it super sparingly. For example cache weapons, cars and everything else you mentioned in a hashmap on server then only update database with that data on periodic intervals or even server restart.
There is also Intercept Database by the way. Which last I heard still works. But no-one is maintaining it except it fully breaks ๐
It is not old and not slow (excluding the database speed side)
As a total noob it's probably not a good idea to start right in with a big database system.
And its unlikely you'll find someone who has the time to hold your hand all the way
well thats the only way i know how to organiose data ๐ and thats working well atm, im stuck with stuff klike async calls
But if you are gonna dump non-small amounts of data regularly be sure to use the missionProfileNameSpace and not just profileNameSpace.. Had enough of missions ballooning that to 50MB and then writing it several times per minute...
Honestly also very good point
and stuff like "weapon having stored owner permanent" wont work, most items have no unique ID.
every time i type something i say to myself w8: could this be mistaken for being mean ๐
then i start over ๐
On my phone so can't fact check myself but didn't Arma also add something to support HTTP requests? Could that be used as a better alternative to stuff like ExtDB3 if I'm correct about it existing? Maybe I am thinking of a reforger framework
i apologize if it sounds like i neeed someone to hold my hand, i have chat gpt for that, i just looking for some infos on how to tackle the project, which i recived, ty
Reforger has it, Arma doesn't.
Though there are plenty of Extensions that do it. And Arma 3 will probably also do it some time in the future.
Ah okay cheers :)
omg chatGPT omg Nooo there gos your learning
soon people will get chat GPT to ride there bikes for them
i like the way Nikko does it: he gives me hell: and teaches me to understand all at the same time ๐
yes, my point
not deleting anything, just make it even more obvious
what's the script command to detect when an entire group has boarded a heli? I want to make it so that when the player and all their units board a heli, a trigger detects it and can skip the hold waypoint to begin the assault
@mellow wasp well there is no command per say: for the player and all their units board a heli: but i order all my team in the chopper: then i get in: i use this for the script to check if all players are in the chopper: ```sqf
waitUntil {sleep 3; (Helo2 emptyPositions "CARGO" == 0) or (!alive Helo2 or !canMove Helo2 or !alive Pilot2) or ({(isPlayer _x) && (isNull objectParent _x) && (alive _x)} Count (nearestObjects [Helo2, ["CAMANBase"], 300]) == 0)};
i made a complete Chopper Command if you wold like to have it: just friend me: and ill send you a demo mission
it uses no way points and all is run by radio triggers so it can be called in game at any time
@mellow wasp and if you want i'll even get on voice and explan the entire missions and how it all works ๐
it was very importante to me for the chopper to work perfect: in my missions so well you know: i worked on it and ask for help all day long: every day: and woohoo now its Awsome ๐
Dart is the guy that helped me the most: on my chopper command hes Awsome: but other people helped me also
waitUntil { units _playerGroup findIf { not (_x in _helicopter) } == -1 };
question: can i still getVariable on a player if i try it in onPLayerDisconected {}
yes, because the unit still exists.
Whether it's a player at that point is another matter, but the variables will still be there.
i can just explane in the brifeing that the time showing is false and the time in the params can be chesen
like this```sqf
player createDiaryRecord ["Diary",["Multiplayer Log","Make Sure Parameters Are Set The Way You Want"]];
player createDiaryRecord ["Diary",["Multiplayer Log","<------Check The Log Over There"]];
that's what iv been doing anyway
For the record - it looks like you can't emulate what you do with the keyboard in a script - every path fails and the STOP is reinstituted as soon as you try to order a move on a single unit in a stopped squad. Work around - have the medic leave the group to do his work - then rejoin when done.
Ah yeah, Leopard suggested that last time and I never got around to testing it. Didn't find any other way to override a player's stop command.

