Search the Community
Showing results for tags 'sqs'.
Found 8 results
-
How to add player ID's automatically in loadout.sqf
bohemia_kaiten posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I was wondering if there is any way to require data from .json files inside q .sqf file. Or anything that covers that functionallity. The thing is: when a player buy a new custom loadout on the website, a post request is made with his ID to a file. Then, the if statemant checks the json file to watch for the player ID instead to watch for it on the array. the execVM function can do this? there is other way? Thank you all. //Default way for doing this if ((getPlayerUID player) in ["456789123"]) then { //Donators: Nobody DefaultMagazines = [{custom_items}]; DefaultWeapons = [{custom_items}]; DefaultBackpack = "{custom_item}"; DefaultBackpackWeapon = "{custom_item}"; }; //Exepected way loadout.sqf if ((getPlayerUID player) in {file.json} ) then { //Donators: Nobody DefaultMagazines = [{custom_items}]; DefaultWeapons = [{custom_items}]; DefaultBackpack = "{custom_item}"; DefaultBackpackWeapon = "{custom_item}"; }; //JSON with the buyers ID's file.json {[ '123456789','987654321', '159753468',..... ]} -
hello guys, is there any *.sqs to *.sqf converter program ? i tried to do it manually, but its a mess...i'm not used to "goto" command and have lot of troubles re-thinking the logic behind the script ! thanks for any help!
-
Need Help Making Simple Money System
npmproductions13 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi everyone i have an issue making a simple money script / function in my mission. I'm finding the syntax of SQF and SQS difficult to understand or comprehend in comparison to languages like java and C#. I used this sample below as a baseline but the guy who responded didn't tell the OP of that forum how edit the value of your "Bank" right now I've created a object of money with an add action that adds money to my Currency variable, but now i want to extend that to the death of 'X' unit and i came up with this. To some this code might be laughable but i don't understand why this doesn't work when executed via a units init. Any input is appreciated. _man = _this select 0; while {alive _this} do { if (!alive _this) then { //GoldCurrency = GoldCurrency + 1000; hint"DEAD"; }; }; Many Thanks -Irish -
ok , i need some sqs pro's (read inside)
dr death jm posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
alright , I'm so close to having my mission working 100% including ai commanders .. but my lack of real scripting/coding has put a big hold on me finishing this mission as sqs , to later then start porting it from sqs to sqf .. issues are variables and defines in two different scripts ... not a lot of errors but ive tried everything I know from _myvar = objnull, _myvar = [], _myvar = true, faults ,this select... it goes on and on... and is why I'm asking anyone that know how this stuff is done .. I NEED HELP. and before I hear again "just rewite it in sqf", this is not the point, I need it working as it was made fully before I cant start to do any sqf to the existing sqs scripts... ive been partly down this road and things get worse.. thank you if anyone is up to it.. might only take a good scripter/coder 10 min? for me its all guessing ... pm me here of steam Dr Death JM- 22 replies
-
long time waited, KaRRiLLioNs RTS3 from ofp is now here.... https://www.dropbox.com/s/uuniycc1icyf47s/Karrillions_rts_3_%2824%29_.Altis.rar?dl=0 this is working 99% there are some small things that are still work wip. #1 script issue is vtol, still trying to fix. #2 most scripts are still sqs... everyone is welcome to edit/fix. please also post any modified RTS3, so other servers or players can enjoy the game/mission If anyone would like to team up to make this a mission of all time (again) please let me know. I played this mission in ofp for years .. on KaRRiLLioNs BootCamp. but please post your updates here (same as bugs). you do not have permission to edit any credits to the people that have put time into the mission fixes. if you do edit any fixes you are more than welcome to add your name to the existing credits. you do not have permission to edit the name of mission. you do not have permission to use this mission in any way of making money. any other questionable what you can do and not do "please ask", but remember Bohemia left the mission scripting to you and it is limitless. ill post some pics and links to vids later or just click my youtube below. all pic and vids are welcome. if you wanna just test the mission BiNaRyBoNe BooTCamP ip 67.212.78.133 port 2302 some other info: binarybone server belongs to certa the maker of ofpwatch (I'm sure some remember him). so anyone wanting some nostalgia let me know I can get the old gang in for some fun
-
locality , (on with my sqs) fixes need some help
dr death jm posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
ok, so running a mp mission test with a few players , everything ran smooth, I noticed some makers blinked of sides makers (cap area) and some didn't .but the error issue I did see is after getting to enemy base I hacked into there tank factory to build (a tank) to inflict damage on there base. as it did work I ended up with makers errors .. of my tank in suspecting.. somewere in my mission I don't think ai or players sides are being defined or maybe there makers? like I said all works good till I build tank with ai at enemy base... if anyone wants to help or see the challeng, pm me I will upload mission. you wont regret helping .. the mission is awesome as is.. but as I'm updating arma3 fnc and commands (its getting better). this is for rts3, rtsV is on rest for me at the moment, (zen has been building a new system for rtsV). -
sqs help, 1 error left (vtol/stol)
dr death jm posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
_vcl = _this select 0 _aID = _this Select 2 _vcl RemoveAction _aID _vtolOnID = _this Select 2 _vtolOffID = _this select 0 _vcl removeAction _vtolOnID _helpmsg = Format["HOW TO USE vtol\nIn options the keyboard keys which control the following moves will control vtol.\nMOVEUP - THRUST +\nMOVEDOWN- THRUST -\nMOVELEFT - ROTATE L\nMOVERIGHT - ROTATE R\nMOVEBACK - STOL BRAKE\nMOVEFAST - STOL TURBO"] _max = 15 karr_maxvtolSpeed = 200 ;;#vtolInit ?karr_vtol : karr_vtol = FALSE; PSOn = 0; _vtolOnID = _vcl addAction ["ACTIVATE VTOL","karr-vtol-On.sqs"]; _vtolOnID = _vtolOnID; exit ?!karr_vtol : karr_vtol = TRUE; PSOn = 1; hint _helpmsg; _vtolOffID = _vcl addAction ["DEACTIVATE VTOL","karr-vtol-On.sqs"] ;;#Waitforvtol ~0.1 ?IsNull Driver _vcl OR !Alive _vcl OR !Alive Driver _vcl : Goto "Finish" ;;hint "vtol on" #vtolLoop ;;hint format [" ProSphere Controller Lite\n\n X-Axis %1\n Y-Axis %2\n Z-Axis %3\n A-Axis %4\n B-Axis %5\n C-Axis %6\n\nTurbo?: %7\n\nPSOn: %8", PS select 0, PS select 1, PS select 2, PS select 3, PS select 4, PS select 5,vtolturbo,PSOn] ~.001 _x = PS Select 0 _y = PS Select 1 _z = PS Select 2 _a = PS Select 3 _b = PS Select 4 _c = PS Select 5 _xThrust = (velocity _vcl select 0) _yThrust = (velocity _vcl select 1) _zThrust = _max * _z #Lateral Thrust ?_x > 0 && _xThrust < +10 && _yThrust < +10 && Speed _vcl < +20 && Speed _vcl > -20 : _factor = _x*.1; _dir = GetDir _vcl; _xThrust = (_factor*(cos _dir))+(velocity _vcl select 0); _yThrust = (_factor*(sin _dir))+(velocity _vcl select 1); ?_x < 0 && _xThrust > -10 && _yThrust > -10 && Speed _vcl < +20 && Speed _vcl > -20 : _factor = _x*.1; _dir = GetDir _vcl; _xThrust = (_factor*(cos _dir))+(velocity _vcl select 0); _yThrust = (_factor*(sin _dir))+(velocity _vcl select 1); ;;hint Format["XThrust: %1\nYThrust: %2\nZThrust: %3",_xthrust,_ythrust,_zthrust] #Vertical Thrust ?_zThrust == 0 : _zThrust = -.30 #Rotation _rotation = 0 ?_c > 0 : _rotation = .4 ?_c < 0 : _rotation = -.4 _speed = [_xThrust,_yThrust,_zThrust] #STOL Turbo Brake ?_y < 0 AND Speed _vcl > 0 : _xThrust = (-.2*(sin getDir _vcl))+(velocity _vcl select 0); _yThrust = (-.02*(cos getDir _vcl))+(velocity _vcl select 1); _speed = [_xThrust,_yThrust,_zThrust] ?_y < 0 AND Speed _vcl <= 0 : _speed = [0,0,Velocity _vcl Select 2] ?!karr_vtol OR !Alive _vcl OR IsNull Driver _vcl : goto "vtolOff" ?(speed _vcl) < karr_maxvtolspeed AND (Fuel _vcl) > 0 : _vcl SetVelocity _speed ?(speed _vcl) < 80 : _vcl SetDir (GetDir _vcl) + _rotation ?jm_vtolturbo AND (Fuel _vcl) > 0 : Goto "vtolTurbo" Goto "vtolLoop" #vtolTurbo ~.001 ?(Fuel _vcl) > 0 AND (jm_vtolturbo) : _vcl SetVelocity _speed; _vcl SetFuel (Fuel _vcl) - .0003 ?(Fuel _vcl) > 0 AND (_z > 0) AND (Getpos _vcl Select 2 < 1) AND Speed _vcl > 10 : _vcl setvelocity [(velocity _vcl select 0),(velocity _vcl select 1),(velocity _vcl select 2) + _height];_wait = 3; _vcl SetFuel (Fuel _vcl) - .1 ?!jm_vtolturbo AND Alive _vcl AND !IsNull Driver _vcl : Goto "vtolLoop" ?!Alive _vcl || IsNull Driver _vcl || !Alive Driver _vcl || !karr_vtol : Goto "vtolOff" _fuelfactor = 0 _factor = .11 ?Speed _vcl > 300 : _factor = .35; _fuelfactor = .001 _xThrust = (_factor*(sin getDir _vcl))+(velocity _vcl select 0) _yThrust = (_factor*(cos getDir _vcl))+(velocity _vcl select 1) _zThrust = (Velocity _vcl Select 2) + .15 ?(Getpos _vcl Select 2) < 2 : _zThrust = Velocity _vcl Select 2 hint format["%1",_factor] _speed = [_xThrust,_yThrust,_zThrust] ?(Fuel _vcl > 0) : _vcl SetVelocity _speed; _vcl SetFuel (Fuel _vcl) - _fuelfactor Goto "vtolTurbo" #vtolOff PSOn = 0 karr_vtol = FALSE jm_vtolturbo = FALSE ?isNull _vcl || !Alive Driver _vcl : Goto "Finish" Exit #Finish _vtolOnID = FALSE _vtolOffID = FALSE Exit -
[Other] Notepad++ OFP/CWA Syntax Highlighting
kenoxite posted a topic in OFP : MISSION EDITING & SCRIPTING
OFP LANGUAGE DEFINITIONS FOR NOTEPAD++ Language definitions for: SQS, SQF, EXT and CSV Comes in three different color schemes: black, orange and blue Notepad++ is a free, open source text editor with several and powerful built-in tools. I've been coding for OFP/CWA (and anything, really) with this text editor for years now, but it lacked a complete and updated SQS, SQF, etc language definition. That's why I decided to create one myself and sharing it with other OFP scripters. DOWNLOAD: - http://www.mediafire.com/download.php?cp6h9od9t24296y - http://www.multiupload.nl/183S10NIHH INSTALLATION 1. Decompress the zip file 2. Open Notepad++ 3. Click on "Language" (at the top menu) 4. Select "Define your language..." 5. Click on the "Import..." button, browse to the directory you decompressed the zip file and select one of the xml files of the scheme you want to use 6. Repeat step 5 until all the xml files of that scheme are imported 7. Restart Notepad++ 8. Open any SQS, SQF, EXT or CSV file. You'll see that now the syntax is correctly highlighted You can download Notepad++ from here: http://notepad-plus-plus.org/ -- I'm not sure if this is really the right place to post something like this. But being it related to scripting I thought it'd fit better here. Feel free to move this to wherever it should be if this isn't the right place. -- I just realized two things: I totally forgot about .ext syntax. And there's quite a lot of this stuff already posted, but all for Arma 2. Oh, well. I hope this is useful for someone else anyway. I'll update this with the .ext support later -- Ext suppport added. File updated