#arma3_scripting
1 messages ยท Page 247 of 1
I hate to say it but being taught works, reading doesn't for me. Just teh way I'm built.
I am the product of Soviet schools, so I need written documentation
lol
haha
That bad, huh?
that's awesome I believe
even video tutorials do not work for me, as pace usually differs much
I honestly can do both, but I find textbooks boring, and quite often they lack practical examples
Kinda like the Arma wiki...
@frail trout Ready to get a bit more advanced?
I created the earplugs script with a global variable.
I am I just want to have everything setup as described
We can use that variable later to display an icon
Oh yes, that'd be cool
Let me know when you're set up and I'll get into it more.
In my mission, I've got a HUD display that I use for that. There are various ways to do it, but mine works, and if I can show you how to do it, you can create pretty much any custom HUD element you want.
Like minimaps and such
that would be excellent as I'm graphic designer by trade and would be in my element
I'm allergic to graphic designers.
why because we're all dickheads?
No, because you're not real coders ๐
Oh well, you're referring to web designers
I understand the differences between this and markup language
Yeah, sorry. In my field, they're interchangeable.
They are, I'm both.
Is it worth me showing you everything I have so far to ensure everything is correct, thus far?
Why the hell not... let's see some pastebin links
We can judge your work as a community ๐
shitt...
Description.ext
http://pastebin.com/2y0XCLg9
initPlayerLocal.sqf
http://pastebin.com/B9EGUwQb
functions.hpp
http://pastebin.com/B0kSSH7S
oh
what's the wrong path?
i see what you did there
you don't specify the filename in the path
just the folder it's in
tag = "503";
class general {
file ="\guerilla-ops\earplugs\fn_earplugs.sqf";
class keyDown {}; //keyDown function
};
};```
oh so get rid of "fn_earplugs.sqf"?
Not exactly
Do you want your general keydown function to only handle earplugs?
I wouldn't recommend it
Right, but for scalability...
Yeah
So, maybe just put it in the guerilla-ops folder
what is your root file named?
guerilla-ops?
yup
right I need to rename this script to something more apt.
what did you call it originally? keyDown?
cool one sec
keep in mind, you can have multiple scripts referenced under the "general" class in cfgFunctions
tag = "503";
class general {
file ="\guerilla-ops";
class keyDown {}; //keyDown function
class keyUp {}; //keyUp function
class function1 {}; //function1 function
};
};
};```
even at that, I'd recommend putting your general class functions into a folder called general
Like: missionRoot\functions\general
okay so keyDown.sqf is now in mission root. and yes I've replaced all instances of 'TAG' with something personal to me, just so I can get the hang of things
tag = "503";
class general {
file ="\functions\general";
class keyDown {}; //keyDown function
class keyUp {}; //keyUp function
class function1 {}; //function1 function
};
};
};```
Then that would be what you want
okay
again, assuming you move keyDown.sqf to guerilla-ops\functions\general
errr, can we keep it in the root for this example?
I'll also move the general fuctions later on
Sure
it's really just a matter of organizing files and pointing your paths to the right location
Yeah completely appreciate that
But as much as I'm enjoying tthis bicuit, I don't want to bite too much off at once and choke. I've got a very singular line of focus
Meh, if you need anything repeated or clarified, we're all here to help
appreciate that
so as far as I am aware this stuff is actually ready to go or rather, ready to test
Fire it up ๐
brb
Assuming everything was written correctly, you should just have to hit F1 to insert/remove earplugs, with a hint to confirm
(Man, I sure hope I wrote the script I gave you correctly...)
hahahaha yeah I'll let you know in two
At least if there's an error in my code, I know how to fix it
I'm not actually getting anything, no fuctionality, no errors...
F1 does what it usually does with the menus
So the script isn't being called
did you add your event handler?
Yeah, I see it there
erm
ok
functions.hpp
you have cfgFunctions defined multiple times?
Instead of ```class cfgFunctions {
#include "taw_vd\CfgFunctions.hpp"
#include "ais_injury\cfgFunctionsAIS.hpp"
#include "taw_vd\GUI.h"
class RscTitles {
#include "ais_injury\dialogs\rscTitlesAIS.hpp"
};
class 503 {
tag = "503";
class general {
file ="\guerilla-ops\earplugs\fn_earplugs.sqf";
class keyDown {}; //keyDown function
};
};
};```
You want class cfgFunctions { class 503 { tag = "503"; class general { file ="\guerilla-ops\earplugs\fn_earplugs.sqf"; class keyDown {}; //keyDown function }; }; };
if taw_vd\cfgFunctions.hpp has a cfgFunctions class defined, you'll want to merge it with our new cfgFunctions
rscTitles belongs in its own hpp or in the description.ext file
I'd have to see the contents of the first three files to honestly tell you what to do with them
ahh that's a ballache, can't be handing you that much effort
would this be easier if I zipped it all up for you
I'll do that and send you a link then
Send us all a link
You might get a sudden influx of attack dogs in your mission, but at least you'll get help as well ๐
I did not think about all of the easter egs that may appear
Erm, have you met the arma scripting community
???
We can't take anything seriously
Ooooh
Now yer thin'in
Insert earplugs, RNG rolls, if 1, you're hit by lightning
YES
oh man
In the dogfight mission I helped write, my claim to fame is "Rearm Lightning"
Your jet gets hit by lightning periodically and it rearms your ammo
Because why the hell not
ohh thats so cool
That mission is up, if you ever want to check it out
I'll find it on the wrokshop now
ohhhh
I need to revisit the AI pathing on that one sometime soon...
just in case its of any relevance the other scripts that are now referenced in functions.hpp do work
I'm just about done here
This frankenstein mission is taking me a minute to get through all of the stuff you're trying to include ๐
hahahaha I've always been a try hard dude
I should pass that line of advice to the developers at my job. Har har.
I've just always hated that term
What's wrong with trying hard?
I do it every day; seems to work for me.
Well, I get an error from your mission.sqm
really!? I don't..?
Item147.type: Vehicle class CBA_ModuleDefend no longer exists
do you have CBA installed?
I do not
forget about it. Just me trying to get AI to defend buildngs etc
documents/arma 3 - other profiles
at least that's where mine are when I host MP
Don't worry, it won't work
sec
lol
I did screw up my script
Forgot to init the global variable before checking it in a condition
Cuz I'm a goddamn noob
almost there...
okay
init_ais already has a keydown event handler
can't belive you've spent so much time on it - I'm sorry!
Don't be
I volunteered
So, we have two solutions
Add the earplugs script to keyUp EH
or
_this call TAG_fnc_keyDown gets added to the current EH
I just tested the latter successfully
Also, for some reason, Arma didn't like it when the earplug var started with a number
so I changed it back to TAG
oh fair enough
Those conflicts are why I like to write everything from scratch
Let me know if that works for you
Well we can't all be clever like you lol
I only started in Arma a year ago
I've only written 3 missions
Just takes practice and a whole lot of failure
Also, don't feel too bad for the time I spent. Some of it was spent refilling my drink or checking on my kids
well its appreciated
no problem
I need to sort my head out, It seems that pbos don't work in the arma 3 - other profiles / *** / MPMissions folder
do you have pbo manager?
I'm sure theres another location so I will look into it now
Not at the moment, getting one now
also, are you hosting MP, or just single player?
hosting MP to test as it'll be on my server for friends soon
hm, that just worked for me
I didn't actually restart arma. maybe why
๐
Now to find where the code is for that key press readout and nuke it
You'll probably want to comment out my debug system chat
yeah
it's in fn_keydown.sqf
the systemChat line
sorted
but if you want a key's DIK code without having to look it up, then convert to decimal, it's pretty handy
yeah, just commented it out rather than deleted it!
noice
Thanks ever so much for the help on that.
I'm going to do a little more reading up on respawning etc as currently on repawn, I actually lose members of that particular unit and take conrol of another member rather than simply reviving the original member
*respawning, not reviving (at the end)
Yeah, when you die, it creates a new unit and assigns you to it
iirc
my system is built on that principle
when you die, it sets your respawn time to a huge number
if you get revived, it reduces that number, spawns you, then sets your position back to the old unit's position
Effectively, it looks like you were there the whole time
except different kit or do you fix that too?
well
my system is special
I have custom classes in my new mission
Medic, Engineer, Rifleman, Gunner, Sniper, Pilot
ohhh okay, a la battlefield
I assign properties to each of them, so my revive system checks for the right properties in order to work
Well, a la joint ops, so I'm told, but yeah
erm
I can't fly anything for shit
I have my alpha test up atm
[FOR] Battlezones
I could join you in there if you want to take a look
yeah of course, you can give me the grand tour
I like bricks, I'm from Manchester. I grew up throwing them.
lol
HI guys, i am not sure if this is the right spot, but,... i have an Invade and Annex pbo and in that mission they've stated that you have to be a PILOT to fly an aircraft. After extracting the file and loading it up into the editor, where would i be able to deactivate this requirement so that anyone can use an aircraft?
depends on how the script was implemented.
hmm
extract the pbo and upload it somewhere. I will look into it.
not the pbo. just the extracted folder
k
it's uploading, will send you the link ๐ (no rush though, doesnt have to happend today/tonight)
Morning gents, I was wondering if it were possible for a script to write a ban to the Battleye ban.txt file?
in short: no
in long: yes
wouldn't that be a major security issue?
yes, it would. However it would make BASIX work better because all it does now is kick/ban to the lobby and not off the server
BASIX allows multiple admins online at once
i'm gonna release a big pack of fonts for arma, anyone got any (legal) requests for fonts?
hf @tough abyss https://community.bistudio.com/wiki/serverCommand
yes @rancid ruin
a tool to convert a font to an ArmA font
any docs available on this topic? never searched ...
S:\steam\steamapps\common\Arma 3 Tools\FontToTGA\FontToTGAGUI.exe ๐
docs, no, but i can pastebin a config
just when you use the GUI app, restart it every time you select a font. it'll fail silently if you convert a font, then try and do another one. or if you select a font then change your mind.
nice, i'll have a read through and see if i'm doing it correctly
if you ever try it, i suggest getting FontForge cos some fonts need editing
@rancid ruin Is there a way to have illegal requests for fonts?
typefaces are intellectual property so i'm not arma-ing anything which doesn't have an appropriate license
what you mean with editing?
you need to make sure they're true type i think, also may need re-encoding
some other stuff too, i found a load of nuances doing different fonts
like i think it will just silently fail if you have non-latin characters in the font's metadata, like author
so what would be needed is a proper tool to convert them with just one step
instead of 20 steps and the tools provided by BI
that'd be nice yeah but it's not much work once you've written one config, just copy/paste mainly
being able to do multiple fonts at once would be nice but i don't think many people are doing 50+ fonts like me
what does the VM stand for in execVM? virtual machine?
execVM is the same as spawn but with files
yes but what does VM stand for? i'm asking the important questions
@rancid ruin there's a font called "1942" it has similar clones, but would be nice to see.
the monospaced, typewriter-esque typeface?
i can't find it released with an actual named license anywhere
GNU Typewriter was one of the first fonts i arma'd, pretty similar and comes with a proper license https://fontlibrary.org/en/font/gnutypewriter
It gives a nice "old timey" militaristic feel
I wrote a short story for a friend, based in Chernarus, with that font.
i'll stick it in the pack and try to contact the author of the typeface
it seems to be hosted on every free font site so i doubt it'll be an issue
Alright, let my newbness be known to the scripting world
How do I add a script to a PBO? I have the script, and I have the mission that I want to use it in
do you want to add the script to a mod, or mission?
A mission
what script? pastebin.com it
In what way? XD It looks like it has a couple of them
Okay, it is the Close-Air-Support-Field-System-v04b
Close Air Support Field System by JW Custom, from armaholic, which has installation instructions on the download page?
Or that ^ if it came with instructions
Well, yeah, but it isn't my mission, I was thinking of adding it to an already existing PBO
Wasn't sure if that applied the same way
i'd try the step by step numbered installation instructions first tbh, then come back if you run in to trouble
ALright, thanks for the patience XD
does anyone know of a tool for generating documentation for functions?
e.g go through my CfgFunctions definition, list function names, go through function files, add header comments
jesus do you have all this stuff on your clipboard 24/7
I guess it's also not completely what you want
it's close, just a few too many hoops to jump through
maybe now is a good time to practice my node.js
i was literally just about to test that but i don't hold out much hope
yeah it's a bit...messy lol http://pastebin.com/RUvDJvm5
i wouldn't say its messy, it's just explicit made for the wiki
yeah it's just XML being XML
i think i'll just write something in node and use this https://www.npmjs.com/package/extract-comments - i only really want to extract block comments anyway. cheers for the ideas though
@rancid ruin, regarding typefaces. Anything from the Google font repository - you'll be able to use all of them. If you need recommendations (I'm a designer so I know my fonts) Just message me!
Anyone who might know...
Maybe ๐ฉ
@frail trout i think i've already got about 10 or so typefaces from google in there, mainly display fonts
feel free to make some suggestions, i'll release the pack once there's 50 or so fonts in there i think
Bit of help if possible? I notice that in Zeus there's a module called 'Scenario name' which when entered displays any text with a nice animation on the center right of the screen. I'm after that but would rather hard code it on a trigger for instance or on entering the server after a time delay.
Is anyone aware of this scenario title function? I'd also like to display more text without the title styling after it that fades away too. Any tips or hints in the right direction?
That's a question I wondered about myself. Manc ๐
I am not gay
is there something we can help you with spudbrain?
Did you just refer to me as, Manc?
Haha, didn't you say you grew up throwing bricks in Manchester ? ๐
Correct. I'm testing to see whether you picked that up lol. Where you from yourself?
๐
I'm afraid I'm not seasoned enough to know what city has more than one cathedral.
Oh aye? Only round the corner, so to speak
So @open vigil, what makes you a veteran on here?
Not asking for your qualifications, I'm merely interested
Ah cool, that's awesome
@frail trout that might be BIS_fnc_typeText
@lone axle, I should have attached screenshot: http://imgur.com/a/9ftpl
placing that heliports there is a major security issue when your planes are starting/landing lol
(just for realism)
Yeah I know, it's just a training/staging ground for a few friends who I'm 'teaching' ARMA to soon! lol
not only that but people will have to run on the runway (no pun intended) to get to it
also, if you want to remove the zeus watermark you can do alt shift backspace
Yeah I get that but its not gatwick, and it's just helis and vtols of which all can take off vertically.
there's an A-10 just out of shot though haha.
If I was doing it properly they would be on the right hand side next to the taxi lane. But as we're just doing it to train we bunched everything together.
I am proably late to the party but while browsing the wiki...I am amazed with some names BI gives to their commands: https://community.bistudio.com/wiki/getShotParents ๐
don't worry, googling some things is ankward as a dev
lmao MrSanchez
of faaack lol
Is anyone aware of a quick method to check if some vehicle/weapon etc is part of a DLC?
check if the weapon / vehicle has a DLC = entry using getText, if it does it'll return the CfgMods entry of the mod
example
getText (configFile >> "CfgVehicles" >> "yourClassname" >> "DLC")
I must've missed that scrolling through the config, cheers ๐
Need documentation on vanilla revive system
write one
if i could i wouldn't post on here , if you dont have anything useful to say dont reply
It is just an invintation that you will find one - share it with others
how i can stop remoteExecCall on the jip that i made
test
here is my code
KAPU_QBH_JIP = [[],{
KAPU_QBH_EVENT_ACTION = player addAction ["<t color='#a200dd'>GoGo - Bunny Quad Bike!</t>",{
player setPos KAPU_QBH_EVENT_POS;
},nil,98,true,true,"","KAPU_QBH_EVENT == 1"];
}] remoteExecCall ["call", -2, true];
remoteExecCall ["",KAPU_QBH_JIP];
[[],{if(!isNil "KAPU_QBH_EVENT_ACTION") then {player removeAction KAPU_QBH_EVENT_ACTION;};}] remoteExecCall ["call", -2,true];
@forest jasper
https://community.bistudio.com/wiki/remoteExec
Example 7
// removes a message identified by "IamUnique" from the JIP queue
remoteExec ["", "IamUnique"];
I would advise make the action persistent and control its availability via additional public variable you can broadcast
@thin pine isOnRoad is a marvelous name for a command too when you consider what it means to be "on road" in UK slang terms
As funny named as it is, has anyone been able to use getShotParents correctly? I'm passing the causedby/source object from a hit and handleDamage EH and only getting empty arrays returned. Is it meant to be used somewhere else?
Seems to work for me
Where were you testing this? (dedicated server, editor, etc)
3d editor, locally hosted mp server. Clearly it's something i'm doing if it's working for you though. Will investigate, thanks.
player addEventHandler ["Fired", {
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"];
(getShotParents _projectile) params ["_owner", "_instigator"];
hint parseText format ["owner: %1<br />instigator: %2", _owner, _instigator];
}];
I ran that in the editor and it just hints my player object twice
Yea that works for me too, but have you tried using Hit or HandleDamage? That's where i'm having issues.
Figured it could be used to better resolve 'what was I killed by' issues, might not be the case if it can't work within those other EH's though.
Who was shooting you?
attached to an AI, was shooting at them
@glass meadow Did you figure it out? You wouldn't be able to use getShotParents with the Hit or HandleDamage event handlers because they don't give you the projectile as an object
Yea that makes sense. Source for those EH's is a player object not the actual thing in flight as Fired gives you, wiki could be clearer imo. I had much higher expectations for this command though, lol.
Cheers for clearing that up.
HitPart does give the projectile as an object, but HandleDamage gives you a string of the projectiles classname
quick question, for the 2D editor, how can I have a trigger ignore vehicles/player above a certain altitude?
{_x altitude < x } count thislist > 0as a conditional maybe?
idk if altitude exists, maybe you have to use getpos select 2
or just use 3den ๐
haha I would if I could, but I can't port Invade and Annex to it. Results in an empty map. Like completely empty
change a playable character to player
Was there a command to check if the player staying / walking over the water? Got a problem that getPosATL is inaccurate over water while getPosASL is inaccurate on ground ;/
Perhaps this https://community.bistudio.com/wiki/surfaceIsWater
perfect. thanks.
@lone axle thank you! That fixed it.
Hey guys, could do with some scripting expertise again. Lack of fully working examples means I'm struggling.
I'm trying to sort out a mission intro text utilising BIS_fnc_typeText
https://community.bistudio.com/wiki/BIS_fnc_typeText
Included wiki code below:
Description:
Types a structured text on the screen, letter by letter, cursor blinking.
Parameter(s):
_this: array containing blocks of text with same structured text formatting
Remarks:
* Every text block is an array of text and formatting tag.
* Blocks don't have to span over whole line.
Example:
[
[
["CAMP ROGAIN,","<t align = 'center' shadow = '1' size = '0.7' font='PuristaBold'>%1</t>"],
["RESUPPLY POINT","<t align = 'center' shadow = '1' size = '0.7'>%1</t><br/>"],
["10 MINUTES LATER ...","<t align = 'center' shadow = '1' size = '1.0'>%1</t>"]
]
] spawn BIS_fnc_typeText;
*/
#define DELAY_CHARACTER 0.06;
#define DELAY_CURSOR 0.04; ```
I'm thinking this would be best intialised by a trigger, after a short timer so newly spawned players see it after the intial burden of loading etc
As it's an array(?) I'm strugglign to see how to use this like I have other functions.
If I had a working example, I'd understand.
Does this not work?
[
[
["CAMP ROGAIN,","<t align = 'center' shadow = '1' size = '0.7' font='PuristaBold'>%1</t>"],
["RESUPPLY POINT","<t align = 'center' shadow = '1' size = '0.7'>%1</t><br/>"],
["10 MINUTES LATER ...","<t align = 'center' shadow = '1' size = '1.0'>%1</t>"]
]
] spawn BIS_fnc_typeText;
Or maybe I'm misunderstanding what you mean
Is there something script wise that should be before it?
Because it doesn't work straight in the init of a trigger.
Which leads me to believe if I shove it in a .sqf file and reference to it, it still won't work.
@frail trout just used it in a trigger and it works.
really @distant egret!? lol
yea, what error do you get?
also before, make sure this is in front of it, _nill =
well that's probably it...
yea you need to use a _something = in init fields and triggers when using spawns.
Right okay, and just to be sure @distant egret, should I also be inserting this code within the 'on activation' text area of the triger? I assume this is basically init
yea, on act runs when the trigger meets his condition
so when blufor gets in the trigger it runs the on act.
@distant egret thanks man. Any idea why it would activate regardless of condition? It's down as activation: bluefor / detected by bluefor.
It activates while miles away from anything?
well im guessing you are playng as blufor, so you detected your self ๐
wait...
it should be down as present, shouldnt it?
if I want a 'walk-thru' trigger?
yea present
no worries ๐
@distant egret I swear to god. It's still doing it. There are no playable characters within the area. Nearest ones are 10m away
are there any blufor AI in the trigger?
and the trigger is like this,
type: none
activation: Blufor
activation type: present
condition: this
on act: your code
I must have removed "this" fron within condition. So that fixed that. thanks dude.
Interestingly now I can see the text (as it was executing on the loading screen) it's not the text I was after.
Have you used the Zeus editor @distant egret? There's a utility under Scenario Flow called "operation name" or something similar which prints text in a very different way to BIS_fnc_typeText
I suppose it's the animation of the text that's different
No never used Zeus sorry, but explain what is different with that one.
is it on the bottom right?
it is, And the text animation isn't the typical military digital typing sort. First of all it's silent but it fades letters in block by block in what seems like a random fashion. I'll get a few screnshots for you now.
well you can do a lot with BIS_fnc_typeText, you could try and align the text to the bottom right?
Like this @distant egret. It's a completely different animation. Not the easiest to capture either. Should have doen a video but y'know - time.
http://imgur.com/a/xpOhm
I understand, if you have that mission, open it and look in it ๐ thats the best way to figure stuff out.
No its a function within Zeus, otherwise I would have
ok
ok, dug a bit true spawn bis_fnc_moduleMissionName;
seems to do it
@frail trout
yeah cool
@distant egret thank ever so much mate. I've been searching high and low for this but obviously with the wrong search terms
Tip, never use the internet, dig in the PBOs, what I did is dug in the curator (Zeus) PBOs and looked at the modules ๐
well never use internet if you know it wont be there ^^
ahhhh
It's referenced in the wiki but has no information regarding making the titles custom which is a shame as it could have been re-used differently elsewhere
Does, what I wanted anyway!
Yea, seen that as well on the wiki, its a community wiki so not everything is documented the right way yet.
Posted a minor update to Arma 3 Mission Skeleton - added predefined HTML colors for use in config
https://forums.bistudio.com/topic/192009-release-arma-3-mission-skeleton-version-12-with-mission-build-script/
any advice on how to make BIS_fnc_findOverwatch less of a perfomance killer?
yo guys
i want AI zombies to climb over some ramparts
like at 19:00 in this video
my AI zombies just stop before the rampart and don't run over?
?
Anyone else getting cfgweapons.burst no entry error when launching the server with a mission that was edited in Eden?
1 setOvercast 0.9;
0 setFog 0.05;
forceWeatherChange;
999999 setFog 0.05;
setWind [-1000, -1000, true];
5/7 - would add to mission
lol does such high wind actually work yeah? i need to test this
i'll tell you in a minute
hahaha yeah it send the trees mental
nowhere near flat, but bendy enough to remind me of mushrooms http://i.imgur.com/kphRtdS.png
i saw a video of some wind hack in dayz, it was even worse than this, had me in stitches
Does anyone know the actionKeys entry for deploying bipod? It's not in here: https://community.bistudio.com/wiki/inputAction/actions/bindings
Please use @austere granite if you know answer ๐
@austere granite they are listed in config space - so search in AIO config
@austere granite Try deployWeaponAuto or deployWeaponManual
23:09:50 Error in expression <n {
_objDoors = getNumber("CfgVehicles" >> (typeOf _obj) >> "numberOfDoors");
if>
23:09:50 Error position: <>> (typeOf _obj) >> "numberOfDoors");
if>
23:09:50 Error >>: Type String, expected Config entry
23:09:50 File mpmissions\__CUR_MP.Tanoa\core\utils\fn_lockDoors.sqf, line 28
23:09:50 Error in expression <n {
_objDoors = getNumber("CfgVehicles" >> (typeOf _obj) >> "numberOfDoors");
if>
23:09:50 Error position: <>> (typeOf _obj) >> "numberOfDoors");
if>
23:09:50 Error Generic error in expression
23:09:50 File mpmissions\__CUR_MP.Tanoa\core\utils\fn_lockDoors.sqf, line 28
Anyone got any idea how to fix that at all
Line of code is this:
_objDoors = getNumber("CfgVehicles" >> (typeOf _obj) >> "numberOfDoors");
You are missing configFile, so that should be
_objDoors = getNumber(configFile >> "CfgVehicles" >> (typeOf _obj) >> "numberOfDoors");
i want AI zombies to climb over some ramparts
like at 19:00 in this video
https://www.youtube.com/watch?v=pFl3frXkTBY
my AI zombies just stop before the rampart and don't run over?
does anyone know how to use the new stackable EH in arma 3 'EachFrame'?
not sure if I need to call it using addMissionEventHandler or addEventHandler
oh wait it's on this wiki page: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/addMissionEventHandler#EachFrame
so I'm guessing it's a mission Eh
addMissionEventHandler would be the way to go
is there a way to test whether a command exists?
Do you want to manually check the command yourself, or looking for a way in general to check?
both, I guess?
I just want to know if command X is available which is only available in dev/1.64
If you type it into debug console and hit F1 it will show you information about the command, and if nothing pops up you know that the command doesn't exist
I believe I saw another way to check within a script, but I'll have to dig around for it
should've mentioned that I want to check it in a script ๐
as to not throw an error if someone isn't running a version that doesn't have that command
@native hemlock isNil {someCommand} seems to work ๐
it does execute the command though :/
I definitely remember seeing a commit to CBA or ACE by @little eagle that I believe had an isNil check for canSuspend to tell what version of the game was being used, but I'm unable to find the commit or the syntax used
I'm using this to get every vehicle class name in my mission. The problem is it returns the full path to the vehicle class. How do I return an array of just the class name? _car = "((configName _x) isKindOf 'car')" configClasses (configFile >> "CfgVehicles");; copyToClipboard str _car; What I get is this: bin\config.bin/CfgVehicles/I_Truck_02_ammo_F What i'm looking for is this: I_Truck_02_ammo_F
I'm on mobile so I can't really format properly but the following should work
_car = ("((configName _x) isKindOf 'car')" configClasses (configFile >> "CfgVehicles")) apply {configName _x};
copyToClipboard str _car;
VTOLs are currently crap ...
ArmA2 solution with "enable"/"disable" auto-hover was WAY better then this crap
@native hemlock I will try that and let you know. Thank you for the response.
@native hemlock It worked perfectly, thank you.
Hi guys is there a way to use attachTo on a players vest or backpack instead of their character model?
Having an issue spawning RHS Indy chernorus Ground Forces in Enemy Occupation System. Here is the script I wrote for them null = [["EOSinf_1"],[3,1],[2,3],[0,0],[0],[0],[0,0],[5,1,350,GUER,TRUE]] call EOS_Spawn;
@vivid eagle Not to my knowledge, but you can attach it with an offset and to a memory point that the backpack or vest also uses. This post will some more detailed information about attaching with offsets and memory points http://killzonekid.com/arma-scripting-tutorials-attachto-and-setvectordirandup/
nvm solved my issue. Was just looking at an outdated tutorial.
I'm confused as to how serverCommand works. Do I need to execute it from a UI EH if it's executed on the server or on an HC?
either put it behind a button
or use
with uiNamespace do {};
the latter one works fine on dedicated servers
@opaque topaz
ok thx a lot the wiki docs a lil confusiing on that
Hi guys, i am editing an Invade and Annex mission and have discovered that you can reserve UNIT spots. So people with a specific ID can only use certain Roles. I was wondering if anybody could help me make it work for my server?
I am kinda new to this, and would appreciate any help.
@halcyon crypt You can use productVersion to check the game build and branch for example.
Or to check if a command exists use supportinfo : if (count supportinfo "u:diag_captureframe SCALAR" > 0)
https://community.bistudio.com/wiki/productVersion
https://community.bistudio.com/wiki/supportInfo
Thank you, I'll go with productVersion since it seems lighter than supportInfo ๐
@native hemlock Thanks - thant's what i tried first but there doesn't seem to be a way tget the attached object to follow the the leaning of the body. Will keep trying.
does somebody have a script that adds light effects to beacons like the ones that are on the offroad
hm.. is player addEventHandler ["HandleDamage", {true}]; kinda broken? iirc, you can disallow damage by it, correct?
Ive been trying to use a damage handler for my building mod, hasnt worked for me
It runs fine
just doesn't, negate damage like I told it to.
Same here. Sends over the correct Data, but you can't negate it...
Have you tried returning false instead of true?
Yep, both
also tried: 0 ^^
and _this set[2,0];
It changed the part correctly, but still -> dead.
yep, haven't found a solution.
However it will fire with "HandleDamage" EH added alongside stopping unit from taking damage addEventHandler ["HandleDamage",{0}];
From:
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#MPHit
Also doesn't work...
Giving back 0 from a function call that is fired from the event handler works fine for me
Example?
i want to re creating the captive script from the apex mission in apex keystone
but i cannot find how
@jade abyss player addEventHandler["handleDamage",{_this call fancy_fnc_handleDamage;}];
and in that handleDamage function
0;
well basicly i process the data given by _this and do some things but at the and the new damage value is given back, and that works like charm for me
Did that, didn't worked.
What the heck ... but exacly that works perfecly for me
D41D_Test = {_Test = 0; _Test};
player addEventHandler ["HandleDamage", {_this call D41D_Test}];```
Nope
player addEventHandler ["HandleDamage", {_this call D41D_Test;}];```
Also nope. @barren magnet Are you sure, that it works?
then something overwrite your handleDamage
Vanilla A3 stuff, nothing loaded. Thats the interesting thing oO
player addEventHandler ["HandleDamge", {0}];
player addEventHandler ["HandleDamge", {1}];
```
just add a handledamage after some min and than check the index
if the index is higher than 1 than you handledamage get overwritten
But what could cause that?
Revive
Rly?
yes
@queen cargo "VTOLs are currently crap ...
ArmA2 solution with "enable"/"disable" auto-hover was WAY better then this crap"
- I agree, the VTOLs had this ability a few months ago, is there a way to script the functionality back in?
is there a way to see what diaglogs are currently active?
I keep getting a random icon appearing on my screen.
Is there a command to have an ai search for and pick up a weapon off the ground?
@dark shadow here utilize this by creating initPlayerLocal.sqf in your mission root and pasting this http://pastebin.com/N1sFPhWZ into the file. Rebuild the mission pbo after it. Also add variable names of the reserved units into _reserved_units = []; array and add their UIDs to _reserved_uids = []; array.
credits to Kahna , ref > https://forums.bistudio.com/topic/170686-whitelisting-slots/#entry2667355
Hello to all
They are not very expert in editing and I'm learning ; I would have a problem that I can not even identify.
Virtually in a script I have a call to another script that I precompiled in init ;
when the call is made , starts the second script and complete as it should , but once done, rather than return to the first script and continue
from after the call , it starts the same script and not the beginning, but by about half .
In the second script , there are no loops .
I can not understand why , if there is need I can post here of the scripts or the entire files .
Thanks in advance
Sorry for bad english
post the rpt log file
14:25:19 Mission file: prova_eli_rico
14:25:19 Mission world: Stratis
14:25:19 Mission directory: C:\Users\Riccardo\Documents\Arma 3 - Other Profiles\{BDR}1C%2eM%2e%2aArco%2a\missions\prova_eli_rico.Stratis\
14:25:19 EPE manager release (0|21|0)
14:25:21 Attempt to override final function - bis_functions_list
14:25:21 Attempt to override final function - bis_functions_listpreinit
14:25:21 Attempt to override final function - bis_functions_listpostinit
14:25:21 Attempt to override final function - bis_functions_listrecompile
14:25:22 Attempt to override final function - bis_fnc_missiontaskslocal
14:25:22 Attempt to override final function - bis_fnc_missionconversationslocal
14:25:22 Attempt to override final function - bis_fnc_missionflow
14:25:22 Save game type
14:25:23 Mission id: a7af929700136182bfc49f9880bfc83d80971260```
Did you want to start second script parallel to first one?
No, First run then stop until call the second, then continue when second as finished
I use second script by other script ( in main project)
Did anyone try to compile c++ extension on VS2015?
Yeah it works fine, why?
I compile a simple dll, but callExtention returns just ""
Make sure you are compiling it as 32bit
Check battleye isn't blocking the extension if you are testing on a client.
If you testing it on another machine, check you have vc2015 redist installed 32bit version.
Otherwise you are making a mistake i.e dll in wrong location (not in mod foldier/arma3 root directory) or a coding mistake
May be wrong configuration? http://puu.sh/qdP2d/95c7beeac4.png
Yep, you right, I disable BE and it's working
How can I fix it to work with BE?
Or, more impotantly, will it work on server with enabled BE?
also make sure you have DllMain entry point
And it will work server side with BE enabled or Disabled
but to get it work on clients you "need" to whitelist it with BE
i want AI zombies to climb over some ramparts
like at 19:00 in this video
https://www.youtube.com/watch?v=pFl3frXkTBY
my AI zombies just stop before the rampart and don't run over?
Ok, thanks!
Hey guys .. long time tinkerer here but have come across a problem. I'm using R3F logistics and trying to pass a credits value to the init of an object in the mission.sqm but it doesn't seem to see it .. anyone got any advice ?
I know nothing about R3F logistics, but what does the line in the init of the object look like?
init = [this, 200, west, "LIGHT"] execVM "R3F_LOG\USER_FUNCT\init_creation_factory.sqf"; ( I want to change the 200 to a variable called R3F_LOG_CF_credits but when i put that in it doesnt pick it up)
and I've set R3F_LOG_CF_credits in the mission init via a missionNamespace setVariable
That would be your problem then, the object's init is executed before the init.sqf is executed
ahhhh ...anyway around that ?
name the object and run an external script on it I suppose
Or you waitUntil the object is loaded, sleep for 5 sec or something and then execute the other things
or yes name the object and run a external script in the mission file
Anybody have experience with getting ArmA2NetMySQL or extDB3 to work? specifically callExtention returing empty strings, did have ArmA2NetMySQL working but that's gone intermittant, sometimes works sometimes doesn't
Hey guys, anyone know how to remove the miniguns from the ghost hawks? I'm able to remove the ability to use the gun and the ammo but the minigun model stays. I want it to either be a static seat position or if possible add in a FFV position from the window.
not possible, without fkn around in the model (wich is not possible/legal)
isn't https://community.bistudio.com/wiki/removeWeaponTurret supposed to do that?
at least to remove the miniguns
never tried it but I've seen it before somewhere
Anybody know what I am doing wrong here? ''' this addEventHandler["Killed",[
_Soldier1 = _this select 0;
_Soldier 1 = _this select 1;
"_Soldier1 killed _Soldier2" remoteExec["globalChat", -2];
]
]
];''' Seems like the eventhandler is triggered. But nothing becomes of the globalChat execution.
wrong quotes, should be the '~' key ๐
Yes sorry, I was trying to use the code block feature for discord. Didn't seem to work. Besides that?
_Soldier 1 = _this select 1;
this is invalid
space between soldier and 1
also should be _Soldier2, but you know that
then you'll need to use format
format ["%1 killed %2", _Soldier1, _Soldier2]
no I meant to get the code block in discord working properly ๐ swap ''' with 3x tilde key
@pliant tangle Alright. Weird how that got messed up. Thanks for that.
@halcyon crypt Lol.
๐ np
"Error undefined variable in expression "this" line 1"
Looking for a group forming script much like some wasteland and koth servers. Found a few on armaholic but just not sure about them. Any suggestions on what script i should choose?
You could try this https://community.bistudio.com/wiki/Dynamic_Groups
@subtle ore how and what are you adding the event handler to?
@native hemlock thats perfect looking. Thanks again
@native hemlock I'm adding the event handler to each player.
@native hemlock I'm just executing the script on the player using the execVM command.
@halcyon crypt I used that to disable the guns, but the models remain
@subtle ore You would want to add that event handler to "player" then instead of "this". Also, I think you would need to surround your code with {} instead of [], so it would look like this.
player addEventHandler ["Killed", {your code}];
if you want it to run for each player then put it in init.sqf
if ( ! isDedicated ) then {}
if you put it on every player, with player addEventHandler it'll add multiple times for each person
or just in the dedicated player inits ๐
you can also do : this execVM "blah.sqf" - if (_this == player), but that's fiddly
BoGuu: Huh? that a new thing in A3?
ah yes that'd be a good way
@dusk sage you'd still be able to use remote exec with global chat yes?
yep
hey guys ... can you have multiple addEventHandlers for "killed" or do they overwrite ?
I need to run several bits of code following an enemy AI death
@signal maple yes you can
thats great. Just need to understand why it isnt firing then ๐ฆ
Because they're only mostly dead? Thereโs a big difference between mostly dead and all dead.
I'm sure that a bullet in the head, after ragdolling means that they are dead ๐
that would do it
hello, addOwnedMine work?
magic... does not work for me ๐
dont work for me: _bomb = createMine ["SatchelCharge_F", ASLtoAGL getPosASL player, [], 0];
player addOwnedMine _bomb;
player action ["TouchOff", player]; mb my game is broken?
how do i make animation work in senario ?
it work only if i put it in the debug console?
UNIT playmove "AmovPercMstpSrasWrflDnon_Salute"; UNIT disableAI "ANIM"
Pennyworth - letzten Sonntag um 01:49 Uhr
I definitely remember seeing a commit to CBA or ACE by @little eagle that I believe had an isNil check for canSuspend to tell what version of the game was being used, but I'm unable to find the commit or the syntax used
Yeah. isNil {canSuspend} to check if 1.58 was used. I saw the method in vanilla with isNil {is3DEN}
(damn discord)
it's probably better to use productVersion select 2 though
@strong shard addOwnedMine is still broken
For some reason I can't remember but EachFrame EHs don't execute on dedicated environment right? Only on hasInterface, yeah?
Makes sense to me since servers don't really draw frames...but having a brainfart atm
That's only the case for Draw3D EH.
DS/HC still run simulation, each simulation "tick" is a "frame".
๐
guys - noob scripter here .... why can't I get this to fire? says _x is undefined - I thought Arma3 took _x as anything
while {true} do
{
if (_x isKindOf "Man") then {
_x addEventHandler ["killed", {_this call KREM_fnc_enemyKilled} ];
//diag_log "killed AI";
};
sleep 10;
} foreach AllUnits;
I'm putting this in my server init
sorry for being a noob ๐
_x is a magic variable used in apply, foreach, select and other places I can't remember
and for the love of coding, stop using while {true} do loops
lol .... told oyu I'm a noob ... how could I get this to fire then
I need the eventhandler to added "killed" onto all AI that are spawned dynamically
- You didn't wrap the do block and foreach block correctly
- That is not going to do what you want. You're about to add a new EH every 10 seconds, which means in 30 seconds, when you kill a unit that's been there all the time, your code is going to fire 3 times.
You have:
while {...} do {...} foreach <array>;
You need to make it:
while {...} do {
{...} forEach <array>
};
Thanks @solar geode .... although I tinker with code in Arma I'm not very good
However, what you're about to do is highly inadvisable.
is there a better way then ... don't want to take up too much of your time
If you have CBA, it's quite simple.
["CAManBase", "killed", {
<code here>
}] call CBA_fnc_addClassEventHandler;
cool .. will try that out !
if you don't have CBA and this thing actually works, this may be of use: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/addMissionEventHandler#EntityKilled
thanks too @thin pine
That's actually probably even better. I forgot they added that.
From what I understand that's one EH that applies to all entities ๐
and it will keep running on all dynamically spawned AI ?
You will need the condition you have for isKindOf.
Yeah I think so..and you'll need isKindOf to filter out men only yeah
Hi everyone. It is possible to compile dll ext w/ cygwin or minGW? I really don't like VS ๐ฆ
I tried to do it with -shared flag, but arma does not seem to see dll entry point
@placid trellis try in #arma3_tools
@halcyon crypt No, all compiles just fine. Flags are: -std=gnu++11 -shared -o example.dll and my code: https://gist.github.com/swatSTEAM/36ef6a0fabc9fbb5f69bf953d190b26f
It works in VS. I think I should somehow differently handle dll entry point for mingw
Heya. Was wondering on how to properly use the radius condition from the addaction command. I only really want to set the radius, and not bother with the other conditions, so i was wondering on how to go on about doing that.
this addAction ["something", "script.sqf", , , , , , ,3];
do i have to fill in ALL of the conditions before Radius? Or can i leave them empty?
To my knowledge you have to fill them in but you can just use the default values listed here https://community.bistudio.com/wiki/addAction
So you'd do something like
this addAction ["something", "script.sqf", nil, 1.5, true, true, "", "true", 3];
this addAction ["something", "script.sqf", nil, 1.5, true, true, "", true, 3];
like that?
oh ๐ฎ you typed it aswell ๐
ok, will try! Thanks @native hemlock
@placid trellis if it compiles then it should work fine. I'm pretty sure that I had something that worked fine and was build with mingw a couple of weeks ago. Are you starting the game with BattlEye? Maybe it's blocking it.. dunno
I think I did a static build though
@halcyon crypt BE disabled and the same code works with VS. Can you give me the build flags?
-std=c++11 -march=i686 -m32 -O2 -s -fPIC -fpermissive -static -static-libgcc -static-libstdc++ (that's to compile Intercept)
and seeing that now, are you compiling it as 64-bit by any chance? ๐
It's so retarded that you can't use nil everywhere for commands like addAction compared to functions
nil call { systemChat format ["_this : %1", _this] } talk about retarded shit related to nil...
Is it possible to have "peer to peer" scripts that don't interact with the server without using CBA? If so, where can I read about it? Is it safe for multiplayer, or are there enough security issues that it would be better to just put a bit more load on the server?
Please and thanks. โค
Any message to any client has to go over the server so no. You can run a small redirect script on the server that basically calles remote exec on the target client. Srccli ->(remoteexec) server ->(remoteexec) targetcli
@Dedmen although not an expert but I'd also assume there's no direct p2p connections, however I believe the internals of arma are already running such a redirect script so no need to write your own. @Kal look at both publicVariableClient and the target owner id parameter of remoteExec....
can you attach an event handler to the abort button? I think read somewhere that you can't.
@opaque topaz Although I've never done it, you should be able to. After googling I found a script that disables the abort button (thus accessing the abort button). The display's idd is 49 and the abort button's idc is 104. To work with the display and the controls the actual pause menu dialog needs to be open, to execute code upon opening of the pause menu use https://community.bistudio.com/wiki/Description.ext#onPauseScript
To attach an eventhandler you can probably just use the normal user interface eventhandlers https://community.bistudio.com/wiki/User_Interface_Event_Handlers or if absolutely needed - https://community.bistudio.com/wiki/buttonSetAction
Might you elaborate the problem a bit? What animation are you talking about for starters?
i want that ai will be cuffed an the mission starts
this playmove "Acts_AidlPsitMstpSsurWnonDnon01";
doesn't work
@thin pine That should work perfectly, thank you.
I very much doubt it but does anyone have a method to retrieve the commandline or otherwise the loaded mods in SQF?
๐ค
@thin pine configBin >> CfgPatches
to get the actual command line, you need a dll extension
ah
forgot about the patches, the cfgpatches may be good enough....I'm just creating a sort of debugoutput function people can execute to get important info when posting bugs ^^ cheers
ok it work now
sleep 0.1; bob playmove "Acts_AidlPsitMstpSsurWnonDnon_loop"; bob disableAI "anim";
added the sleep 0.1
I googled and I googled...I searched the wiki but to no avail. cheers torndeco
retrieve the commandline
is saved in rpt
i dont think you can reach it with loadFile though => dll extension
yeah its okay, the goal was just to get a list of mods, either through a command or perhaps commandline. And I'm writing this code so certain folks don't need to go into RPT ๐ (copyToClipboard)
@marceldev89#4565 Even with these flags still not working... Thank you anyway.
@thin pine never new about the onPauseScript
How can I get my custom difficulty to load with forced advanced flight model?
When I launch any default difficutly, I can get it to force AFM, but whenever I launch with difficulty "Custom" on Windows 2012 R2 server, it says my flight model is standard from the server browser.
@thin pine also, I tried executing this in debug console but it still wasn't working properly ```
disableSerialization;
waitUntil {!isNull (findDisplay 49)};
_abortButton = (findDisplay 49) displayCtrl 104;
_id = _abortButton ctrlAddEventHandler ["onMouseButtonClick", {diag_log format["Abort: %1", _this]}];
hintSilent str(_id);```
forgot to say I wrapped it with spawn
what does finddisplay 49 return in the watch tab?
idk actually forgot to debug that hang on...
Probably no display
ok so I did this now ```
["XON_PFH", "onEachFrame", {disableSerialization;
diag_log str(!isNull (findDisplay 49));
_abortButton = (findDisplay 49) displayCtrl 104;
_id = _abortButton ctrlAddEventHandler ["onMouseButtonClick", {diag_log format["Abort: %1", _this]}];}] call BIS_fnc_addStackedEventHandler;```
I see false when not in the menu and I see true when I am in the menu
so it seems to be working as it should
I'm the editor FYI
just tried in my server when clicking on abort but I still do not see my message in the rpt
I don't think attaching an event handler to the Abort control is possible?
What are you trying to do with it
Remove mission event handler
wow I'm an idiot I think I can just use BIS_fnc_addStackedEventHandler
whats the easiest way to test end-game-spectator/BI spectator mode/framework?
a3 editor preview -> press ESC -> spectator?
well i want to do a thorough test - means to watch both AI and a player; infantry and vehicles - find out about all its possibilities and limitations
is there a bug in invade and annex that prevents the FOB from being moved?
also instant objective respawn
That seems like a question for the invade and annex developers
is
_unit = _this select 0;
if (( typeOf _unit isEqualTo "B_Helictoper_F") || ( typeOf _unit isEqualTo "B_Pilot_F")) then {
_unit setPos (getMarkerPos "Aviation");
};
inside of OnPlayerRespawn.sqf supposed to make a player move to a diffrent respawn point if they're a type of infantry unit?
@native hemlock found the problem. It was me xD I thought the FOB placement was just illogical
Probably a pretty noob question, but what's a clean way to have the game wait to call a script after, say, 10 minutes, without just doing "sleep 600", or a script specifically meant to just wait then check a variable?
I've been wanting to know for general knowledge, rather than a specific problem I have.
A dummy example would be if, say, in my init.sqf, I had a script that told an AI to walk to a point. If he took longer than 5 minutes, it'd hint "Failed!". But I have other scripts I call in the init.sqf that I needed to run after that AI started moving. What's the 'best' way, in terms of usability and performance, to do this?
You can use waitUntil in combination with https://community.bistudio.com/wiki/scriptDone ?
What I would do is use the Init.sqf as a root, and branch off other scripts from it. So make a separate file for the whole timer thing, and the results of that timer can be programmed in that specific file handling the AI movement.
I think I get at what you're doing but using the init to call a separate script is probably your best bet @tough abyss
Ah, darn. I was hoping there was a more elegant way, but at least I know now. Thanks, @plucky beacon, for expanding my knowledg ๐
If you're using waypoints you can use them in conjunction with triggers. Waypoints can run scripts when they are completed.
Let's say I have a mod and the mod uses functions that are placed within the class CfgFunctions, when are those functions compiled? At game start or at mission init?
@opaque topaz at game start as the wiki functions library page says :)
You can also make it recompile every mission start if you mess with attributes
@placid trellis did you get it to work?
Hello i am looking for someone that knows how too script any one willing too help?
@tough abyss terms?
I prefer text, pm
Anyone have a good way of retrieving someones profileName from their playerUID?
you mean while person is on the server or converting the uid to a name?
@blazing zodiac if you want to convert uid to an always up to date steam name you'll need an extension....otherwise you can create a small database with uids and profile names that gets updated every time someone connects...you can retrieve the profile name with https://community.bistudio.com/wiki/profileNameSteam
@thin pine I was looking on the wiki and couldn't find anything, guess I need to get my eyes checked ๐
Im trying to force unlock some car via script, im doing this in script after his init - [[Car1,false],Lock] call BIS_fnc_MP;
But it`s not working.
Can any1 give me the cue ?
@urban ocean wouldn't it be car1 setVariable ["locked",false,true] ? It's either lock or locked, I don't remember. Not near my computer.
Actually, here you go: https://community.bistudio.com/wiki/setVehicleLock
Found a way http://pastebin.com/qQ2uVDVi. I wrote that in init.sqf, need this action on every player, on action it should remove my custom action and then some other things.
Seems it works
But should i write publicVariable var after every changing ?
Because it`s declared in init.sqf ?
You can check the locked state of a vehicle using locked: https://community.bistudio.com/wiki/locked
is there a way of checking if an actual mission is loaded before continuing with addon?
so it doesn't trigger in main menu/editor
@tough abyss Converting the UID to a name
Is setVehicleLock and Lock fnc global ? its icon G in wiki, but when im using it on local pc it have local effect
Should i use it via fnc_mp ?
@blazing zodiac what would you need it for? Why need their steam name?
@fiery shard do you mean a delayed launch of an add-on?
@plucky beacon well I was worried if it would try to execute in the main menu or something
rather than not doing anything unless it was inside a real mission
I guess I could just wait until there are real players present I guess
@fiery shard kind of a confusing question. What type of mod are we talking about. Like a conversion mod?
server side addon, looks at units during the missoin
but connects to a database in it's init
tbh if it's server side maybe I'm worried about a problem that doesn't exist
I guess you can only know through tests
@tough abyss I dont need their steam name neccessarily, I need their arma profileName and its for a stats menu inside my main mission menu
Actually scratch that, I think I have a way to do it. I'll report back after some testing.
@fiery shard Launch your addon init from the mission on server launch...?
Is there any way to launch the Server Browser from scripts / RscDisplayMain? e.g. Main Menu programming and Spotlights can open the campaign window (i.e. createMPCampaignDisplay) but would like to link into the Server Browser.
nvm, figured it out.
@blazing zodiac why don't you just use the 'name player'
@tough abyss That's pretty much the approach I'm gonna use, haven't had a chance to test it yet though. Been a very busy day.
I'm using it quite some of my mission, names popping up when entering a command post for authentication
Does anyone know if there's a way to unset camSetTarget, or do you have to create a new camera
Objnull doesn't work
'unset'?
I'm using a cinematic cam at mission end
And at a certain scene I use camsettarget on the cam
but after that I wan't the cam on annother position again but it keeps tracking the target
Only thing that makes the cam not chase is camSetTarget position
But that would mean I would have to use that from there on
where i'd rather just 'unset' the target or disable camSetTarget or how you would name it
i want to spawn a composition from action manu that i made in the ARES mod how do i do it?
i have the composition cod from the rtp
*code
๐ค
@cold rampart there are issues with that command....you can try using camSetTarget objNull although in my experience that doesn't always work
i want to spawn a composition from action manu that i made in the ARES mod how do i do it?
i have the composition cod from the rtp
*code
i managed it to work only on spawn from the editor not via Addaction [position this ,0, call (compile (preprocessFileLineNumbers "comp.sqf"))] call BIS_fnc_ObjectsMapper; any help?
guys just a question fast, I am making different spawn locations in georgetown, is this right code? spawnMarker = "georgetownspawn_1,georgetownspawn_2,georgetownspawn_3";
or does it have to be "georgetownspawn_1","georgetownspawn_2";
If its ment to be a array, spawnMarker = ["georgetownspawn_1","georgetownspawn_2"];
looks like this https://gyazo.com/38c2cf406ac14c31276b426b08d5d00c
it never had any [] in it from beginning
nah thats just one big string
it seems i muted here ๐
Is this from an mod or just vanilla arma?
vanilla arma
like it was like that from beginning when I played on altis and it worked fine
im trying to get a reference.
I changed to tanoa and all i'm doing now is changing the names and stuff
ok, well if it works it would be alright ๐
here is the altis one I haven't changed yet https://gyazo.com/9e9e963b388e817744329bc6c5fc5a39
did you test it?
not yet but I don't want to you know ruin everything since I always have bad experiences when my server doesn't work and then it gets confusing
yea, just what I though, for each spawn marker you need to make a new class.
ok
so, georgetownspawn_1 got its own class, georgetownspawn_2 and so does.
โพ
baseball?
just checking that you can see the my message
becuse i was asking for help and nobody refer to it
Just remember, people may not have an answer to your question (or have time or even have noticed it). As such, the Bohemia Interactive Forum is sometimes a better place to ask questions.
Guys I got a question, basically I have made a Tanoa Map, I replaced the mission file with the Altis mission file with the Tanoa, and I changed the folder "Altis_Life.Altis" -> "Tanoa_Life.Tanoa". And when I start my server I get setting up client, please wait. So question is is there more stuff I have to change on my files, sqf or anything? Because I have been told I can still use same database and I don't need to change anything with that but I can't get in using my Tanoa mission file.
Looking for someone to review the current status of my project. Someone with extensive experince on larger scale and more complex projects preferred, I can pay for your time. Contact me in a PM to talk about it. TLDR; seeking paid consultant.
@quiet bluff https://community.bistudio.com/wiki/addAction
@slate vale you should probably ask the person that told you that ๐
Okay, but I got another question then, you know how you let's say you start a new scenario, for example Altis or Tanoa. There is all these buildings (objects) that are already built in there that you can't move. I searched this up and there was a video but it didn't work for me, apparently it has something with hideObjectGlobal to do, now there is these 2 big skycrapers in Tanoa I want to get rid of but I can't, any good tutorial or someone who could help me out figuring that out?
According to a video, I must type this in (after a marker) _location=[7111.83,5683.86,0];
_radius=50;
_terrainobjects = nearestTerrainObjects [_location, [], _radius];
{hideObjectGlobal _x} foreach _terrainobjects; https://www.youtube.com/watch?v=gCowVgQMlv8 here is the video to see if anyone could help me and see if i have done anything wrong, would be really appreciated
maybe someone could test this to see if it actually works or just me doing it wrong
How hard do you guys think it would be to script a launch and catch device, like an air craft catapult and wire? Like, just a trigger that thrusts a jet to takeoff speed and can stop it quickly if it lands back inside of the trigger.
@vapid frigate, yeah, that's very neat! However, I'm looking into a scripted solution as to not require mods for use. Thanks for sharing, though!
@tough abyss, okay, awesome info, thanks!
I guess the scripting side would just be scaling the velocity
Seems that way.
Any Rsc wizards around?
_display = uiNamespace getVariable "FFDisplay_Label";
_AlphaStatus = _display displayCtrl 1301;
_BravoStatus = _display displayCtrl 1302;
_CharlieStatus = _display displayCtrl 1303;
// Init the display variables
while {ACTION_PHASE} do {
// set and render?
// Set images for the point display crtls
_AlphaStatus ctrlSetText ALPHA_DISPLAY_STATUS;
_BravoStatus ctrlSetText BRAVO_DISPLAY_STATUS;
_CharlieStatus ctrlSetText CHARLIE_DISPLAY_STATUS;
// set flag status based on string stored at global variables
sleep 1;
// cut the display
cutRsc ["FFDisplay", "PLAIN"];
}; // while ```
I know action phase is true, and I know I have strings stored at those globals...
I am also very certain those strings link to a image that exists.
Well, a .paa
What more would one need to explain why this does nott render a hud that updates as needed
@dull parrot You only need to cutRsc once iirc, that'll open up the resource. After which you can mess around. So try moving that cutRsc above the loop (assuming its the same resource)
@tough abyss, thank ya.
I KNOW, 100% that sectorA_blue.paa is a BLUE image.
I KNOW that my site is Postive 10
It sets the damn flag texture JUST fine.
Hell, it EVEN 100% of the time outputs to system chat the CORRECT SIDE, west...
BUT
IT ALWAYS, puts the opposing COLOR .paa into the RscDisplay.
ALPHA_STATUS = "west";
ALPHA_DISPLAY_STATUS = "data\images\rsc\sectorA_blue.paa";
ALPHA_POLE setFlagTexture "\A3\Data_F\Flags\Flag_blue_CO.paa";
systemChat format ["ALPHA STATUS IS NOW OWNED BY = WEST"];
};
// set ownership of alpha to east and display to red
if (_alpha isEqualTo -10) then {
ALPHA_STATUS = "east";
ALPHA_DISPLAY_STATUS = "data\images\rsc\sectorA_red.paa";
ALPHA_POLE setFlagTexture "\A3\Data_F\Flags\Flag_red_CO.paa";
systemChat format ["ALPHA STATUS IS NOW OWNED BY = EAST"];
};```
No other place is this PAA set OTHER than the inital cut, which is a white image.
Testing it, by changing +10 to RED, and -10 to BLUE
OUTPUTS THE CORRECT COLOR PAA!~!!!!!! however, double, triple checking my images are red and blue respectivly.
#whatthefuck?
if (_alpha isEqualTo 10) then {
ALPHA_STATUS = "west";
ALPHA_DISPLAY_STATUS = "data\images\rsc\sectorA_red.paa";
ALPHA_POLE setFlagTexture "\A3\Data_F\Flags\Flag_blue_CO.paa";
systemChat format ["ALPHA STATUS IS NOW OWNED BY = WEST"];
};
// set ownership of alpha to east and display to red
if (_alpha isEqualTo -10) then {
ALPHA_STATUS = "east";
ALPHA_DISPLAY_STATUS = "data\images\rsc\sectorA_blue.paa";
ALPHA_POLE setFlagTexture "\A3\Data_F\Flags\Flag_red_CO.paa";
systemChat format ["ALPHA STATUS IS NOW OWNED BY = EAST"];
};```
THAT however works?
#twilightzone?
And I am 10000000% sure, my images are correctly labeled, and the correct color.
maybe it's the way you're using ALPHA_DISPLAY_STATUS
@dull parrot coloring of images get fucked if the x or y of your images isn't a power of 2...eg if your images are 200x200 it will fuck up....they'd need to be 256x256 or 128x128.....or 512x128 etc.......can you verify they are?
Yeah that won't work.......
Although my experience with this 'feature' has mostly been with transparent images..idk about solid images but I imagine it could be the cause
Well the color is not distorted
And I can get both a blue and red and white image to display
Just none at the proper times.
I am working on a new skeleton using a even driven system
using a more event driven system, when I come back around to assiging these images I will see if it persist, if so I will look into rezising first.
Alright
I also have a mess of loops, and just to much bs... time to re-design. I think somewhere I am overlooking something...
Lol I tend to facepalm every six months or so when I've learned a lot and I look back at old code. "I can redesign this to be much more efficient"
So by all means go for it and good luck
If it's recommneded to avoid spawn how do people handle async operations like waiting for a db to return?
Hi guys i am using '''call ATH_fnc_Export_Locs;''' to pull the the map location names in a .JSON file. It doesn;t seem to be grabbing all the place names. Am I missing something? Sorry, my code knoledge isnt the greatest.
'call ATH_fnc_Export_Locs;
Lol there we go...fail
Nice shiny new avatar @tough abyss ๐๐ป
Is there a way to select ( using nearRoads ) only trade of some kind ?
For example , among the segments found in a area , choose only the highways
Get all roads in your area and check if their class names are the same with the onces from a highway.
?
Just seen you can't get the class names from roads anymore.
Then you could use getModelInfo and get the .p3ds to match.
Roads never had classname
Hm, for some reason getModelInfo and even str doesn't show road model, this wasn't the case before
i want to limit player in certain area if them leave it kill them after 10 seconds
if there is a way with a trigger and no script that would be great
To do anything useful with a trigger you need scripts in act\deact fields too
I suck with triggers, I'd do it through location
@quiet bluff if I understand you want to kill players in a trigger after 10 sec?
@meager granite getModelInfo gives you an array of strings.
@distant egret I just tried with altis roads and models are always empty as well as debug output through str
Yea see it, was testing it my self in a cup map. Works there...
@quiet bluff
Condition:
player in thisList
On act:
terminate client_killTimerThread; hintSilent "";
On dea:
client_killTimerThread = 10 spawn {
waitUntil {
hintSilent parseText format ["Get back or you'll die<br/><t size='6'>%1</t>", _this];
sleep 1;
_this = _this - 1;
_this < 0;
};
hintSilent "I told ya";
player setDamage 1;
};
@distant egret outside the triger
Here's your solution on a silver platter ๐
Works only for single trigger and local player (No AI or other vehicles)
thanks sa-matra
(Fixed typo)
it dosen't work
Activation
Should be everybody
repeatable probably too
Not sure what "Type" is, I've used 2d editor menu
ok that work thank you
Hi guys, I'm having some troubles with a cutscene script and I was directed to this discord here for help. My issue, as it stands, is that when a cutscene plays mid op (Once a trigger fires), is that the cutscene plays fine, but when it's over the screen fades to black and doesn't go back to the player camera.
If anyone's willing to take a shot at it, I'll post my code.
cutscene2.sqf : http://pastebin.com/mdmdJGFa
The trigger which fires: http://pastebin.com/TzQ8PTXX
If you need to, I'll post camera_work.sqf.
Add player switchCamera "INTERNAL"; at the end?
At the end of the cutscene? I've tried it, but I'll give it another whirl.
Oh btw if it blacks in, you'll need to remove black screen afterwards
That's my issue, most likely. How can I do that?
Wait, its BLACK IN means it removes black screen
So what exactly happens? It turns black at the end or black disappears?
At the end of the cutscene, the screen fades to black and doesn't return to a player camera or anything. I tried it yesterday, and IIRC, I couldn't get any player input to work either. I'll try that again, though.
cutText [" ", "BLACK IN", 3];
Should mean it turns black to normal in 3 seconds
Something else somewhere makes it turn black maybe?
I'm taking a look. If you'd like, I can post a short video. That might explain something.
Anyway, try switchCamera, if it doesn't work you'll need to find where camera is created and do <camera> cameraEffect ["terminate","back"];
For getting back player control ^
I put 'player switchCamera "INTERNAL";' at the very end, after the last bracket.
Still throwing the issue at me -- this is the last bit of my code
` sleep 0.1;
};
cutText [" ", "BLACK IN", 3];
"dynamicBlur" ppEffectEnable true;
"dynamicBlur" ppEffectAdjust [100];
"dynamicBlur" ppEffectCommit 0;
"dynamicBlur" ppEffectAdjust [0.0];
"dynamicBlur" ppEffectCommit 4;
player switchCamera "INTERNAL";
}; `
You end up with black screen?
https://youtu.be/ZmDkqHkDuoA here's a video.
I'm going to try to remove that last bit, see if that helps at all
Also as a side note, why you send introstarted it doesn't seem to be defined anywhere:
introended = true; publicVariable "introstarted";