#arma3_scripting
1 messages ยท Page 273 of 1
I thought he had some cyrillic in his name
But even copy paste doesn't work
screw it
Nah, i had the Prob with Audiocustoms a few weeks ago too
Then a few min later -> Worked
Estron besitzt Arma 3 Vor 7 Stunden
Ursprรผnglich geschrieben von Capt. Mandrake:
Where are the CBA Devs? Why is there no communication?
because they suck?
also screw you
you suck. we don't support on random forums like Steam. Deal with it
hehe, funny situation
commy2: >Estron besitzt Arma 3 Vor 7 Stunden
Ursprรผnglich geschrieben von Capt. Mandrake:
Where are the CBA Devs? Why is there no communication?
because they suck?
[3:29 AM] commy2: also screw you
[3:29 AM] commy2: you suck. we don't support on random forums like Steam. Deal with it
Here we name it by a catch phrase "Toad fucked the viper"
you could always add a line to the workshop description telling people where you do offer support
Or take it off the workshop ๐
I hate people that think they are entitled to anything.
@little eagle im entitled to you ๐
Hey guys, need some ideas.
I need an AI to walk through a wall on purpose. But not the player.
Any suggestions?
disableCollisionWith does not achieve this, as it allows both the player and AI to walk through
is the AI local to the player?
AI is local to server
AI is local to whatever machine the group leader and group is local to
AI will be local to the server
So if you're the group leader, they are on your machine
For my purposes, the AI will be local to the server and will not be grouped to the player
if you run "disableCollisionWith" only on the server, between the AI and the wall, then you should achieve your results. This should be the case regardless of locality. Perhaps you have an execution issue?
They could also be local to the Zeus that spawned them.
Or a headless client
You can't just say they're always on the server
That's just not true
disableCollisionWith is wonky anyways
@little eagle It is true if it's spawned by the server and you don't fiddle with setOwner/setGroupOwner
@lyric ginkgo Reviewing my code...
Yeah. They're also always local to server when they're local to the server. Your point?
You claimed that it's "just not true" that the AI is always local to the server. I was pointing out that there are situations where that is the case.
But you are correct in the regards that "disableCollisionWith" can be wonky
I don't think you understand what you just wrote
Ok, I've found my problem. "disableCollisionWith" is not working with walls for some reason. However, it will work with wall gates and buildings.
"disableCollisionWith" is wonky
My words
I'm using this code:
Perhaps the wall itself isn't local? What kind of wall is it? How was it spawned?
{ _x disableCollisionWith player } foreach (nearestTerrainObjects [player,[],10])
It's an editor wall, it was already on the map
Also commy, I perfectly understand what you wrote. Perhaps you don't understand what I wrote? Or I don't understand what you wrote?
Well then you dont perfectly understand him
If you're disabling collision between the wall and the AI, why are you using "player"? For testing?
It's hard to get the AI to move through the wall as they will walk around it, even if it has disablecollision.
So ill test with the player first
Then work out how to get the AI to walk through the wall
in a straight line
Yep, the AI part is usually the trickiest :p If you want it to walk through the same wall in the same location and the same way every time, I would use "moveTo" in conjunction with setting AI behavior (specifically disable combat mode)
My real goal here is to make the AI to climb over the wall using an animation. But they keep moving around it, like any good AI does.
I'm breaking the AI on purpose
oh. In that case, you'll probably just want to have the AI play the animation and disable movement
How so?
Anyone had any problems with CBA and BattleEye refusing to work together after adding exceptions?
@Quicksilver Just tested agents, they do not respond to doMove commands. It's unlikely that i'll use them.
- @tough abyss
doMove on rabbit agents seems to work
Sorry, I meant moveTo, not doMove
I used this code:
tr = createTrigger ["EmptyDetector", player modelToWorld [0, 10, 0]];
tr setTriggerArea [5, 5, 0, true];
tr setTriggerActivation ["CIV", "PRESENT", true];
rabbits = [];
private "_r";
for "_i" from 1 to 10 do {
_r = createAgent [typeOf player, position tr, [], 0, "NONE"];
_r setVariable ["BIS_fnc_animalBehaviour_disable", true];
rabbits pushBack _r;
};
tr setTriggerStatements [
"if (rabbits isEqualTo thisList) exitWith {
_r = thisList select floor random count thisList;
_r moveTo (_r modelToWorld [2.5 - random 5, 2.5 - random 5, 0]);
};
_esc = rabbits - thisList;
doStop _esc;
{_x moveTo position thisTrigger} forEach _esc;
systemChat str [time, _esc];
false",
"",
""
];
//It's from the agent wiki page
//The code above is meant to make the agents move. It works for rabbits, but not people
I guess I can make parkour rabbits
I hate this game lol
I had a thing working, changed something and it didn't work
so I changed bakc
and it's still brojke
logic
Logic... I restart the server and it works... even though nothing was changed from when it was broken
haha
Afaik CBA doesnt really have an "official" release place outside the BI forums and the WS
github
Is there any way to make an RscEdit box multi lined
@lilac halo CBA on steam is up to date and not broken. No idea what your issue is. Also we don't do support on random forums like the Steam Workshop. We have a github issue tracker.
@lilac halo - This so much ./\ - Basically almost all the big mods have their own bug trackers - If you have issues post them on their trackers. Pretty much every mod in the readme will tell you where these bugtrackers are. For instance CBA/ACE3/TFR/ACRE2 are all on github.
Devs only have so much time and they do want their projects to be bug free. But devs don't have the time to go trawling through steam workshop/twitter/facebook/BI forums/A3 discord etc. for issues and provide the level of support that game developers are paid for. For us it's a hobby. If you have issues take it to the relevant team's offical bug tracker - There's also several mods that also make use of public discord/slacks where you can talk to the devs and other users.
I'm running the script found here: http://www.kylania.com/ex/?p=21 . It was designed, as I understand it, for Arma 2 and throws a few errors that I've managed to trim out (Hacksaw methodology of troubleshooting, I know.) and functions fairly well.
My only issue is that the missiles have a really bad arc; even if I set the starting point two kilometers above sea level, more often than not the missiles will impact the ground just shy of the laser target point.
It's possible to hit targets by lazing behind them, but it's touchy, unreliable, and feels off.
The end result I'm looking for is similar to the ARMA 2 campaign section where you call in cruise missiles; I'm trying to recreate Operation Harvest Red as a curated event in A3 with CUP.
@meager granite will do, thanks.
{
access = 0;
type = CT_EDIT;
style = ST_LEFT+ST_FRAME+ST_MULTI;
x = 0;
y = 0;
h = 0.04;
w = 0.2;
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
colorSelection[] = {1,1,1,0.25};
font = "TahomaB";
sizeEx = 0.04;
lineSpacing = 1;
autocomplete = "";
text = "";
size = 0.2;
shadow = 0;
};
class Server_notepadDialog
{
idd = 90006;
movingEnable = true;
enableSimulation = true;
onLoad = "";
class controls
{
class EditBox: Server_RscEdit
{
idc=400010;
x = 0.29375 * safezoneW + safezoneX;
y = 0.225 * safezoneH + safezoneY;
w = 0.4125 * safezoneW;
h = 0.55 * safezoneH;
text = "";
sizeEx = 0.05;
};
};
};
@meager granite I tried what you said but no text appears. Changed the color to gray to make sure the box was there, and it was
I just checked into what debug console uses and it has ST_MULTI and it works there
something else breaks your control then
Did anyone ever experienced that forEach might not define _x if one of iterated values in array is nil?
not that i know of.
hey all is there a command/function which returns the ammo of a static weapon stored in a backpack
Don't think there is a function, but you can probably check the type of backpack, use it to grab the type of static weapon, and go from there
DerZade, are you trying to grab the type of magazine while the backpack is still on the player? Would you like a consistent solution, or just a specific solution for a certain set of static weapons/magazines?
it has to be a consistent solution
so i just need to get the invisible turret for the coresspoinding backpack
beacuse a want to be able to set and get the ammo of the turret
You might be able to get the classname of the static weapon from the backpack config. Then you can check the config of the static weapon for the weapons/magazines
the problem is that I want to know wether the wepon has been shot yet and how much ammo is left
ahhhh... now I see what you mean... I'll let you know if I find the courage to start my game again :p
Thanks in advance ๐
Thinking the best way to do it is to use a "fired" EH in conjunction with the "WeaponAssembled"/"WeaponDisassembled" EH. The problem is that "WeaponDisassembled" won't fire if the weapon isn't local, so you might have to do some tricky stuff
Also, you'll probably want to use setVariable on the static weapon, but if it's a fired EH and the rate of fire is high enough, you might run into performance issues; most importantly network issues if it's on a multiplayer server. So I think the getOut EH would be best. Not sure it will fire if somebody disconnects from the weapon though, so you'll have to use your judgement on that.
Save the ammo count using setVariable using Fired or GetOut EH, and use "WeaponDisassembled" to apply the variable to the backpack that holds the weapon. Then you just grab the variable again on "WeaponAssembled", and apply the saved ammo loadout.
Just brainstorming here, there might be a better way, but that's just my 2 cents.
That wont work for me because i would have to add it to every static and how should i do that ?
to make my problem more clear: This is for a mod called BackpackOnChest which allowes the player to carry a extra backpack on his chest. The backpack itself isn't saved its beeing replaced by a SimpleObject...
when a player puts his backpack (static with no ammo) on the chest and then back on his back the static will be full again
Is there a way to playsound and have the volume slowly increase over time, without editing the ogg file to do that?
That only works for music doesn't it? A lot of players have music turned off, and this is for wind sounds
I see there's a fadeSound as well, but that does all sounds from the looks of things
Yes.
Misread sound for music.
Guess that happens when you have a couple drinks in your system.
You could attach the sound to an invisible object and attach it to the player and then move it gradually from/to the player. Then delete it once the sound is over.
Honestly for all that trouble, just fade the ogg file
Don't think there is a command for it.
Yeah it's a little annoying there's not more fexability to the playsound command. But thanks
Next question in multiplayer, if you use player in a script will that apply to every player on the server? Like if in a script running on the server I said player setdamage 1 would that kill everyone?
hey there, i tried for about 2 hours to add an action to an H-barrier (Land_HBarrier_Bbig_F) with addaction in the initfield. it works fine with other items, but it doesnt work with those barriers, any help would be great!
Make sure it's not a simple object or has simulation turned off, pretty sure 1 or both of those has an effect
what do you mean with simple object @leaden summit ? give me a second to check the simulationthing
oh, i see, thats an attribute that can be set in editor to save performance, got is
*it
Yeah it removes physx etc
wow, that's it!!! Thanks alot JD!!!
No worries, glad I could help. Fell into that trap before myself
finaly i can continue! costed me about 4 hours today ๐ sometimes arma is a real bitch for a new missionmaker ๐
Haha even when you've been doing it for years you can still sit there pulling your hair out wondering why something doesn't work
oh yes, i guess so
man, now even aceinteraction works perfektly on it, that was my first plan ๐ ๐ really, thanks a lot for that hint, i am so glad now ๐ ๐
Cool, glad I could help
Nope, it would need to be broadcasted to all the clients. Using remoteExec
But if a client is running the script, player applies to the client
Right I get it thanks
I'm trying to detect when player is firing a vehicle weapon. Wiki says that fired EH will not trigger when player is in the vehicle though, would CBA help?
Hey does anyone know what scripting command it is you use to create a custom inventory UI? or has anyone got a guide
hi any 1 here no how to UI http://prnt.sc/dnprhk
@coarse dagger dialog control
I'm using a firingman EH, how can I get the "caliber" value of the ammo used by the trigger?
would this work?
_caliber = getArray (configFile >> "CfgAmmo" >> _ammo >> "caliber");
You dont need to do getArray
just do params ["","","",""]
and it will be in the order on the wiki
@rotund cypress sorry but I can't find the article that would have it
FiredMan would be params ["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile","_vehicle"];
yeah, but I want to get the caliber of the ammo
its one of the config elements for ammo
class Sh_140mm_APFSDS : Sh_120mm_APFSDS {
airFriction = -4e-005;
typicalSpeed = 1800;
hit = 650;
caliber = 35;
indirectHit = 20;
};
I think something like this is more proper, yes?
_caliber = getNumber (configFile >> "CfgAmmo" >> _ammo >> "caliber");
seems pointless. just get a real text editor
You mean syntax check?
ye
I'm not quite understanding the SQX thing, but looks neat
More leaning towards .NET devs though
Still pretty pointless. SQF syntax is stupidly simple. All proper text editors have syntax highlighting and that's all you need.
It's not about being stupidly simple, he's taking on a project that's more than just highlighting, of which there are few
And a linter
And building around this CPack idea, which is neat
It's essentially a linter
Is there?
There's an IJ linter?
still active
Intellij is such a nice IDE
Bit cumbersome sometimes but so featureful
It had the advantage of a full Dev team
I don't personally use IDEA, but I use CLion and Rider
Still built on IJ platform, and they are brilliant
I'm checking hit caue and seeing if its more than 12 and more than 35 how can I set uo switch and case conditions?
how can I check if _hit is at the same time more than 12 and less or equal to 35?
for some reason this does not seem to work for me:
switch (_hit) do {
case (_hit > 35): {
enableCamShake true;
addCamshake [1.3,0.4,15];
};
case (_hit > 12 ) && (_hit <= 35) : {
enableCamShake true;
addCamshake [0.3,0.2,15];
};
case (_hit <= 12): {
enableCamShake true;
addCamshake [0.1,0.1,15];
};
};
@thorn saffron switch (true) do { case (_hit >= 35): { enableCamShake true; addCamshake [1.3,0.4,15]; }; case (_hit > 12): { enableCamShake true; addCamshake [0.3,0.2,15]; }; default { enableCamShake true; addCamshake [0.1,0.1,15]; }; };
Thanks for being less lazy than me
I was going to try and help him work through it but answers tend to work better anyway haha
the value in the "case" has to match the value in "switch". Since you're evaluating the value of _hit, you're checking if something is true or false; in this case you're checking if something is true. IE, if _hit is more (or less) than a certain value
so the script will evaluate all of the cases (in this situation, two cases). It will then run the code under default if none of those cases match
So first, _hit will be evaluated if it is greater than or equal to 35. If not, it will then be checked if it's greater than 12. If not, it will go to the default value.
Note that you don't have to do (_hit > 12) && (_hit < 35)
thanks, I will test it out right away
This is because when _hit is 35 or greater, it is handled by the first case block. Therefore, checking if _hit is less than 35 is redundant at that point, because if it wasn't, it would already be handled.
hmm for some reason it does not function for me, no errors though
Im editing the LAxeman's recoil script in order to add camera shake to vehicles
I got it working, but I wanted to have different amount of shake depending on how big the gun is, the easiest way was to look up the hit value of ammo
odd it stopped functioning, maybe your code was correct after all and I just messed up soemthing else
@lyric ginkgo got it working now, thank you very much for the help
I find this so pretty:
_objects = objects which need to be around
_near = (player nearObjects 10) apply {typeOf _x};
_isOk = (count (_near arrayIntersect _objects)) isEqualTo (count _objects);
count _objects == count nearestobjects [player, _objects, 10]
assuming _objects is list of class names
and assuming you can't have more than 2 objects nearby in the mission
there could be duplicates in the right side of that one
this was actually my first aproach then needed to rethink, because players are able to create those objects so nothings safe ^^
If you add a long sleep command to a script, is that impacting performance while it's sleeping?
with reference to being part of a loop. Like if I want to call a script randomly every 45-90mins what's the way that will effect performance least?
Well if you're keeping that pseudo-thread open for a long period of time, this will affect the others
But will it 'impact', no, as long as you're not running 100's
Ok cool so if I create a loop that fires then sleeps for say 2700 second before looping again, that's not really going to be noticed?
If not is there any issue with placing that loop in the init.sqf?
You can place it wherever you want, it will have the same affect, seeing as you'll have to spawn it
You won't notice any difference, no
Cool, thank you
(Addactions) Does anyone know if you can without a mod disable/remove/modify exsisting A3 addActions? The specific one I'm looking to remove is "Set up Kart". Looking to either remove it or make it so when that addAction is selected that a script of my own would get ran instead.. I'm assuming the answer is no. However, would appreciate input..
Its general Set Up * action that turns over upside down vehicle
@steady jungle Your best bet would be blocking it in inGameUISetEventHandler
i don't think you can remove a built in 'action' without modifying the config (which you can't do without a mod)
They won't be playable with slow PCs
class Kart_01_Base_F: Car_F {
class UserActions {
class PressXToFlipTheThing {
displayNameDefault = "Set up the Kart";
displayName = "Set up the Kart";
position = "";
radius = 2.7;
onlyForPlayer = 1;
condition = "alive this AND not canmove this AND count crew this == 0";
statement = "this setpos [getpos this select 0,getpos this select 1,(getpos this select 2)+2]";
};
};
"Set up the Kart" is a config based action and not done via addAction
It can therefore not be removed with removeAction, but as Sa-Matra said, you can block it with inGameUiSetEventHandler as long as it's just a mission and no mod you use ruins it by overwriting it.
Also, fuck them for mixing setPos and getPos. You can sink the kart into those walkable harbour port pieces because they doesn't understand their own position madness.
How can I make a trigger that checks for 30-40% of playable units are within the trigger itself then activates once that amount is within the area. I'm trying to make an RTB objective that triggers the end mission
I've tried
{_x in thisList} count (playableUnits + switchableUnits) > 3
but that only looks for if more than 3 exact people are within the area, but i want a percentage
just divide by the total number of (playable) units
(or multiply the other side)
{_x in thisList} count (playableUnits + switchableUnits) > (1/3)*count (playableUnits + switchableUnits)
would be 33%
Ay it works, thank you
I so wish count, apply and select had _*Index variables in them
_countIndex, applyIndex, selectIndex
or _forEachIndex as in forEach for unification
private _i = -1;
some_array apply {
_i = _i + 1;
<blah>
};
I guess
If you add this _forEachIndex you might break old code
apply inside forEach loop which uses it
the point is to have index counter handled by the engine for performance
Also, how come there is no += or -= command, I would work just fine with current scripting engine
@little eagle Which old code? I don't think much people used to count their own _forEachIndex inside count code structures
nah wait
Oh you mean _forEachIndex on higher scopes
yea
you always have that risk when adding magical locals though. Someone might use _countIndex as variable name already
Chance is extremely slim that this happens
And there were much worse backwards compatibility breaks already, nobody will die because of it
_i += 1;
Now this would be great, single command instead of two
We already have this sort for arrays in form of append, why not let have it for number and strings
it's another assignment operator
which would be another keyword internally
not that that should stop anyone
It's a bit different internally from append
Well += is not assignment but binary operator
Nah.
Anyway, we can only dream
You have to reassign a value to _i
numbers are not pointers like arrays
I could do it in ~ 30 minutes
Assignment is special construct in SQF, there is only two assignments right now: = and private =
You can call pretty much any command "assignment" of something then
nope
I was talking in sqf terms
still no
assignment has special handling of variables unlike other commands
I guess
+= will do nothing regarding to defining variables in current scope so its not really an assignment
No its not, by this logic append or resize is assignment too
nope
arrays are pointers
so you can manipulate them with commands
that is not the case for numbers
you need to assign a new number to the variable
one that is incremented by N
with base of the old value of the variable
replace number with array in your sentences and it will make just as much sense
But arrays are different from numbers in SQF
I'm not talking about variable types but of sqf constructs
+= just like append is not an assignment, it is binary command
Same thing. They are different internally
Doesn't work with numbers, just arrays
I mean
you could do anything with the parser
but it would be fundamentally different from anything that is SQF now
append manipulates an array
but you can't do that with numbers, they are not passed by pointer
pointers have nothing to do with this, practically speaking any sqf variable has pointer to some real game construct be it number or array or entity
yes they do
- _array copes the array
- _number does nothing like that
that is why append is different from +
after you use append you manipulated the array
_i += 1;
would work just like an assignment operator
although there are multiple ways to implement this
all assignment operators are keywords
it's really just = with sometimes private atm
You don't get what sqf assignment is, it has nothing to do with pointers or rules how variables are handled, if it will be implemented it will be as usual binary command
one that assigns a new value to the variable on the right hand side
there is nothing like that in SQF atm
so it would be something entirely new
This way you can say that setDamage is assignment since it assigns something somewhere
nah, you don't change any values of variables with that command
you manipulate the ingame world
no SQF variable is changed with setDamage
private is not assignment, it is unary command, private = is assignment
I never said that
I said = and that sometimes works with private
Weather that counts as one or two assignment operators does not interest me
you could argue for either
When game processes _i + 1 it doesn't actually send value of _i into whatever code handles + command, it sends same pointer to _i variable just like any command that operates arrays
<Number> + <Number> command in particular just takes values it could have as well handled it as arrays and modified _i if developers wanted
and returns the sum
the point is that we're talking about different "assignments" here, you about assignment meaning in general, I talk about sqf assignment
you can assign that with = then
no, I'm too
name another command that manipulates Numbers by pointer
there is none
in SQF that only every happens to arrays
so you make something fundamentally new
if you say *= wouldn't be a assignment operator
Which would be the fastest way to implement it
Your argument against classifying append as assignment was that arrays are handled as pointers while in fact everything is handled as pointers, its just up to command to modify original variable or not.
Your description makes append an assignment which is not
you can change the interals without chaning what SQF is
append is not an assignment
_array#1300 append _another_array
_array#1300 is still array no 1300 afterwards
The main difference between assignment and command is that assignment handles variable declaration, if its local variable it walks up the scope to see if there is variable or creates new one in current scope if there is none
If you classify += as assignment then you could do
_a += 5;
which would be identical to
_a = 5;
Assuming no _a is defined in this or higher scopes
While in fact _a += 5 should not be treated as assignment and throw undefined variable error
If you still call it assignment then you might as well call setDamage assignment or anything else
I agree with @little eagle
I think everything has been said. It's a philosophical debate, so it's entirely pointless anyway. In the ends it's all just zeroes and ones.
I was quite surprised when I found out that arrays are treated as pointers in SQF
It gave me a headache first before I realised I had the same pointer in all my array variables lol
This is just how SQF works, = and recently introduced private = are assignments and everything else is commands, the point of assignment is to declare variables, everything else just operates existing variables, be it by copying or modifying variable value.
Well, you can sort of call <namespace> setVariable assignment but it deals with globals only
Yes you probably could make += assignment but then it would make it work like in example above which breaks sqf rules of variable declaration before usage.
guys, i'm having some weird bug with remoteExec.
btc_combatSupportObject allowDamage false;
btc_combatSupportObject setDir 62;
[btc_combatSupportObject] remoteExec ["btc_fnc_cs_addAction", 0, true];```
This code runs on the server
everything works in SP (ofc ๐ ) but not on the dedi
btc_fnc_cs_addAction = (_this select 0) addAction ["<t color='#ff1111'>Request vehicles</t>", "0 spawn btc_fnc_cs_handle;"];
Is there a difficulty option to enable tactical ping on servers?
Does anyone know how to block the single player cheats from being used on a mulitplayer server? We're currently experiencing a lot of players using the "ENDMISSION" cheat command.
The only documentation I was able to find on it is the following (which is pretty much useless): https://community.bistudio.com/wiki/ArmA:_Cheats#ENDMISSION
@hollow vigil Tested it on my server, seems client sided.
just disconnected me from my game
It's a built-in feature to arma cloud
But you might be able to override it like you used to be able to to override alt-f4
Ye, just heard that it's possible to disable it though, most likely ghetto method but hey it's something
I'll see if I have my script to block alt-f4 somewhere
It's a bugger I'm on holiday so I only have my laptop. I'll search my repos from arma 2
i thought you meant it ended the server mission. I get what you mean now as it can be exploited
@tough abyss The issue with it is that people use it to softlog, we have a combat timer that prevents people from logging out mid-combat but this way they just bypass it straight up and they're just able to respawn in shortly after. Normally they would have to alt+f4 and rejoin which leaves plenty of traces, this way is fast and efficient for them.
Mmm
I can't believe no one has handled this before
Or that there isn't a disable for it somewhere
Have to write something hacky as usual for arma
@hollow vigil yeah thats wwhat i figured
Right in this arma 2 script I wrote I'm just hijacking the key press event handler
We're logging people doing it and handing out bans if they use it to gain an advantage, but there's hundreds of players using it and at this point we rather just block it completely.
We're aren't using infistar, so I honestly don't know.
It looks like a pain to block asofar because it doesn't use any unique keys
So you can't just block minus on the keypad as people have to use this for other shit
So you may well have to record the combos which is shit for optimisation as its recording all keys pressed in a row
There may be a more elegant solution but intercepting the key presses is all it seems that arma is going to let us do
is it possible to log it if we create a script that detects the keys you press like hold down Shift and minus key?
Yeah
I can show you what we did for the endMission
Also you can detect the mission ending
as its the only cheat command that really concerns us
Is this eating up all your runescape time Lako haha
Nah, multitasking is the key
Haha. Grinding on one screeb
Arma discord on another
I might be able to get old school runescape running on Linux if I faff about
Also Lako you might want to block crash as well if it comes to it
Disabling the cheats altogether wouldn't be bad, one we got the most concerns with though is endmission
Yeah. It's odd that Bohemia would include such a feature and not have a disable for it in mission.sqm or something. But then again what can you expect from Bohemia.
If anyone were interested in the loggin then it's possible to log it with the following:
addMissionEventHandler ["Ended", {
if (_this == "ENDDEFAULT") then {
};
}];
Nice
Lako maybe check their level and set it to 0 if it's over 1 as a meme
Then wait for the bug reports to roll in
And laugh as they pretend they did nothing
What do you maen by that @lime tangle
Removing 10% of their bank balance per time is better
Yeah
Oh lol
Just wait for the bug reports
"Appears you skipped the syncing when you logged out and some of your data was lost"
Lol
Checks their bank account: oh god dammit
Anyways I'm heading off Discord, I'll check in again tomorrow to see if there has been any progresion on this issue, take care.
Haha. If someone says anything interesting I'll message you on the forums
Quick question. AllowDamage set to false. Does the HandleDamage EH still trigger? Unable to hop on Arma 3 and test right now.
Should do yes
is there a way to detect if one is in arsenal or zeus? The rug_dsai voices from Unsung can be heard in both, would be nice to mute them easily in those two modes
I believed that was only triggered on one of the cheats @tough abyss
Hi guys, how can I get a bool from a missionConfigFile?
Like getNumber or getText but I want to get true or false
Can't.
getNumber should work i was told
There is something you could do.
#define a macros include and assign the value of 1 to true or false
I thought that aswell
#define 1 true
#define 0 false
^ yeah
Problem is.
Where-ever it seees 1 or 0
it will assume true or false
Smarter Idea would be to simply use a #define Macro(passvalue)
You mean in the HPP file to put what you wrote above
Right?
ANd then define all values in the hpp file 1 or 0
I dont think that does what you think it does
#define getCondition(NUMBER) if (Number == 1) then {true;} else {false};
thats just a function. (dont put the semicolon at the end when defining a macro)
But the point is
if he was to use
#define 1 true
#define 0 false
``` the preprocessor would recognise every number as true or false
pretty sure only those in the file, but that one would be bad regardless
and replace numbers for booleans
Macro is probably the safest bet.
Only problem is the PreProcessor runs at compile time.
#define 1 true
diag_log str A:
if A was defined 1 in another file, it would log 1, not true
Ah flip it around
#define true 1
Still the point is the PreProcessor would do bad things.
yea you just wanna use the 0/1
easier to just write a function to convert it.
params [
["_getBoolean",0]
];
_getBoolean = if (_number == 1) then {true} else {false};
That'll do what you want SimZor.
Or better yet.
[false,true] select ((0 max _num) min 1)
^
long story short you just use 0/1 and convert that to your needs ๐
just watch out with #defines because they might not do what you expect them too if you dont really understand them
i seem to remember mikero's stuff even rejecting #define true 1 and its complement
[false,true] select ((0 max _num) min 1)
So that in the SQF file
At the top
And it will get the false
or true
max will take the value thats the greater of the number
closer to infinity
min will take the number closer to one and infinity
So what max does is
if 1 max 0
it will pick 1
if 0 max 1 it will still pick 1
0 min 1
will pick 0
So how does this work?
Question that has bothered me for a long time: why are eventhandlers much less resource intensive to use than eg. manual condition checking (just lower level...?) Is there general documentation how they're implemented / how they work eg. in low level?
I may be the only one, but I don't quite understand your question
than eg. manual condition checking (just lower level...?)?
As for event handlers (generally speaking), they fire when something occurs, so no condition checking (consistently) per say
Having trouble with ctrlSetEventHandler using the onMouseEnter and onMouseExit parameters they dont seem to be working... anyone managed to get them working before?
@indigo snow
[false,true] select ((0 max _num) min 1)
why not?
_num > 0
Not you specifically, but I'm amazed that people are so bad at simple logic sometimes.
You'd think someone participating in the conversation would've pointed that out : |
Well what have you got? 'Not working' doesn't help us much ๐ @vernal rune
Post the code
it will probs just me bing dumb
_x ctrlAddEventHandler ["onMouseEnter", "ctrlSetText [100101, ""img\BLRP_interactionWheel_1.paa""]"];
no but on the wiki it says it doesnt have a variation for mouse enter and exit
x ctrlAddEventHandler?
_x
So you're adding the EVH to _x ?
yeah its in a for loop trust me its not that
show the whole thing
No it doesnt need to be shown
yes it has to : P
How are you expecting help then?
{
_x ctrlSetEventHandler ["MouseEnter", "ctrlSetText [100101, ""img\BLRP_interactionWheel_1.paa""]"];
_x ctrlSetEventHandler ["MouseExit", "ctrlSetText [100101, ""img\BLRP_interactionWheel_Blank.paa""]"];
_index = _index + 1;
} forEach _segments;```
There ya go
What is _segments
well if _segments is not defined obviously its not gonna work
it is
Show it
I can imagine what it is, it'd just be nice to see it
i dont need to
wew
_segments = [_segment1,_segment2,_segment3,_segment4,_segment5,_segment6,_segment7,_segment8,_segment9,_segment10];
oh joy
try the binary version of ctrlSetText
_segment1 = _interactionMenu displayCtrl 100102;
๐
Is it an interaction menu that has an on hover effect?
Yes
Well I know this is, was talking to SimZor ๐
You can try the binary version like commy said, but the first thing I'd do is add a hint in there
So you know whether it's firing or not
Just showing what is available
already done it with system chat
And the result?
the ctrls are being assigned
I'm talking about inside the EVH
yeah i tried linking it to a function earlier and doing it there and it wasn't calling it
_x ctrlSetEventHandler ["MouseEnter", {
systemChat str _this;
}];
Needs to be a string
has to be a string
why?
systemChat str _this;
"];```
Run it and check Ducky
no it does i tried earlier
it's hwo the ctrlSetEventHandler works
why make it a string. sounds unnecessarily clunky
no
Syntax:
controlName ctrlSetEventHandler [handlerName, function]
Parameters:
controlName: Control
[handlerName, function]: Array
handlerName: String
function: String
Return Value:
Nothing
yeah, just use the add version
I think mouseenter just doesn't work for every control type
oh shit yeah maybe
or
you need to make sure the control is in the foreground
it is
then put a control over it that works with it and make it transparent
@little eagle @meager granite Thanks for your input! Never thought of that. Very much appreciated.
D:
CHeers @little eagle and @dusk sage
๐
Thanks for your input! Never thought of that. Very much appreciated.
NP, but I haven't done anything yet.
CHeers
YW
Hey Guys I'm new to scripting and I am having trouble with trying to check if a player is in the driver seat.
This is what I got
_bus = "C_Offroad_01_F"
waitUntil {typeof (vehicle player) == _bus};
hint format ["%1 | You have re-entered your bus and now can continue the route.", _inBus];
How would I make it so the player only gets a hint after he is in the car and in the driver seat?
I have tried driver _bus = player, but still it wont work.
like I put it in an if statement before the hint like this
_bus = "C_Offroad_01_F"
waitUntil {typeof (vehicle player) == _bus};
if (driver _bus = player) then {
hint format ["%1 | You have re-entered your bus and now can continue the route.", _inBus];
};
and _inBus is defined
EDIT: Nevermind I have found the solution by trying other stuff, I simply replaced
if (driver _bus = player) then {};
To
waitUntil {(typeof (vehicle player) == _bus && driver _veh == player)};
guys, i'm having some weird bug with remoteExec.
btc_combatSupportObject allowDamage false;
btc_combatSupportObject setDir 62;
[btc_combatSupportObject] remoteExec ["btc_fnc_cs_addAction", 0, true];
This code runs on the server
everything works in SP (ofc ๐ ) but not on the dedi
btc_fnc_cs_addAction =
(_this select 0) addAction ["<t color='#ff1111'>Request vehicles</t>", "0 spawn btc_fnc_cs_handle;"];
actually no, but if i run the command from the console in game, it works
is it mandatory?
i've already checked it, it's clean
no sign of it
but i'll add the cfgRemoteExec and check again
nope, but it will pass the object itself no?
it kinda sucks tho
my next option is to check if that type of object exist and add the action directly to the client but meh
it's a while i'm missing from the mission editor, do i need to re-apply addActions on player's respawn?
I remember that they changed something about addAction from A2 to A3, but i can't remember if it is the action on respawn or the action related to the vehicle
Moving the remoteExec & object creation to the post init fixed it
My mission framework is coming along nicely.
I can now end missions.
And attach custom code to it.
Still got BI's task framework revamp to configure.
Need to make the long winded text blocks it uses into smaller commands
Stringtable.xml should allow me to do that.
RemoteExec from server does not require whitelisting.
Hey I asked this question already a couple of days ago, but no one really had a solution, so why not try again, maybe there is someone who already tried to achive the same online :)
I want to get the remaining ammo of a static weapon, by only passing the backpack the weapon is stored in, as an argument. I already found out last time that the static exists as a hidden object although it is packed in the rucksack and it is attached somehow to the backpack. (attachedObjects / attachedTo doesn't work)
The only thing I'm missing is the correlation between the backpack and the static itself. Maybe it is stored in the objectnamspace of the rucksack or it's connected in another way.
Anyone any ideas? Thanks in advance ๐
PS: This solution has to work for every static not just predefined ones in a mission (it's for an addon). The final goal is to beeing able to set and get the ammo of an static (by only having the backpack it's stored in), maybe there are solutions with another approach.
at certain mods Zombie distance/loudness vs distance sounds seem bugged... is this an arma bug or is it a script bug?
thats an addon bug
so, the same that happened to DayZ standalone was just coincedence?
@tough abyss DOnt know about Dayz
I know that stock arma does not have zombies
well replace "zombies" with "AI" i guess
but ill take your word on it that its just a addon bug
thanks ๐
Anyone that has problems with endMission SP cheat, try this to disable the key, seemed to work fine for me (findDisplay 46) displayAddEventHandler [ "KeyDown", "_key = _this select 1; _shift = _this select 2; if (_key == 74) then { if ( _shift ) then { hint 'ArmA Cheat Blocked'; true }; };"];
id suggest using BE filters ?
It wont block the command
Okey, so I finally got it working TFFT
Stick that in a function
Call the function on init or something
Woila
Everyone who wanna disable endMission cheat in MP
you know that you just diasbled the usage of that key ?
changing it, defeats your countermeasure
oh, jea, its about that damn cheat endmission .. oh jea ... fuc kme ..
@rotund cypress Sorry, its late for me ... nice work though
createGearDialog [_vehicle, "RscDisplayGear"]; isn't working properly (as seen on wiki) any other way to check a vehicles gear?
I am having real hard time working VGS for my group
The current script im using is
disableSerialization;
uiNamespace setVariable [ "current_garage", ( _this select 0 ) ];
_fullVersion = missionNamespace getVariable [ "BIS_fnc_arsenal_fullGarage", false ];
if !( isNull ( uiNamespace getVariable [ "BIS_fnc_arsenal_cam", objNull ] ) ) exitwith { "Garage Viewer is already running" call bis_fnc_logFormat; };
{ deleteVehicle _x; } forEach nearestObjects [ getMarkerPos ( _this select 0 ), [ "AllVehicles" ], 10 ];
_veh = createVehicle [ "Land_HelipadEmpty_F", getMarkerPos ( _this select 0 ), [], 0, "CAN_COLLIDE" ];
uiNamespace setVariable [ "garage_pad", _veh ];
missionNamespace setVariable [ "BIS_fnc_arsenal_fullGarage", [ true, 0, false, [ false ] ] call bis_fnc_param ];
with missionNamespace do { BIS_fnc_garage_center = [ true, 1, _veh, [ objNull ] ] call bis_fnc_param; };
with uiNamespace do {
_displayMission = [] call ( uiNamespace getVariable "bis_fnc_displayMission" );
if !( isNull findDisplay 312 ) then { _displayMission = findDisplay 312; };
_displayMission createDisplay "RscDisplayGarage";
uiNamespace setVariable [ "running_garage", true ];
waitUntil { sleep 0.25; isNull ( uiNamespace getVariable [ "BIS_fnc_arsenal_cam", objNull ] ) };
_marker = uiNamespace getVariable "current_garage";
_pad = uiNamespace getVariable "garage_pad";
deleteVehicle _pad;
oops
its to long
sorry
is this
however my group members are experiencing some troubles such as
- Not able to see the change in textures
- Some times only the creator can see the texture of vehicles so others see invisble floating helicopters
Help would be much appreciated
Sounds like something i would go to and talk to the creator of the script about
unfortunately i think the forum(?) is dead or quiet
ExAD vitrual garage?
well i asummed that was the virtual garage you are talkign about.
Yes thats for exile
Any idea how to prevent particles from going semi-transparent and then invisible?
[["launch_RPG32_F","","","","",[],""],[['arifle_MX_ACO_pointer_F','','acc_pointer_IR','optic_Aco',['30Rnd_65x39_caseless_mag',29]]] anyone have any method to createVehicle so that i can spawn all those items?
^ returned from weaponsItemsCargo if that helps
@tough abyss Try addWeaponCargo, addItemCargo and addMagaznieCargo
@unique inlet change setObjectTexture to setObjectTextureGlobal
What is used mostly by you guys as IDE ?
IDE?
i think he means IED ๐
I am not sure, there are many ppl out there that use "strange" shortages for words and think, everyone knows/can guess them ๐
sorry... the editor you use to type the scripts in
You see @jagged blaze
๐
๐
Notepadd++ with A3-Language
Some use Atom
I also saw some sick/psycho freaks using VisualStudio
Thanks @vernal rune i will try it out
ohw VisualStudio works with Arma3 scripting?
Notepadd++ with A3-Language <-> is this only highlighting stuff or will it give intellisense throughout the project?
Yes.
yes on which part? ๐
ok ๐
Second question of the day
The effect i am trying to make is
@jade abyss So... right... i have played some arma mods, but thats about all the experience i have with arma... i know how to code... where do i start? Are there any video tutorials that explain how to use the editors in combination with the coding?
anything you can recommend?
sorry JT, didnt mean to interupt you
Learning by Doing + Biki
right
Second question of the day
The effect i am trying to make is
A. All units on map
B. All units spawned (Zeus + MCC)
- Apply skill on A and B
- Keep checking it and when AI increases reset skill every 30 second
NP xD @tough abyss
if youre using mods, the CBA extended event handlers would be of help to you
https://github.com/CBATeam/CBA_A3/wiki/Extended-Event-Handlers-(new)
@jade abyss tnx
Sublime Text 3 with sqf syntax highlighter
Yeah right, Sublime.
Thanks Ducky, ill keep that in mind... i just found about notepad++ extension http://www.armaholic.com/page.php?id=8680 since i know notepad++ ill give that a go first
Also look at the pmc wiki for learning to code especially their arma 2 syntax guide
@unique inlet your script is very broken
If you direct message it to me ill fix it when i get home
One downside to sublime is theres no duplicate line function as far as i know
Like Ctrl + D in notepad ++
@vernal rune yah.. just watched a couple of online tutorials... and i think i have more questions now then before i started ๐
and i guess ill just stick to arma3 stuff
ViM + SQF syntax highlighter makes things perfect
I don't like vim
I once accidentally opened a file in vim
spent 10 minutes finding out how to close it again
@tender root issue is that u want to spawn the items in front of player. So I would need to figure out how to cycle through the array
how does the arma engine run, is there a Main ? or is it component based like Unity3D ?
That is very kind of you ๐
@tough abyss correct me if I'm wrong:
You want to spawn these Items in front of the player just like loot right ?
@tough abyss http://killzonekid.com/category/games/arma-3/ these might come useful.
Thanks, bookmarked it ๐
@tough abyss You need to spawn a GroundWeaponHolder and add the Items to the inventory
My CBA_A3 isn't loading.
When I start my game with CBA_A3 I don't get the cars, weapons, ect. It seems like the mod isn't even running but it's enabled. I'm not sure why it's not loading. Any suggestions?
ยฏ_(ใ)_/ยฏ
the convo below is top too
@tender root solved
Can anyone explain to me how i would go about adding addAction to all clients on a server? player addAction ["Do Stuff", {[[],execVM "stuff.sqf",false,false] call BIS_fnc_MP;}]
Or if i put it in my mission file it wont matter?
Commy, ever think of pulling the SW version of CBA? It would prevent many of the complaints from idiots.
uhm pls no?
i use the arma 3 launcher and the workshop whenever i can because it's the most convenient of all ways overall imho. why punish people like me for retarded comments?!
@open vigil tbh, let them complain/cry/bitching ๐ More fun to read it
@tough abyss You could put it in init (or SQM), or use something like remoteExec
@tough abyss {_x addAction ["Do Stuff", {[[],execVM "stuff.sqf",false,false]} forEach playableUnits; //For All Clients On Server or if you wanted to do it for every person that joins put player addAction ["Do Stuff", {[[],execVM "stuff.sqf",false,false] in a file in your mission directory called initPlayerLocal.sqf
I think I have just passed a local variable by reference to another function o.O
I still dont know how its possible but ok
damn privates
Is there a way to return if unit has eventhandlers set? im trying to verify my addeventhandler..
Complicated, but basically Im enforcing no damage from specific side. The other side can kill the units just fine, but when I have the next group spawn (note; they are already spawned, just hidden with allowdamage false set.) with the addEventHandler handledamage that same team cant kill the group.
Oh, figured it out. I was setting allowdamage false on the invis group's spawn, but this is in multiplayer. Also switched eventhandlers to MP. All is working now ๐
@vernal rune put it in initplayerlocal seems not to work
_vehicle = cursorTarget;
if(!alive _vehicle && (_vehicle isKindOf "LandVehicle" || _vehicle isKindOf "Air" || _vehicle isKindOf "Ship") && (_vehicle distance player) < 7 && alive player) then { true };
'];```
Thing is it works in editor
Not when on a server though
in mission.sqm, what is this version=52; or version = 12; lines?
anyone know how to add optics to a respawn load out through description.ext?
@tough abyss i think that might just be how many times you've saved the mission
It's the editor version. 12 = the old 2d editor, 52 = the current 3den
Jesus. There's 340 SQMs in my editor folder...
I may have a problem.
nah
@tough abyss put in init.sqf should still work
If I wanna set a player to prone, how would I go about doing that? I tried _soldier setUnitPosWeak "DOWN"; and setUnitPos but didnt work
U can play an animation, I dont think there is any elegant solution
Setunitpos is for AI
hello... can someone tell me if the ' ' (qoutes) in this piece of code at the beginning and end are supposed to be there or not? https://hastebin.com/uqakaramar.vbs
this is part of a mod script... now i am new to arma scripting, but i cant believe that is correct
it turns it into a string, which can be useful in certain situations
it all depends on how _repairAllScript gets used
@indigo snow so this becomes something like an anonymous function ?
Nah its a string
so... you can convert a string into code ?
Unsure, i never had a reason to do it
it seems so unlikely
Maybe it gets loaded to some sort of config file or manual
Whats the context of that variablr
no its part of an normal sqf script
[("repAllBut" call _getControl),[6.7*_pW,17.7*_pH,6*_pW,1*_pH],_repairAllScript,(XM8_repairMate_stringtable select 10),((_gearData select 2) and (_gearData select 3))] call _setButtonControl;
this is the only line in that script that uses it
Gotta check what is _setbuttoncontrol
_setButtonControl = { params ["_ctrl","_pos","_action","_text","_enable"]; _ctrl ctrlSetPosition _pos; _ctrl ctrlSetText _text; _ctrl ctrlSetEventHandler ["MouseButtonUp",_action]; _ctrl ctrlEnable _enable; _ctrl ctrlCommit 0; };
ctrl ctrlSetText _text; ?
Thats action by the look of things
right
See if ctrlseteventhandler accepts string as second parameter
Mb it just interprets that as code
๐
yup thats it basically
so, string into code?
Yep biki confirms
main examples would be configs, which can only be of the type string, number or array
so any code in a config must be inside a string
but this does not appear to be a config file
its GUI (control/dialog), which also exist as configs
another example is waypoint activation or trigger activation if you set them by script
its stuff from like the OFP days when the code type didnt really exist yet and everything was strings
insane
I think its just convenience for ppl who want to load code from external source like config or sth
so let me reverse this question...if you would remove the qoutes, would the code become invalid?
Type mismatch
type SCRIPT, expected STRING or something like that
ok, well, thanks for clearing that up ๐
:-)
the way i normally go around it is to use "call MYFUNCTION" and then use normal functions but its a style thing i guess
well, as i said i am pretty new to sqf, was just browsing some mod code then ii stumbled onto that
@rotund cypress _soldier switchMove "AidlPpneMstpSnonWnonDnon_AI"; I believe this animation should work
^ thats instant.
@rancid ruin @Greenfist#3021 thanks a lot. But can i use version = 52; in nowadays dedicated servers? I noticed some regular updated mods still using version = 12; on their mission files.
This version means nothing to you, it just how game reads mission.sqm and that' it
And differences are all hardcoded and probably wouldn't give you any benefit even if you knew them
Yeah, I guess some people are just sticking with the old 2d editor
Arma 2 has version of 11, A3 has 12, there was single version change in mission.sqm format over this many years
is their a way to buff AI units on a server but just for one side so the other has a disavantige?
setSkill command
Anyone know why I can't get this to work?
{_x addbackpack "Steerable_Parachute_F"} forEach thislist;
I'm trying to get a trigger to give all AI units within the trigger a parachute when they enter the area, but nothing happens
I believe Steerable_Parachute_F is the name of the vehicle the player enters when a parachute is deployed, the name of the backpack would be B_Parachute
We all have those moments. From everything I've seen all of the vanilla A3 backpacks begin with B_, similarly, all the uniforms begin with U_, so that jumped out at me
fair enough
Not having to go through animationsviewer
I didnt want to lol
But I had to
I just looked for a simpler command that just had like stand, kneel stuff like that
Is
_array set [count _someArray,_value];
_array pushBack _value;
Are they equivlent @native hemlock
No, they would be the same if it was
_array set [count _array, _value];
_array pushBack _value;
It's not what you said though, but it's probably what you meant
_array is not the same as _someArray
Ohh right
_vehsLand set [count _vehsLand,_veh];
is equal to __vehsLand pushBack _veh;
?
Yes
k
When you getVariable
and a variable is already mission space
can you actually getVariable of that variable?
say global = 1;
I can use
MissionNameSpace getVariable ["global",1];
?
Yes, and that's pretty easy to test yourself
someVar = 5;
systemChat str (missionNamespace getVariable "someVar"); //5
missionNamespace setVariable ["someVar", 123];
systemChat str someVar; //123
How can i create in SQF this "Logic" on the link above (item0 of class entities) and set its type as on line 14?
I see also that many vars are set in the "Logic", but this is the easy part (_logic setVariable ...)
I got it, "RyanZM_ModuleSpawn" is a custom game logic.
Hi
Hi
You're using the modules I hope?
i want to create zombie spawner on fly
not create then in the mission file
but create the zombie spawner using SQF
I believe ai figured it out
Yer I gotcha
Just need to create a unit of side SideLogic with the classname "RyanZM_ModuleSpawn" and set the vars on it.
I've never spawned a module through sqf before but what you could also do is open up the pbo and look at the spawner function file. You could call that function directly I think, just need to get the parameters straight
You could call the moduleSpawn fnc actually on that sidelogic with the vars set. I imagine that could work
All the parameters are taken from the gamelogic ("RyanZM_ModuleSpawn") vars.
But the game logic have other functions in this case like to trigger the zombie spawn, i believe.
Gamelogic != module just to get that straight
Ah ok.
Its a module, but its build over a game logic, dont?
Since the mission.sqm categorize it as a logic.
Anyway the module calls a function right. I think it's called moduleSpawn ( excluding the prefixes ). You could call that function yourself i bet as long as youre using an object that has the same vars set as the module normally would
It sucks im on mobile rn otherwise i coulda taken a look at the source code
class Item0
{
dataType="Logic";
class PositionInfo
{
position[]={14373.422,17.799667,15911.327};
angles[]={6.2818413,0,0.0013439035};
};
id=2;
type="RyanZM_ModuleSpawn";
class CustomAttributes
{```
The rest are just variables set in it.
Like _module setVariable ...
or _logic setVariable ...
Yeah. I dont know if you could spawn a module by its class name tho
You should test
Ill be able to get on pc tomorrow and ill help you out if needed
class Logic; // External class reference
class Module_F : Logic {
class ModuleDescription; // External class reference
};
class RyanZM_ModuleSpawn : Module_F {
author = "Ryan";
scope = public;
mapSize = 2;
displayName = "Spawner";
icon = "\Ryanzombies\icon.paa";
category = "Ryanzombiesfactionmodule";
function = "RyanZM_fnc_rzfunctionspawn";
isGlobal = 1;
class Arguments {```
This is the definition of the module.
A logic turn into Module_F
And Module_F turn into RyanZM_ModuleSpawn
Its a Vehicle
@thin pine
Thanks.
@thin pine i can create then with CreateUnit and thats all.
Like any other unit
\o/
I will just fill my AI_ClassNames = [...]; array with zombies classes and see what happens.
@tough abyss
This also works:
MyVarName = 1;
_VarName = "MyVarName";
systemchat str (missionNameSpace getVariable _VarName);
missionNameSpace setVariable [_VarName, 2];
systemchat str (missionNameSpace getVariable _VarName);
missionNameSpace setVariable [ format["%1%2","My","VarName"] , 3];
systemchat str (missionNameSpace getVariable _VarName);
Probably not the right place but: http://steamcommunity.com/sharedfiles/filedetails/?id=829509175
been getting this error for quiet some time on my server
absolutley no clue why
I can't put a finger on what i changed when the error happened and never did manage to figure out what was triggering it
Turret config lacks value that engine needs
So what could i possibly do to fix that?
Search for turret config and add the value?
You can create patch that adds missing values
CoPilotTurret is not vanilla subclass of Plane, I guess some addon added incomplete turret
Or Arma 3 update moved base class for CoPilotTurret that your addon uses elsewhere resulting in missing values
I don't know your addon setup to suggest what exactly to do and seeing that its Exile I don't think you will be able to change addons since people probably download them from workshop or somewhere else, not you
@open vigil
ever think of pulling the SW version of CBA? It would prevent many of the complaints from idiots.
I'm not the one to decide. Removing it seems mean, but I would've never put it, or ACE for that matter, on there in the first place.
Now imagine the butthurt in here. "How do i install CBA?"
Will be worse then the Pre-SW times.
thought so, thanks @meager granite
Would be nice to moderate those idiotic comments somehow.
private _cfg = configFile >> "CfgMagazines" >> "something";
getNumber(_cfg >> "tracersEvery") > 0 &&
(
getNumber(_cfg >> "count") <= getNumber(_cfg >> "lastRoundsTracer") ||
getNumber(configFile >> "CfgAmmo" >> getText(_cfg >> "ammo") >> "nvgonly") == 0
)
Way to determine if magazine has all tracer rounds
Good Morning.
So i was wondering if there is a script, so normal infantry units who only have a RPG, fire them at infantry. Normally that just run away when they don't have a normal weapon. But they have a rocket launcher, so why don't use that?
Probably can be defined in config if AI should use RPGs on infantry
Yeah, there is CfgAmmo entry allowAgainstInfantry
And only RPG-42 HE grenade has is set to 1
Okay, thanks for the help
In extDB3 if you want to strip " chars can you just add it to the strip chars entry like this Strip Chars = ";[]"" I feel like that's not gonna work that well...
Would someone be able to explain this to me? I think this is along the lines of what's got a couple things in my mission broken in a HOSTED server but it's a bit out of my knowledge to full understand what's going on. (!isServer && (player != player)) then { waitUntil {player == player}; waitUntil {time > 10}; };
@tacit grove Breakdown: If the script executor isn't server (player hosted server) and player isn't player (on dedicated server player is always null) then we wait until player is player (on a dedicated server null == null) then we wait until the mission has been going on for 10 seconds. Someone correct me if I'm wrong.
Is "player" only the host then? or does player encompass all people in the server
If this is in your init, it will run on each player and then when ran by the player the player is that player that it is runnin on currently.
What you are doing here is catering to JIP players bein null during their initialization.
If you go over to https://community.bistudio.com/wiki/player and scroll down to the note made by Dr_Eyeball in 2008, there you can see the same piece of code
Gotchya. yea that's where I first found that piece of code. Somewhere within a HALO jump script something is broken to where only I, as the host, am given back my backpack after the backpacks are on player's chests so there can be a parachute. Once you land everyone is supposed to get their packs back but only works for me. Which is why I started digging into "player"
Makes testing missions hard now that I learned just becaue it works with me in MP doesn't mean it works :p
Yeap
Having a bit of confusion with how to add an "event handler" for when any player throws a grenade. I want to use "AnimChanged" and make it detect if the animmation "AwopPercMstpSgthWrflDnon_End1" is played, then it will spit out a servermessage saying "Thisplayername has thrown a grenade".\
Alright, im am not very familiar with creating Event handlers especially with its paramters so i based this one off something else someone made.
if (isPlayer _unit && {_weapon == "Throw"}) then {private _message = format ["%1 threw something", name _unit];_message remoteExec ["systemChat"];};```
i will put that in say throw.sqf and put this in the init.sqf:
this addEventHandler ["Fired", {execVM, "throw.sqf"}]
if i remoteexec a function like this [] remoteExec [ "fncs_fnc_myfunc", allPlayers ];
And then do that multiple times, will it stack?
say I had a while loop in that script
Will it start over or just stack?
scripts never start over
Anyone available who can help me with popup targets ? My script shows some weird behaviour. Private message me please ๐
Solutions should be public as to help others who may have a similar problem.
Anyone experienced a bug where remote players appear with no unform in underwear?
And in which mission
@rotund cypress That looks dangerous.
What in the world does "pass tank object reference to the script." mean? Using a script from killzonekid but have no idea what the last bit of instructions mean haha
@tacit grove i would think it would be to pass an argument to it so like tankObject call script;
This is what i'm doing. I just have NO clue where those last 4 _tank lines would go http://killzonekid.com/arma-scripting-tutorials-epic-armour-drop/
i know nothing about coding beyond finding already made scripts, following instructions of what to copy and where to paste it. That's why i'm struggling to understand what I need to do because the instructions themselves are gibberish to me lol
@tacit grove The first question is, what are you trying to achieve with this? Answering that can give a lot of comtext to what the problem may be.
First objective in the mission is to clear out a little town. Once clear 2 groups meet up in a specific spot. Once blufor is present a trigger activates to complete the grouping task, merge the 2 groups, as well as activate 2 drop cargo waypoints for choppers carrying prowlers. If another player besides me is in the server the choppers don't cut ropes. So I started researching other routes to get prowler supply drops. Found that script for the tanks and was going to just replace all the _tank parts and the tank class name with that of the prowler.
@tough abyss Seem to only happen to player, any more details about it?
@tacit grove They go whenever you need something paradropped
addAction, init, trigger, whatever
^ as stated, the _prowler portion will go in the activation portion for whatever trigger you have for the drop.
Awesome that's defnitely what I needed to know thank you! is it going to be _prowler or would it be _cars? I think it's listed under cars in the editor
variable name means nothing
just change class name and set proper coordinate
Change [someX,someY,150] to getMarkerPos "somemarker"
Also a lot depends on where you call these 4 lines from, there is a thing called multiplayer locality
Also this code seem to be designed for server to setup paradrop stuff so these lines have to be executed on server
All that huge code listing should be in init.sqf though
Yea i got that big portion in the init.sqf. And i've defnitely ran into my share of issues because of mp locality. The plan is to just have someone host the mission themselves and not run a dedicated server
doesnt change the locality effect
Just in case wrap these 4 lines into
if(isServer) then {
4 lines here
};
To avoid stuff spawning muliple times
awesome I'll give that all a try and see what happens. Big thanks guys
Any more info regarding missing uniform bug?
for this: getMarkerPos "somemarker" does that go in brackets like before or just flat out just that on it's own line andto match a marker name obviously
ignore that actually haha. just made sense
you need to remove array and have getMarkerPos command instead
From my exprience only remote players appear naked, never local
Never seen the issue with AI as neither of my missions have AI grouped to players, only to server-owned groups
I doubt it has to do with textures
Also what is interesting, sometimes units have their base uniforms instead of naked ones
For example I use C_Man_1 civilian in shorts and striped shirt uniform
And rarely players bug out into that default civilian uniform
Well we probably can have some kind of crutch to help it at least
Or messages arrive out of order somehow
There is also a bug where clearItemCargoGlobal very rarely doesn't clear cargo for some players