#arma3_scripting
1 messages ยท Page 253 of 1
to get the actual time
Just try it out on a playground server or something
and no problemo :)
Hey guys, do you know how I can make a trigger to activate a waypoint via script?
@tough abyss no
oh thank you there -_-
np mate
by watching tutorial videos?
setCurrentWaypoint? Is that what you're looking for? Or are you looking to create a waypoint with a trigger?
I'm trying to make the "Set Waypoint Activation" option from trigger in a script
Ohh, I was about to ask. It's a pain, sometimes, for even me to get it to work (properly). One second, let me hop in the editor
Well, there's two ways you could do it. The first (and probably easier) way would be to make a trigger with your needed conditions, and a HOLD waypoint. In the "Condition" field of the HOLD waypoint, replace "true" with "triggerActivated <your trigger name>".
Alternatively, you could replace the HOLD waypoint with a MOVE waypoint, depending on what you're doing before you need to activate the trigger.
Well, upon further inspection, using just a HOLD waypoint with the method I described wouldn't work. but a MOVE waypoint would.
Does that help?
I'll try that right now and update you. Thank you very much ๐
Anyone wanna help with an Altis life server?
Tweaked: The createSimpleObject command now supports object types and plain shapes
Anyone knows more about this?
how do you give an object "gravity"? I'm trying to make it so when a player (whom is carrying a briefcase) will drop the briefcase on death, but if they die in midair, the briefcase will just stick there. If at all possible, could I make it float on water as well?
I've never really messed with weaponholders much. Do those "obey" gravity?
I guess I'm just confused as to why attaching the weaponholder would make a difference.
Thanks for your help, though, btw ๐
new
b:OBJECT setunitloadoutfromconfig CONFIG
player setUnitLoadout config
Create inventory items from given loadout config and set them to the unit.
config with loadout description
question is
is CONFIG a soldiers classname?
B_Rifleman_F
or is a "loadout config" something new
Seems strange that it would take a config and not just a classname
I'm having trouble understanding _this as used in scripts... any good tutes other than General Barron's? (That one has partially helped actually)
Well, from what I understand, _this is used when you pass variables, objects, etc into a script.
eg, you call:
null = [player, 0, vehicle] execVM "your_script.sqf"
now, if I'm remembering correctly...in your_script.sqf, it should end up like this:
<player> = _this select 0;
<0> = _this select 1;
<vehicle> = _this select 2;
Feel free to correct me/kill me if I'm wrong.
At least, that's how it's gone when I've used it in scripts.
so _this refers to something that has already been executed or passed or otherwise activated, correct?
...in a sense, yes. if you pass variables into a script, _this will be "created".
And it will be an array of variables/values in the order they were passed.
let me fiddle with your code a bit
by the way, the < >s were just a placeholder, assuming you already knew that.
yes I guessed
what's an example of something in your_script.sqf that could expect that input?
Hmmm...let me think.
will it actually write to the script?
how about null = "foo" execVM "script.sqf" -- and in script.sqf it says something like: hint <string passed from command>
I mean, it sounds a little silly, but you could pass the player, the player's damage (damage player), and a vehicle. null = [player, damage player, vehicle] execVM "your_script.sqf";
in your_script.sqf:
_player = _this select 0;
_damage = _this select 1;
_vehicle = _this select 2;
if(_damage < 1) then {_player moveInDriver _vehicle} else {hint "No dead players allowed!!!"};
Sounds really silly, but does it convey the idea?
so it passes on info to the script.sqf, which then runs with the new info?
and _this refers to each command in the script?
Correct! Whatever you pass into the script will then become part of the array "_this", which is in the script.
Command might not be the right word, but _this is an array of all the variables, arguments, and/or values passed into the script.
k i think i'm starting to see
however, if you pass just one variable like you listed in your previous message, I think _this just becomes that one variable. like if you did null = "foo" execVM "script.sqf",
in script.sqf, _this would refer to just "foo".
I may be wrong, as I've never done it with just a single variable.
how do i execute that null command? error if I do it in the debug exec with mission previewing
oh wait I have to do it properly
it worked
Awesome!
ok I'm going to write a bunch of these, you know how that makes the light go on after a while
tanks man
No problem! Honestly, with how little experience I've had, glad I could help someone!
teaching is a way of learning in fact
How do I name an actual vehicle? I tried B_MRAP_01_F instead of 'vehicle', clearly that's incorrect
well, is it a created vehicle? Just give the vehicle a variable name and pass that in.
like, if you named the MRAP "bigvehiclethingy" just pass that in place of "vehicle"
Awesome!
is there a way to put comments in the debug console? // doesn't work
Nope, you can't, unfortunately ๐ฆ
Feature request: anything but sqf for arma 4
What's wrong with sqf tho?
verbose control structures, no real error handling, the error messages that do exist are flat out wrong half the time
and the bugs
oh and it's slooooow.
What would replace it?
ideally something already established
Something something "EnScript"
But I doubt they are able to make anything better than SQF. It will be new, but still suck
Just look at the tracked vehicle PhysX in the current game
I think the biggest hurdle, too, would be porting/whatever all the commands, since there are a buttload of them. Buuuut they could take this time to consolidate/reduce the number of commands by implementing features of some commands into other commands, or creating, er, subcommands?
But hey, I'm probably talking out of my ass.
I imagine it would be too enormous a job to switch the entire development to Python
Anyone know of any in-game debug command that could be ran to fix broken buildings within a radius??
broken buildings? Or destroyed ones? Seems every time I try to set a destroyed, well, anything, I can't just do _obj setDamage 0 ๐ฆ
if the buildings aren't destroyed, I know that you can do {_x setDamage 0;} forEach nearestObjects [<object, be it player or whatever>, [], <radius>];
though that would do EVERYTHING, not just buildings...
I do the opposite of that to simulate a destroyed town ๐
Depending on the building type and damage, the building would be swapped out for a damage or ruined model. So I'm not sure if there is a way to restore the undamaged building other than creating it again.
Is there any reason (performance maybe?) ArmA handles it like that? I mean, damaged vehicles will show different model(s) as they are damaged, right? But as soon as its damage reaches 1, you can't seem to do much with it anymore.
Is there any script that works online that allows you to open doors with a key press? I'm new so if this question is dumb just let me know. lol
Thanks
Yeah @shell flame exactly!
I would just be able to press/spam "e" or something which would make doors easier to open.
Well, unfortunately the command that seems to handle various keypresses (not bound to actions, necessarily) which is findDisplay, only seems to work NOT on dedicated servers.
http://www.armaholic.com/forums.php?m=posts&q=22920 looking at this link, it seems to only work if the server isn't dedicated. I'll do some more digging, though.
Okay @shell flame thanks man! I'll check this out.
what's the correct way to do something like this: if (_myVariable == "playerVariableName") then etc.
pseudocode
What are you trying to do, exactly? I don't understand 100% :/
suppose I passed in a player name into _myVariable
then I want to test if the name is, say, "bob"
so "if the player is Bob, then do this, otherwise continue
if (name == "bob") then {foo} <optional----> else {bar};
is 'name' a recognized thing in arma or do I have to create it?
no, that was just a example variable name, my bad
What seems to be the issue?
remember that bit of code you showed me, one sec...
_player = _this select 0;
_damage = _this select 1;
_vehicle = _this select 2;
if(_player == "gunnie") then
{_player moveInDriver _vehicle;
hint "gunnie do da driving";
} else {hint "It ain't gunnie"};```
so i execVM: null = [gunnie, 0, hoonter] execVM testscript2.sqf
remove the quotes from gunnie in your code. That should fix it ๐
gunnie and hoonter are var names I gave the player and vehicle
The quotes would make it a string, so you just need the variable names!
perfect!
Anyone have an idea how to make something slingloadable (running advanced sling loading serverside), like a pallet or shipping crate?
it would be easier to get past the higher-ups if it didn't involve a mod, but that's doable too
If you wanted to do a really ghetto-ass setup you could use attachTo.
But that would probably look awful.
I plan to use ropes I think
In this code snippet:
_crater = nearestObject [player, "#crater"];
what is #crater?
Stupid question, disregard
how does one find a unique tag for making functions? like 'pAx' or 'BIS'
is there a sort of database registry?
@thick ridge are you the duda that made advanced sling loading?
nearestObject [position, type]
https://community.bistudio.com/wiki/nearestObject
"#crater" is a special type of objects. It's bullet impacts, grenade and artillery craters etc. Those actually even use the same texture, just scaled differently.
@fallen skiff https://community.bistudio.com/wiki/Functions_Library_(Arma_3) You can define your own within a mission with description.ext.
I wouldn't call this "official", but the idea is that you register unique tags http://www.ofpec.com/tags/
is there some way to check if something is valid sqf code? (with sqf itself)
run it, hope it doesn't error
i want to skip the execution in the dev console
you can't tell if something works before executing it in SQF
well these are my idea so far:
- for the watcher field do switch to "missionNamespace getVariable _text"
- if code execution should still be possible: do an "isNil _text" check and only call compile if false
- filter the string - find the last semi colon and do the check on the characters after it
- for code execution find one of the hacks/bugs where the engine doesnt report errors but just silently fails (and detect this somehow)
find the last semi colon and do the check on the characters after it
the last semicolon is optional
I leave it out to indicate something is a return value, but you can still add it and it doesn't change anything
does allowSprint and forceWalk work also on AI? or are these just for player?
well one could check if after the semicolon just whitespaces remain and in that case use the last statement prior to it
however thats such unusual usage for a watcher field to have this case ignored i think
does allowSprint and forceWalk work also on AI? or are these just for player?
I don't see why they wouldn't work, but I've only ever used them on players
Hey! Could anyone confirm if mouse keys can or can not be overwritten via scripts so that they don't do the default actions but something else?
I've got a vehicle that would need quite custom set of keys and rebinding mouse for it would be quite essential.
The posts on BIforums that I found on the subject suggested its not possible, but they were pretty old too.
they can not be overwritten
well my goal is to make a custom fire control system that would allow me to fire different vehicle weapons in predermined firegroups without actually switching weapons.
left mouse for left side weapons, right mouse for right side
so you want to overwrite LMB inside a vehicle?
yes
do you have access to the configs of the vehicle?
yes
can you make a mod out of it?
all custom stuff
here is what I'd do
you can actually overwritte "DefaultAction" by assigning a UserAction to the vehicle that uses "DefaultAction" as shortcut
wait, searching example
figures. it's not the public repo
wait
class UserActions {
class Dummy_DisableWeaponTurnedIn {
displayName = "";
position = "";
condition = "player == this turretUnit [0] && {animationState player == 'passenger_inside_3_aim'}";
statement = "systemChat str 1";
priority = -99;
radius = 1.5;
showWindow = 0;
onlyForPlayer = 1;
shortcut = "DefaultAction";
};
};
this disables LMB (prints "1" in chat for debug)
you probably will have to adjust the condition though
yes thats not a problem!
this is a super special ugly wth commy hack, you're welcome
Thank you very much sir!
Hacky methods are the salt of Arma modding
would not be the same without them
this action will appear as an invisible option in the scroll wheel menu
but you could make it something official and just add a name. then players could select it from there too... whether that makes sense or not
Brilliant ๐
does it have to be in range of the player? or could the radius be something silly small?
Just you know if I want to drop it out of the menu
or is that what actually overwrites it?
I think a player inside a vehicle has access to all action, no matter the range
Alright-o
radius = 1.5; is the default value of the addAction SQF command version
And you have to define it, otherwise the game errors out
visible pop up. "missing entry" or smth like that
no entry bin config blah
I'll give it a go.
So... the only reason for this command is to fix COOP campaign respawn by forcing a "single player mission" to be hosted?
Another single use command. they could've made a command to report the slot count instead. maybe even add a setter variant!
or fix respawn in SP, but that is probably a difficult task
@little eagle The action position has to be visible for the player so that it is registered as action, other than that it seems to work beautifully! Million thanks to you!
yw
let's hope BI doesn't break it (unlikely) This trick once worked with "Throw" (throw a grenade, G) instead of "DefaultAction"
but then a patch broke it
Yeah I hope this sticks long enough for us to get a release out
meh. it works for years now. I'm just still salty about them breaking it for "Throw"
๐
hmm unfortunately it does not seem to work with "Optics"
to disable the right mouse too
yeah, it pretty much only works with "DefaultAction". That's why I said you cannot overwrite mouse input. This is the exception
well. have to work around it then
gotta find more buttons
using left and right mouse would have been most intuitive way to do this but if it can't be done, it can't be done.
Why would it be a joke?
If you're worried about security, it only works on the diagnostic.exe that comes with the dev branch and has no multiplayer function
That information is missing on the wiki page
If you could do something like that on mp this would be the most idiotic thing arma did for a while
all diag_ commands are diagnostic.exe only
no?
diag_fps
diag_log
are MP too, normal arma
same goes for diag_activeSQFScripts
if not all of them
Please to share false information
So where do you take the knowledge that the new command does only work with diagnostic.exe ?
puhh I thought we just opened all doors
yeah, sorry. I've only ever used the ones listed there that are
~~ Does someone have an idea how to fix/workaround that Exploit? I am out of ideas... and Bohemia haven`t answered yet (Ticket opened in May... arhh). A lot of cheat guides added this to the list of available exploits.... -> https://forums.bistudio.com/topic/190914-arma-3-car-exploit/ ~~
Hey, since you guys know about scripting, may I ask if it's possible to make a mod in arma 3 that would enable a zues to change the class name of a spawned unit? For example, turn a "Heavy Gunner" into "Queen Latifah".
@warm thorn I think this has been fixed already, see https://forums.bistudio.com/topic/140837-development-branch-changelog/?view=findpost&p=3053150
but if the exploit still "works" in the RC or dev then it must me something unrelated :/
@halcyon crypt Thanks for the info! I thought, this bug still exist, as BI didn't answered to the post/ticket. I tested it and it seems so, that the bug is fixed. Anyway - THANKS BI for the fix!
@terse wraith you cannot change the class names with scripting. That is #arma3_config. You also cannot simply change the class name of an object, because it would obviously change all it's properties. Maybe you are thinking of the displayName entry? Either way, cannot change that via scripting.
Yes, thank you. That's a shame, I'd love for a zues feautre that allow that
why are GroupIcons not used more?
https://community.bistudio.com/wiki/setGroupIconsVisible
https://community.bistudio.com/wiki/Military_Symbols
as its limited per group and not per unit, and limit to icons defined in cfgGroupIcons?
performance wise this engine solution should be best/fastest/most optimized or not?
Honestly because you keep running into problems with them.. or at least I did
Might as well have manual marker system yourself
thanks for the input!
this is why i dont like engine solutions in general; lack flexibility, are designed with too narrow focus and BI moves on after their simple requirements are fullfilled
that said performance optimized 2d and 3d marker drawning/update engine support would be useful
the unit specific 3d markers are from eden, right? (or Zeus - sorry not familiar with these things)
3:06 for each infantry for example
the circular 3d markers
so its can be used per unit, or it just a single unit per group?
like a groupIcon is usually the NATO markers (which i saw too, no?)
reading the feature list now - it sound very comprehensive and configurable; is there a point to offer unit tracking (more than my basic system) if your mod already takes care of that anyway?
there are still some things listed in the future development - are these to happen eventually or you consider it done for now?
yes already done that thanks. an idea could be to hook into your mod/extend it when its active next to DevCon
userconfig is no longer recommended these days AFAIK
@little eagle please advise
it allows abuse and one can make things configurable now ingame via the options menu fairly easily as far as i know
i am not sure how filePatching disabled by default impacts this atm
in DevCon i read 4 external sqf files for user configuration
actually 5 - 1 autoInit and 4 for F9 to F12 usage
is https://community.bistudio.com/wiki/targetKnowledge also limited to map=1?
btw targetsAggregate does strike me as related to targetsQuery or targetKnowledge
i guess someone linked it wrong
is there a FT ticket for targetsQuery?
neat that getHideFrom is said to work now
thanks. will see if what i can do (probably nothing but lets see)
Guys, what would be the best way to detect if the direction changed by at least 60ยฐ using getCameraViewDirection or 3D direction vectors overall
private _startDir = vectorNormalized (getCameraViewDirection player);
private _directionChanged = {
params ["_startDir"];
private _currentDir = vectorNormalized (getCameraViewDirection player);
_dis = _startDir vectorDistance _currentDir;
if (_dis > 0.167) then {true} else {false}
};
would that deliver what I want? (0.167 * 360 = 60 btw)
huh, what, where who?
vectorCos is a horrible name for a command
it doesn't even do cos
it's actually the dot product of the unit vectors
You can acos that to get the angle between two vectors
getCameraViewDirection already reports unit vectors, so you might as well just use vectorDotProduct
@little eagle what to do instead of userconfig these days?
Does anybody know how ctrlSetText will behave if passed an invalid image location
error pop up iirc
@velvet merlin idk, ACE has it's own framework, which will eventually replaced with this: https://camo.githubusercontent.com/f26196520030e5de7ae246796092f5a59eb04b28/687474703a2f2f692e696d6775722e636f6d2f34396c434966562e706e67
it's in CBA
https://github.com/CBATeam/CBA_A3/pull/317
@tough abyss
you can disect this pull request, but it's a bit complicated if you're not used to macros and stuff
thanks
according to bi wiki, description.ext "uses the same syntax and structure as the Config.cpp file, but supports only a limited number of the full set of Config.cpp classes." Is description.ext necessary then? or desirable? what is best approach?
description.ext is for missions, config.cpp is for addons
you cannot interchange them. description.ext does nothing in an addon* and config.cpp does nothing in a mission
- except for missions and campaigns in addon pbos ofc
understood thanks
Anyone know if there is a eventhandler fired during a #missions command?
Is there anything else that triggers during then, basicly need a script to run if that happens ( might not be possible by the looks of it)
I don't think so. No.
description.ext is not referred to in the wiki page on Initialization Order. Am I right in guessing it is read before everything else in the mission or mpmissions folder? even before init.sqf (if present)?
description.ext is always present. there is no time where it gets executed or anything
i am looking at a tute that has this in description.ext:
{
#include "functions\functions.hpp"
};```
where functions is a folder and functions.hpp is a file in that folder
just make a "functions" folder and put a "functions.hpp" file there
no need to #include it?
you are including it in your example
you can put that fragment into the decription.ext
oic ... yes it's already done and working, i was just wondering about the order of engine handling it
the functions are precompiled in order they appear in the config
if you don't write a description.ext, does the engine automatically create one, or behave as if it's there?
if you use preInit = 1; the function will be executed in unscheduled environment in frame 0
you mean in config.cpp?
if you don't write a description.ext, does the engine automatically create one, or behave as if it's there?
it uses an empty one
ok
you mean in config.cpp?
CfgFunctions can exist in config.cpp and description.ext
ok
if you use postInit = 1; the function will be executed in scheduled environment after the mission objects are created (and the player object is transfered in case you are a player)
and that would go also in description.ext (or config.cpp)?
It's for the individual functions in CfgFunctions
k
every function can have preInit and/or postInit
the description.ext itself never really is executed as I said
It just exists and stuff is / can be read from there
so it's not too important to know exactly when the engine is reading it? (certainly very early on in start process)
it always exists. before anything SQF can be executed.
ok
the mission can't even start without this file being downloaded from the server (or taken from the missions cache)
does that apply only to mp?
hard not to when you're floundering around as a beginner, but you've certainly answered my questions
I feel this may be a really retarded question -- but is steam the only way players can connect?
IE, will I be able to call getPlayerUID is all cases?
if I had some event check getPlayerUID that turned up empty or non-steam looking IDs, I wouldn't be fucking over legit players by kicking them?
everyone has to run steam.
\o thanks
there's something called tunngle but I don't think it is steam approved
How would I go about creating a icon in a ui that changes the background color if variable is met. I.E. heart icon, when full health background is green, when half health background changes to yellow/orange, and when low on health changes to red?
That brings up the ARMA 3 UI editing
Which isn't nearly as well documented or easy as other things
For the icon, I've just always used Paint.Net
just remember that it needs to be a power of 2 on each dimension
and the alpha channel can only be 1 bit
then import it into TexView
from BI Tools
you know in dev IDEs you have a 'watch' window which displays your variable values as you step through prog; anything like this possible in Arma 3 scripting?
The vanilla debug console has "watch" fields, but it'd be difficult, if not impossible to try and look at it while a script is running, unless you were checking valued between scripts running or if there was some type of delay.
You'd be better manually printing the values from within the script using systemChat, diag_log, hints, or an extension like Killzone Kid's debug console http://killzonekid.com/arma-console-extension-debug_console-dll-v3-0/
i'll try it thanks
UIs are very well documented actually, I learned pretty much everything off VBS wiki back in the day.
@meager granite but with just enough hiccups to really let someone go digging rabbit holes for hours for a simple fix -- namespace hopping to push updates, idc assignments, etc
but such is Arma
oO
Anyone know of a way to get toggleable smoketrails on vehicles?
Somebody knows how I could do a Playercharacter to dialog script?
wanna do something like the DayZ Inventory.. so that the Character gets rendered into a dialog
I could only think of PiP but it looks crappy
hi here! called me the Say3d command works in multiplayer?
god damit discord
say3D works in MP, but you have to execute it on every machine, as the command has only local effects
[<from>, <sound>] remoteExec ["say3D"];
from: Object - origin of the sound
sound: String - classname of the sound to be played. Defined in CfgSounds including Description.ext
ok
I'll try it on, thank you
showGPS false;
showMap false;
while {true} do
{
while {!("ACE_Map" in weapons player)} do {sleep 5;};
showMap false;
while {"ACE_Map" in weapons player} do {sleep 5;};
};`
anyone know if this Arma 1 script still works ?
never mind
In ArmA 2 - This command no longer works. The map is now an inventory item. It is kept under the weapon class name "itemmap".```
I'm trying to create a delievery script which uses the "format" command as well as the "selectRandom" command, and would like to use the "createMarker" command on whatever the outcome the "selectRandom" command comes up with how would I do this...
this is what I have so far:
_warehouse = format["warehouse%1"];
_delivery = selectRandom _warehouse;
would that even work?
A question for my own sake off your code -- I see percentages a lot in quotes, what does that define?
Lets say I have three warehouse buildings on a map, one is named warehouse1, next is warehouse2 and the third is warehouse3
_array = [1,2,3,4,5];
_text = format ["Numbe is: %1",(_array call BIS_fnc_selectRandom)];
hint _text;
Oh, I see now.
It defines everything past the percentage as a random variable defined with _array?
I'm not at home right now, but I'll jot this down for myself.
variable number one might say, so "warehouse%1" basically means the buildings share a common name "warehouse" just followed by a number
yeah _text in my example would be "number is: 1" if number one is randomly selected.. could be "number is: 4" or whatevers in the array
That's what I thought. Thanks for the information.
_delivery = selectRandom _warehouse;
createMarker ["markerName", position _delivery];
would that create a maker on whatever the selectRandom command selects?
That's not how format and selectRandom work.
You haven't given format any value to replace the %1 with, and you can only use selectRandom on arrays.
woops, I forget how I did it with the elevator script that EagleDude and myself worked on.
So two alternative options, first you could have an array with all of the full warehouse names, then use selectRandom to get one and create the marker from there.
Alternatively, you could just use random and round the number to fit within your allowed values, and then use format to place the number into the warehouse string, and finally create the marker from the formatted warehouse string.
could you show me an example of the alternative way?
I understand what you're saying, but at the same time I don't, if that makes any sense, lol
Not at the moment I'm on mobile, but just look at the notes on the wiki for random, it will tell you how to get a random number between a range of values.
k
I can show you as its not that time consumeing what will the markers need to show next to certain warehouses?
just a simple marker on the map over the warehouse that gets choosen
Im asking how will the script know hte location of the warehouse?
I guess where the warehouse is on the map? the warehouses are spread around and are named warehouse1, warehouse2, warehouse3, and so on
the map marker needs a postion ๐
you can find that postion in sevral diffrent ways
what's the easiest way, this is going over my head for some reason, I think I'm having a mind blank, lol
go around the map and copy your current postion I guess (copytoclipboard str (getpos player))
chose a few locations youi want the markers to appear
wait wut
is there a way that it'll automatically generate the position of the buildings on start of mission? I'm trying to get this script to work with other maps as well
yes there is
that way if another community member uses the script all they'll have to do is use the same naming format/convention
there is you probs dont want to run search if you dont have to though so you might limited the locaitons to a certain area of the map
_myLocations = ["warehouse1", "warehouse2", warehouse3" ];
_myMarkerLocation = _locations call BIS_fnc_selectRandom;
place an empty marker with those names
k, how would I use _myLocations with the "format" command?
i think @carmine sonnet already told you if you scroll up
no postions are not string
well grab the information inside the variable myMarkerLocation and turn it into a string with format
then use to display whatever text
k, so then if I wanted to add more warehouses I'll have to edit the array, got it
if you want to create more locations yes but you can spawn in lots of warehouses in the same location
at random places or pre defined places within that marker x radius
k
and I just found the script for the elevator doors:
_doorLName = format ["ElevatorDoor%1L", _door];
_doorRName = format ["ElevatorDoor%1R", _door];
elevObj animate [_doorLName, 1];
elevObj animate [_doorRName, 1];
well I just put that there so you guys could see how we were able to generate all the door names without an array with all the names of the doors in it, lol
Anyhow back on topic, lol:
_myLocations = ["warehouse1", "warehouse2", warehouse3" ];
_myMarkerLocation = _myLocations call BIS_fnc_selectRandom;
so with the this code, how would I go about putting a marker on the warehouse the BIS_fnc_selectRandom picks?
_myNewMarker = createMarker ["name of the marker", _myMarkerLocation];
k, thanks
_myNewMarker setMarkerShape "ELLIPSE"; and so on....
it's been a hot minute since I've scripted, lol, I've been modeling buildings for so long, lol
that would not work as _myMarkerLocation is string
so these markers are on the map already?
that makes it really easy
no
no?
the buildings are on the map and they're named
are you placing empties ?
if you ever played Altis life and did the delivery jobs, I'm trying to go off of that
k
where you have to sling a load to an AI and drop it within a range etc
just use an empty marker
you can use that info to generate random locations
_myNewMarker = createMarker ["name of the marker", getMarkerPos _myMarkerLocation];
that would work ๐
yup must be postion: https://community.bistudio.com/wiki/createMarker
position: Array or Object - format position: Position3D, Position2D or Object
I have it in mine im working on right now
and I do grabthe value with getMarkerPos just didnยดt type that in... ooops ๐
kinda important lol
so do I get the markerPos by this: _myNewMarkerPos = getMarkerPos _myMarkerLocation;
This is what I have so far, and the names in _myLocations array are the names of the buildings on the map, there are no markers on the buildings. Am I suppose to create an empty marker on each building for this script to work?
_myLocations = ["warehouse1", "warehouse2", "warehouse3" ];
_myMarkerLocation = _myLocations call BIS_fnc_selectRandom;
_myNewMarkerPos = getMarkerPos _myMarkerLocation;
_myNewMarker = createMarker ["Destination", _myMarkerLocation];
"Destination" setMarkerType "hd_objective";
marker pos needs to go where it says _mymarkerlocation on the createmarker line
if there is an empty marker there already you dont need to create one either you could just set the text of the existing marker
something like this:
if (!isNil "myMarker") then {
myMarker setMarkerText "";
};
_myMarkerArray = ["warehouse1", "warehouse2", "warehouse3" ];
myMarker = (_myMarkerArray call BIS_fnc_selectRandom);
myMarker setMarkerShape "ICON";
myMarker setMarkerType "hd_dot";
myMarker setMarkerText (format ["Current Warehouse: %1",_myMarker]);
really cant tell you anything else as you dont seem to know what the variables in the script are.. kinda hard to make any progress
the _myMarkerArray variables? If so they are the names of the three warehouses placed on the map.
they can't be objets are not string
they must be marker locaitons
myCar = this;
_myMarker = "markerOne";
k
so they will not be the buildings themselves that much I can tell you
could be config entry paths to a tabel of locaitons
duno without seeing it
k, thanks, I'll go and try this out, I've created the empty markers on the buildings and named them, and then used what you texted a few messages ago.
that should work
thanks again and sorry for the trouble, it's been a good 4-5 years since I've dived into scripting like this for ArmA
np
sounds like your probs best makeing your own thing anyway if your not sure about what your looking at
might be easyer
k
you'll need to maker the marker name a global variable and delete it beforeing running the script if your gonna run it sevral times (doing it your way that is)
other than that cant really think of much to add sure you can prettyfy it yourself
@empty harbor
Why ping him?
Any way to to Show a unit inside a dialog like the DayZ SA in the inventory?
Yeah but how to access that object.. I need to edit the soldier loadout
But thanks in the first place
Well i don't think the unit is a valid player so gear commands probably won't work
You'll probably need to go the ASOR gear selector method
Ez question. What's the cleanest way to get waypoints to actually be on the place that's clicked on the map. I got the following code, but if you place it on a location that has rocks or trees it has a habbit of moving to a different location again. NO idea why the fuck this happens in arma, but w/e
addMissionEventHandler ["MapSingleClick", {
params ["", "_position", "", "_shift"];
if (missionNamespace getVariable [QCGVAR(ctrlPressed), false]) then {
VAR(_group) = group PRA3_Player;
if ((leader _group) isEqualTo PRA3_Player) then {
while {(count (waypoints _group)) > 0} do {
deleteWaypoint ((waypoints _group) select 0);
};
VAR(_waypoint) = _group addWaypoint [_position, 0];
using setWaypointPosition didn't help
- if you remove all waypoints, it will add [0,0,0] (at least before A3), so best to add the current position as first waypoint after the delete all
- the position adjustment is likely due to AI pathfinding - nothing you can influence itself
what you can do is cache the position and if the waypoint is off too much, recreate it with a random offset - repeat until success (or x tries)
aw cmon... since when is items player CaseSensitive?? -.-
and since when is it "Medi__kit" and "ToolK__it" -.-
dpfsgndpisfgndfsgn
Noticed that Monday as well.
hey, i have a problem with params. I do : ```
_plate = "ABC";
_model = "Offroad";
_BtnSend buttonSetAction "[parseNumber ctrlText 3782, ctrlText 3783, _model, _plate] call KL_fnc_vehTicketAction";
But in my KL_fnc_vehTicketAction i have : ```params ["_amount","_reason","_model","_plate"];```
I get : amount,reason,any,any
Any idea ?
Cause the model doesn't take local vars.
_BtnSend buttonSetAction "_plate = 'ABC'; _model = 'Offroad'; [parseNumber ctrlText 3782, ctrlText 3783, _model, _plate] call KL_fnc_vehTicketAction";
Test that out.
If it doesnt works -> Make the 2 Vars global.
like "UM_Plate" / "UM_Model" -> in _BtnSend -> _Model -> "UM_Model" etc
@elfin bronze
@willow basin Was sitting here for about an half hour... scratching my head like a monkey.. wondering why one items player works, the other one not...
Ok thank you
anyone here play Exile and knows why the zeus interface won't ever load even tho there is a module in place? and in SP test it even says curator owner not set?
did you link it ?
@tough abyss because the curator owner is not set
you need to give a name to the unit you want to use as zeus and then write the namer into the 'owner' field of the Zeus Module
yes, that would be my player uid
setting it a player won't work because there is no lobby in Exile
I have made my first script! It's a bare bones dialog. Suppose someone wants to see it in action for themselves, how do I pack it up for distribution?
you upload it ?
Steam, PWS, Armaholic
We (BWA3) use google drive. We (CBA,ACE) use github, but I guess that doesn't help in this case
you mean all the files in the folder? description.ext, dialogs.hpp etc etc
maybe I haven't actually got it in the right form yet
Well, if it's using a description.ext it's probably a mission.
yes I think it's a mission, with a little addaction dialog
it's in mpmissions, folder named pax3.VR
If it's a finished mission you export it via 3den. There will be a <mission_name>.pbo somewhere (no idea)
oh yes that rings a bell
"Export"
will that include all the other files?
k i'll try it now
the exported mission runs, but it doesn't include the dialog I scripted
are you absolutely sure that you didn't rename it? the name has to be the exact same, otherwise all files except mission.sqm are lost
cause this game is *****
not renamed, i checked -- I think the problem is confusion between the mission being in both user/documents path and steam path
the Eden editor opens my mission from the user/docs path
I'm not sure about which files appear where. I don't make missions
#arma3_scenario I guess
good idea
what I'm trying to do is be ready to show someone my working dialog, perhaps mission is not the best way to do it?
they would download, insert and run the mission. that sounds right, doesn't it?
yes, once I figure out how to do it correctly ๐
but if I sent someone the whole subfolder -- I mean: E:\Steam\steamapps\common\Arma 3\MPMissions\pax3.VR -- they could run it right?
it contains mission.sqm and all the files necessary to run my dialog
they could. but that sounds annoying.
you cannot upload folders anywhere, so you'd have to zip or rar it
ok i'll ask in mission makers for more elegant way
What's the snazziest way to update JIP clients with changing variable assignments?
@tough abyss Invade&Annex has a piece of code "addcuratorEditableObjects" in all the scripts where units are spawned, so that these can then be zeus controlled. Exile might not have (i dont know)
hm I'll go through the mod then and see what they did
What's the snazziest way to update JIP clients with changing variable assignments?
publicVariable and setVariable public I'd say.
So there is still no reliable way to move out dead body out of a vehicle?
I know of hacky approaches of moving invisible unit into the seat occupied by dead unit but it gets very complicated with dead vehicles as only moveInAny lets you move unit into destroyed vehicle
Simple - to be able to loot them
And I'd like not to move them out right after they die (while they still have "ai brain")
No you cannot move out dead bodies with setPos
getUnitLoadout -> deleteVehicle -> createVehicle -> setUnitLoadout -> setDamage 1
is the best I can come up with then
but I guess deleting players is not a good idea
Removing dead units from vehicles is very difficult technology. Arma 4 seems a bit optimistic
Didn't know 4 was out yet
It's not.
You will need at least i7 6700 to be able to remove bodies out of vehicles with Arma 4
but thats bordering on ridiculous, just to get body from vic aka arma scripting in general?
If you weren't worried about bodies in destroyed vehicles, I'd suggest adding the unit's inventory to the vehicle's
You'd remove it from the body
Added: A new "Fired" Even Handler for muzzle config (example: CfgWeapons/Default/Eventhadler/init = "hint str _this")
sweet
lots of games do it like @buoyant heath just wrote, i was going to suggest that aswell
Speaking of inventory stuff, is there any halfway decent way of figuring out which container is open in the inventory? ie: which vehicle/box/backpack you opening from the ground list?
There is no reliable way
isnt there an eventhandler for that ?
I've been asking to extend InventoryOpened to include both opened containers for 2 years now
Well, brute force it is then.
You'd think there'd be a way to check the control for which inventory it's pulling data from
Unlikely, probably hardcoded without any traces in the dialog
On a scale a 1 to horrifying, how would you rate: forEach container in range - add an item to the container, and see if that item shows up in the list
Full horrifying as you cannot remove single item after you add it
You can do some black magic trickery by having an invisible unit do "TakeMagazine" on it to remove it back but this is horrifying ^ horrifying
Ah, this is scaling exponentially. Very ~nice~ terrible.
Wouldn't a custom item work with removeItem afterward?
Before set\getUnitLoadout in order to fully save player inventory (including weapons with attachments and loaded magazines inside backpacks) I had to have invisible server unit which was entering and exiting invisible vehicle each frame which would create needed weapon, add needed attachments and magazines and then do DropWeapon into target backpack to 1:1 recreate saved inventory.
removeItem works only on units, not containers
entering\exiting vehicle each frame was needed to skip DropWeapon animation
Added: A new "Fired" Even Handler for muzzle config (example: CfgWeapons/Default/Eventhadler/init = "hint str _this")
thanks... now do it for CfgAmmo, where it would actually add something new and usefull
Hey there,
is it possible to change the "typing speed" in the fnc_type Text function?
The wiki lists "#define DELAY_CHARACTER 0.06;" or "#define DELAY_CURSOR 0.04;" but they are either not working or I am just to stupid to implement them proberly (my money is on the latter)
https://community.bistudio.com/wiki/BIS_fnc_typeText
That #define is probably just there because of a bug with the wiki export function. I don't think there is a way around that define, so I think your best option is to open the file for that function, then copy and paste the script into a new file you make and change the delay value.
you cannot change those without editing the file. They are macros and replaced when the function is preprocessed
Thank you very much for the input!
@grizzled cliff if you can provide some documentation for the whole architecture of intercept and how things interact with each other then someone will probably step up to keep things alive. ๐
My interest is there but it's lacking deeper documentation that's keeping me from actually doing something with intercept ๐ฆ
new: u:getunitloadout CONFIG
Someone know how to make when passing the cursor (hover) will change the image? On dialogs
@halcyon crypt ยฟAny funtional example?
try using onMouseEnter and onMouseExit
sth like: (not pretty but short ๐ )
onMouseEnter = "(_this select 0) ctrlSetText 'HoverImage.paa';";
onMouseExit = "(_this select 0) ctrlSetText 'NormalImage.paa';";
if those two wont work, use onMouseMoving and use the second Param
@torpid pond
np
how would I go about using the "format" command within setSimpleTaskDescription?
if (!isNil "myMarker") then {
myMarker setMarkerText "";
};
_myMarkerArray = ["Varnville", "Kohler", "Keysville"];
myMarker = (_myMarkerArray call BIS_fnc_selectRandom);
myMarker setMarkerShape "ICON";
myMarker setMarkerType "mil_dot";
myMarker setMarkerText (format ["Current Warehouse: %1", myMarker]);
task = player createSimpleTask ["Deliver Package"];
task setSimpleTaskDescription [
"Deliver the package to (format [' %1', myMarker])",
"Deliver Package",
"Destination"
];
task setSimpleTaskDestination (getMarkerPos myMarker);
task setTaskState "Created";
player setCurrentTask task;
_unit = "C_Nikos_aged" createVehicle getMarkerPos myMarker;
_unit setDir 270;
_unit addAction ["Drop-Off Package", "deliverEnd.sqf"];
Is it possible to move radio triggers to the ace interaction menu, instead of the 0 menu?
@tender root Doesn't work...
Anyone can help?
class top: RscText
{
idc = -1;
style = ST_PICTURE;
text = "top.paa";
x = 0.125;
y = 0;
w = 0.75;
h = 1;
onMouseButtonDown = "hint 'Hola'";
onMouseEnter = "(_this select 0) ctrlSetText 'topActive.paa';";
onMouseExit = "(_this select 0) ctrlSetText 'top.paa';";
};
doesn't work ๐ฆ
Error in expression <loc = _this select 3;
_unit _this select 4;
_message = f>
Error position: <_this select 4;
_message = f>
Error Missing ;
Error in expression <loc = _this select 3;
_unit _this select 4;
_message = f>
Error position: <_this select 4;
_message = f>
Error Missing ;
case 6: {
if (side player != east) exitWith {};
private[""_message"",""_loc"",""_unit""];
_loc = _this select 3;
_unit _this select 4;
_message = format[""!!! PMC Emergency Number: %1"",_msg];
hint parseText format [""<t color='#FFCC00'><t size='2'><t align='center'>Incoming emergency<br/><br/><t color='#33CC33'><t align='left'><t size='1'>From: <t color='#ffffff'>%1<br/><t color='#33CC33'>Coordinates: <t color='#ffffff'>%2<br/><br/><t color='#33CC33'>Message:<br/><t color='#ffffff'>%3"",_from,_loc,_msg];
[""PmcMessage"",[format[""Emergency of %1"",_from]]] call bis_fnc_showNotification;
}
&&& MORE CODE BELOW &&&
Where is the error coming from?
forgot =, after _unit. exactly where it told you.
I'm trying to get the vehicle respawn modules to fire code when the vehicle respawns but I'm having som locality issue I believe. When the vehicles respawn the code is not visible to the clients (on dedicated). (_this select 0) remoteExec ["RP_fnc_MobileRespawn_Respawn"]; is what I have in the Expression field of the module and this _this addaction["<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\gear_ca.paa'/><t color='#FF8000'> Virtual Arsenal</t>", {["Open", true] call BIS_fnc_arsenal},[],1.5,true,true,"","(isTouchingGround _target && speed _target <= 0.5)"]; nul=[] execVM "IntLight.sqf"; zeu_1 addCuratorEditableObjects [[_this],true]; is the function. the add action does not appear for the clients. Help please ๐ฉ
problem with dialogs.hpp class RscPicture: I thought that .paa files could have their transparency set? No matter where I put the number ( 0 < (float) < 1), in dialogs.hpp or in the settings for .paa image with Texture Viewer, the result in the running script has the exact same transparency even if I set it to 1 for completely opaque
should i be adding something to this statement?
text = "mypic.paa";
seems to be working now, probably just a save thing (grumble)
Anyone have idea why ctrlSetBackgroundColor and ctrlSetActiveColor doesnt apply to control buttons even if I commit change? (Text & Action can be overriden without problems)
@digital ibex tried it with another control type like RscText ?
(Just to make sure you're using the command in the right way)
@tender root I've created custom control with type eq 1 which refers to CT_BUTTON. Regarding to https://community.bistudio.com/wiki/DialogControls-Buttons it should be allowed doing this. But I'll try changing it with some default controls and make sure its not the problem.
Yup it's BIwiki with outdated page or Bohemia that messed with command and did something bad. It didnt work on any button classes but at least its working for CT_STATIC which refers to background back. I'll just do transparent buttons with alpha background and use CT_STATIC controls to give it colors, thanks anyway.
Is there anyway to have inline code comments in the debugger?
When debugging I have to remove all comments from my source files, which is a bit annoying ๐ฆ
Is there a bug with positionCameraToWorld and return NaN? Maybe when used together with Track IR?
Thanks @tough abyss
Trying to check if the side of a unit is the same as its killer, this is not working though. Any suggestions ?
if !(side _unit isEqualTo side _killer) then
{
playSound selectRandom ["tm1_killed_team1","tm1_killed_team2", "tm1_killed_team3", "tm2_killed_team1", "tm2_killed_team2", "tm2_killed_team3"];
sleep 1;
playMusic selectRandom ["Death1","Death2","Death3", "Death4", "Death5", "Death6"];
}
side group _unit
side OBJECT returns SIDE_FRIENDLY when captive and SIDE_ENEMY when being a rogue
So ALWAYS use side GROUP
Oh and make sure you are operating in suspendable (scheduled) environment when using suspension commands (sleep, uiSleep, waitUntil), becas
because they are unusable otherwise and event handlers like "killed" are executed in unscheduled environment by default
there should be an error message in RPT and on screen
Ok so instead of sleep I should use waituntil?
testFunc = {
params ["_unit"];
params ["_killer"];
playSound selectRandom ["tm1_killed_self1","tm1_killed_self2","tm1_killed_self3", "tm1_killed_self4", "tm1_killed_self5","tm1_killed_self6","tm1_killed_self7","tm1_killed_self8", "tm1_killed_self9", "tm1_killed_self10", "tm1_killed_self11","tm1_killed_self12","tm1_killed_self13"];
sleep 1;
if !(side group _unit isEqualTo side group _killer) then
{
waitUntil {
playSound selectRandom ["tm1_killed_team1","tm1_killed_team2", "tm1_killed_team3", "tm2_killed_team1", "tm2_killed_team2", "tm2_killed_team3"];
playMusic selectRandom ["Death1","Death2","Death3", "Death4", "Death5", "Death6"];
}
}
};
Is that in your code block for you eventhandler?
One sec I will edit it
ah i see
so you use somthing like this for eventhandler?
mySoldier addEventHandler ["Killed",testFunc]
This is what I am doing in debug console
{
if (side _x isEqualTo WEST) then
{
_x addEventHandler ["Hit", {[_this select 0, _this select 1] call testFunc;}];
};
} forEach allUnits;
In the description.ext, what the hell does
__EXEC (MISSION_ROOT = __FILE__ select [0, count __FILE__ - 15])
mean?
also your params on top can be in 1 array params ["_unit","_killer"];
use this for proper code line:
` <code> `
and this for a code block:
```
<code>
```
__EXEC is a preprocessor config only command
it allows the execution of SQF code when the config is preprocessed
__FILE__ is another preprocessor command that also works in SQF
it reports the file name
the select is probably meant to cut of "description.ext`
which is exactly 15 characters. So you end up with a config entry named like the path to the description.ext
pretty smart, but idk for what it would be used
I think its actually being used for things like #include referential path (mission_root + "GUI/" for example).. assuming Im interpretting it properly.
to allow for more preprocessing execution, perhaps?
the default path would be sufficient. and this would be the exact same as the default path
Hi, i been developing in Java/c for a while now as well as a few other languages. what the ebst way to pick up the syntax?
practice?
Get the tools (like VSCODE with SQF language pack, pbo manager) and start making scripts. add a scroll menu item, give it a priority, attach a script, learn what other missions do and start adding on to your script pool.
I have a playground mission where i test random crap.
this addAction[localize "STR_Shops_PMC_Item",life_fnc_virt_menu,"pmc_item",0,false,false,"",' license_pmc_pmcgeneral && playerSide isEqualTo east'];
this addAction[localize "STR_Shops_PMC_Clothing",life_fnc_clothingMenu,"pmc_clothing",0,false,false,"",' license_pmc_pmcgeneral && playerSide isEqualTo east'];
this addAction[localize "STR_Shops_PMC_Weapon",life_fnc_weaponShopMenu,"pmc_weapon",0,false,false,"",' license_pmc_pmcgun && playerSide isEqualTo east'];
I think i screwed something up, any help?
It's saying
Error Missing ;
I have more init code if you need
Thanks @little eagle and @distant egret for the help.
I can't see where the semi colon (;) i need to put goes...
this addAction[format["%1 ($%2)",localize (getText(missionConfigFile >> "Licenses" >> "pmcgeneral" >> "displayName")), [(getNumber(missionConfigFile >> "Licenses" >> "pmcgeneral" >> "price"))] call life_fnc_numberText],life_fnc_buyLicense,"license_pmc_pmcgeneral",0,false,false,"",' !license_pmc_pmcgeneral && FETCH_CONST(life_pmclevel) >= 1 && playerSide isEqualTo east '];
I don't either. horrible formatting. fix that and you'll probably find it ; )
nope, your code. use a newline after each comma and indent stuff inside brackets
I bet you'll find it yourself if you do
Then Tonics formatting is shit. He's no saint
Ik
Error in expression < !license_pmc_pmcgeneral && FETCH_CONST(life_pmclevel) >= 1 && playerSide isEqu>
Error position: <(life_pmclevel) >= 1 && playerSide isEqu>
Error Missing ;
in your script
It's an init code for an NPC
you cannot use macros in init boxes
you can use macros only in preprocessable files
what a waste
you do the same the preprocessor would do by hand
you replace
FETCH_CONST(var) with (call var)
and var can be anything
This..
this addAction[format["%1 ($%2)",localize (getText(missionConfigFile >> "Licenses" >> "pmcgeneral" >> "displayName")), [(getNumber(missionConfigFile >> "Licenses" >> "pmcgeneral" >> "price"))] call life_fnc_numberText],life_fnc_buyLicense,"license_pmc_pmcgeneral",0,false,false,"",' !license_pmc_pmcgeneral && FETCH_CONST(life_pmclevel) >= 1 && playerSide isEqualTo east '];
To..
this addAction[format["%1 ($%2)",localize (getText(missionConfigFile >> "Licenses" >> "pmcgeneral" >> "displayName")), [(getNumber(missionConfigFile >> "Licenses" >> "pmcgeneral" >> "price"))] call life_fnc_numberText],life_fnc_buyLicense,"license_pmc_pmcgeneral",0,false,false,"",' !license_pmc_pmcgeneral && (call life_pmclevel) >= 1 && playerSide isEqualTo east '];
?
looks good to me
Alright, will test
For addAction, how do I get it to use the new Apex interactions with the egg timer thingy e.g. "Hold down spacebar to download intel"
Or is that a different interaction class ?
Do you have to have the Apex DLC to use that?
no its in the base game
Kk
someone wanna help me create rainbow wave text color ...
_vehicle say3D [_randomRadioChatter, 1];
Works fine but I can only hear it when in 3rd person view of the vehicle. When I goto first person I can barely hear the radio chatter. Any ideas?
As a passenger
Hey everyone, I have a question about a script help (the altis life framework by tonic). There is this file called fn_restrain.sqf for cops where basically cops can restrain other people, I want to do that the cops needs the item handcuff in his inventory (I have already added it). But I don't know what I should add in the if statement so it looks for items, I watched the repair script it was like life_inv_toolkit but I don't think it's the same for items. Any idea?
if ("BreachCharge_Remote_Mag" in Magazines Player) then {
so items are magazines+
Many times, you may have to play around with it a bit
The item doesn't have classname, it's just a normal name on it called handcuffs that's how all the items are like redgull
It has to have a classname
It's not a item that u have in the inventory
I don't mean by that
I mean item by the one you have in like your tablet, not sure if you have played altis before but if u have you can open like a tablet and you can have items and they only have a string
don't really know how to explain it lol
Thats probably the display name
You'll need the classname
You may need to look through the config
it's not that kind of item
it's not an item like a toolkit
it's a cargo item basically
you won't be able to help me if you haven't used tonic framework or played on altis
Like a virtually inventory?
kind of
like
you can't have in it the bag or clothes
it's just a item that u can see and use for like drink
yea so a basically a virtual inventory
not sure then, you'd have to look at how tonic set that up
i'll keep digging
okay ty
Is there anywhere a full list of camCommands ?
I'm trying to do a little dialog triggered by addAction (scroll wheel menu); it triggers correctly, but freezes the game. enableSimulation = true; is not working. What might I be doing wrong?
Anyone can help me?
Doesn't work:
class top: RscText
{
idc = -1;
style = ST_PICTURE;
text = "top.paa";
x = 0.125;
y = 0;
w = 0.75;
h = 1;
onMouseButtonDown = "hint 'Hola'";
onMouseEnter = "(_this select 0) ctrlSetText 'topActive.paa';";
onMouseExit = "(_this select 0) ctrlSetText 'top.paa';";
};
Hello?
@slate vale in Core pmenu I think, there's a use item sqf file
That file
Or,
Find where the restrain action is
Add a check to see if the person has a handcuff
(I'd provide a snippet of code that I use for painkillers... Except I'm on my phone)
If so, take the handcuff then run the code
so I'm trying to get an RPT to create after I do something in the editor, but it's not populating. Any idea why?
Trying to capture a position which is set on a trigger ๐
What do you mean "an RPT to create after I do something"? As in you want to write something to the RPT?
diag_log format ["this setDir %1; this setPosASL %2;", getDir player, getPosASL player];
and its suppose to give me the value in the rpt. I do not have an up to date rpt.
And are you looking in %userprofile%\AppData\Local\Arma 3?
Yes. Last 2 files created in there are 4 hours ago; rpt and mdmp
anyone knows a good link regarding cba/custom script macros? Just trying to understand a lot of magic i stumbled apon.
note to self; never turn off logs in parameters again.
Anybody have a link to a drag script so i can drag incapacitated players?
yeh, but one that works for incapacitated units
can anyone give me a usecase for this: https://dev.withsix.com/docs/cba/files/main/script_macros_common-hpp.html#GVARMAIN
Hi guys how can i see a groupid in game while using mission editor?
@proud python it will create a global var that isn't "tied" to a component
what are the implications of a global variable being tied to a component? accessability from another component?
what does define a component in this case?
well, taking ACE3 as an example https://github.com/acemod/ACE3/tree/master/addons
every folder in there is a component
and a standard SQF global variable wouldn't be accessable from another component? is that due to the pbo structure or some definition in the code?
a standard global var is available everywhere but CBA's macros prevent you from having to type the tag and component name
ACE_someGlobalVar vs GVARMAIN(someGlobalVar) or inside a component ACE_advanced_ballistics_someCompVar vs GVAR(someCompVar)
got it, thanks a bunch!
I'm a noob at SQF, I'm trying to add a waypoint so far i got this "_de = B_soldier_AR_F addWaypoint[[0,0,0],0];" but when i click playgame i dont see the little distance marker in game telling me to move there. How come? thanks ๐
B_soldier_AR_F is normally a classname, did you name an object like this?
No it was preset, i just hovered over the soldier and saw that thought that way his ID
Do i give a unit/group a name by using the "Varible Name" box?
Whats his ID? is it his name? i thought that could possibly be problamatic if the new unit spawns and both are call "Gerry Adams"
well if you spawn the same soldier (classname) multiple times they kinda need different IDs so you can handle them all individually
@tough abyss if you spawn a unit with createUnit you can get a reference (ID-ish) for it like so private _unit = group player createUnit ["SoldierWB", position player, [], 0, "FORM"];
if you place them using the editor you can give them a name in the name field for that unit
@quiet bluff I'm guessing your somewhere in the eastern parts of the world buuutt https://rurounijones.github.io/blog/2009/03/17/how-to-ask-for-help-on-irc/
I havent got passed the mission editor yet so im doing this all in the init box of a unit. which is why im asking how to find out there name if im in mission editor?
you can give an unit a (variable) name in name field in the dialog when you double click the unit, should be above the init field ๐
in the init field you can use this as the unit though
ahh i see thanks for the help man ๐
Im trying to set a way point with this guy and i get he eerror "Type object, expected group" but what i dont under stand is on the wiki it says that even if a player is by itself he is still in his own group. How come my player is an object not a group?
how to determine if a projectile has penetrated a target?
track it via firedEH, while alive loop to track position and see if it intersects (same position as the target) and still lives after - any better ideas?
^ got to love discord for it's proper quoting system ๐
Afternoon all, for the following example.
tskKillGirl = player createSimpleTask ["Kill Girl"];
Is this compatible with Multiplayer missions or coop, using the "player" object?
Not MP compatible, there are no girls in arma
got em
use
https://community.bistudio.com/wiki/Arma_3_Task_Framework
for an easyish MP compatible task framework
Thanks, two issues I am having with my demo script, if it runs more than once it overwrites the previous demo task because of a naming issue, perhaps I can do some sort of random number for the task name?
Secondly the addAction is not working ๐ฆ
or increment a counter
I mean, random numbers most likely won't collide
But I dont trust randomness
The issue is here
private _demoTask = [west,
["demotask"],
[_targetDescription,"Demolitions"],
getMarkerPos _demoMarker,
1,
2,
true] call BIS_fnc_taskCreate;
with demoTask , I should make it something like "demoTask2490184"
Yes but the issue is I call the function separately ๐ฆ
[targetB, "Place bomb here also"] call demoFunction;
Ah yea sorry
then do something like this?
_demoTaskId = "demotask1";
targetA setVariable ["demoTaskId", _demoTaskId, true];
_demoTaskId = targetA getVariable "demoTaskId";
?
Not quite getting you, how about passing as array and for looping.? Do you think that would be better?
e.g.
[[helo1, helo2], "Place explosives on these"] call demoFunc;
Thanks @little eagle I got it to work
Can't get the holdAddAction to work though, is it because I am using remoteexec on the debug console?
[
_thisTarget,
_targetDescription,
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"_this distance _thisTarget < 3",
"_caller distance _thisTarget < 3",
{},
{},
{[_demoTask, "SUCCEEDED",true] spawn BIS_fnc_taskSetState;},
{},
[],
12,
0,
true,
false
] remoteExec ["BIS_fnc_holdActionAdd",-2,_thisTarget];
Yea that variable is set elsewhere, the issue is there is no action option displaying. No errors are being outputted.
is there a method where i can spawn a unit with in a waypoint?
remoteExec syntax is wrong
<params> remoteExec ["fnc_someScriptedFunction", targets, JIP];
JIP .. boolean
but you write "_thisTarget"
also targets = -2 means that it won't work in SP or as local host
@tough abyss createVehicle accepts a position.
retrieve the waypoints position via https://community.bistudio.com/wiki/waypointPosition
createUnit has a position type but not sure how to link it to a waypoint
ahhhh
thanks ๐
SQF is unlike any other language i have used before. is it OOP?
okay.
Swore i asked this before
Added: setVariable extended with support for addressing specific targets (dev from oct 2015)
Anyone know if this setvariable change made it into stable & the syntax ?
What should I set targets to keep my options open? 0 ?
not in stable afaik
Still not working @little eagle http://pastebin.com/ETLe3D3Y
Going to try running the mission instead of through debug
hey, i try to addAction on vehicle but it's not global and my firend doesn't have the addAction, it's possible to have the addAction global ? I think i can do with remoteExec but maybe it's not good ?
] remoteExec ["fnc_someScriptedFunction", -2, JIP];
what? you have to fill in the blanks
remoteExec it, @elfin bronze
Ah, I thought they were optional args
no, lol
I don't really know what to put in the rest of them :S
I just c&p it from the wiki, because no one rembers which arg is which
explains it all
I think your problem is that you use the -2 channel as targets
// runs everywhere but server
you ARE the server in SP and in local hosted MP
Still not getting it
true,
false
] remoteExec ["BIS_fnc_holdActionAdd", 0, >
19:23:20 Error position: <remoteExec ["BIS_fnc_holdActionAdd", 0, >
19:23:20 Error Type Any, expected String, Bool, Object, Group ```
[
_thisTarget,
_targetDescription,
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"_this distance _thisTarget < 3",
"_caller distance _thisTarget < 3",
{},
{},
{[_demoTask, "SUCCEEDED",true] spawn BIS_fnc_taskSetState;},
{},
[],
12,
0,
true,
false
] remoteExec ["BIS_fnc_holdActionAdd", 0, JIP];
Is it meaning the argument for remoteExec are bad or the arguments for the function being remotely executed?
JIP is undefined
So it is not a constant?
no, it's a variable. a placeholder on the wiki
heureka moment
Ok no errors now but still no interaction ๐ฆ
Is ยดBIS_fnc_holdActionAdd` white listed?
no idea. I don't use remoteExec exactly because of this white listing nonsense
functions can be allowed or disallowed to be used with remoteExec
but I have no idea what the defaults are
Well in the wiki they are using remoteExec https://community.bistudio.com/wiki/BIS_fnc_holdActionAdd
This bit in the wiki
"_this distance _target < 3", // Condition for the action to be shown
"_caller distance _target < 3", // Condition for the action to progress
Should that be a string or code wrapped in braces?
the condition has to be code in string format. at least for the addAction command. not sure about the holdAction function
I get it
you are doing it wrong
"_this distance _thisTarget < 3",
"_caller distance _thisTarget < 3",
_thisTarget is undefined in this scope
Ok will try that
you can only use the magic variables mentioned on the wiki
other vales will have to be passed as arguments
which is one of the magic values
welcome to SQF
Ok reverted it back to the wiki, still nothing though not even in the rpt logs
does it work by calling the function instead of using remoteExec?
that's good though
Consistency ๐
means that there is no problem with remoteExec
that would be more annoying
what's the script currently?
How to disable the underline of the texts in RscActiveText controls?
"_this distance _target < 3",
"_caller distance _target < 3",
replace that with
"true", "true",
I guess you have to adjust these
you could debug it using:
"systemChat str (_this distance _target); true",
"systemChat str (_caller distance _target); true",
which would print these distance into the chat
they have to be โค for the actions to show
< 3 god damit
Ok for some reason it works with 4 when using a helicopter but 3 it doesn't :/
Ch47 huron
{[toString[_demoTask], "SUCCEEDED",true] spawn BIS_fnc_taskSetState;},
It is complaining about this when completing the interaction, what would be the best way to print the string of the task do you think?
Does anyone know if all object data (ex: magazines on the floor and/or on person(player that has already joined)) are sent to all joining players at startup/login?
Yes, everything is sent to JIP player
thanks
@tough abyss Why did you think it might not be sent though?
@meager granite to be honest, i am developing my own game, i am just trying to figure out what the best way would be to send all the necessary information without wasting bandwidth
don't look at anything Arma if youre making your own game....
just because Arma may appear( or actually is) buggy doesnt mean it hasnt been thought through...
i have been developing this for quite some time now and i have nothing but respect for these developers
what does that mean? you do not know why i said that or you dont know?
it means: "no comment"
I don't have to add anything to that
I don't think Arma does anything extraordinary here, as far as I know it just sends client snapshot of the world and instantly starts sending it new non-JIP packets
Yeah
I am not 100% sure what JIP is... but i think i get the bigger picture
Join in progress
ah
@little eagle I am a big fan of Arma myself... i wish they would step into the world of VR
Arma 3 never will, VR is impossible with current FPS
Unless you want to stick to training missions only
I am talking about the VR headsets( Vive, Oculus) not Arma's Virtual Reality (right?)
Yes that's what I meant too
Well, it is certainly possible... the biggest problem is bandwidth
in short, 24/7 50 people would be around 3.5TB/month
thats without any fancy coding techniques
and... if you care... http://store.steampowered.com/app/496240/ this guy has made it possible sofar with 8 people
I am just interested in a more persistent environment, he is doing mission based
VR sounds and looks to me like a gimmick
I own a Vive headset... and for me, i have yet to get 'immersed'... however... i can see myself being swept away with generation 2 headsets.... this thing is real and i can predict, you being an Arma fan... by the time gen2 arrives(1-2years), you will get one...
I will never play a game or watch a movie or whatever with something like that. The concept is stupid imo
Don't judge till you tried it
Not interested, sorry
VR is stupid ?
@little eagle No problem, not here to sell it to you ๐
VR is stupid ?
yup
lol
@blissful wind people are skeptical, and thats unfortunate, but i can understand it (certainly because of the current price ๐ฎ )
ยฏ_(ใ)_/ยฏ
don't listen to me though. I don't own a smart phone and am not on face book. So what do I know about what will be successful in the future
im not on fb either
VR needs 120 FPS mostly
but truth is every single thats new its usually stupid
@austere granite VR needs a lot of things, but not 120FPS ๐
but then it kicks off and its normal
and FOV, RES, Wireless, No lens flares etc etc ๐
VR is in its alpha shoes right now