Jump to content

mrflay

Member
  • Content Count

    117
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by mrflay

  1. mrflay

    FLAY Hang Glider Mod

    Yes, but that would require a new character/uniform model which I don't know how to do. There is a basic (invisible) wingsuit that you can try by pressing shift+space when airborne in the hang glider. It's not very realistic, though.
  2. mrflay

    FLAY Hang Glider Mod

    New version (0.2) available, see first page for download link. It's now licensed under APL-SA as it includes sound files from Arma 2.
  3. mrflay

    FLAY Hang Glider Mod

    Happy New Year! Yes, next update will feature the following changes. - Bundled pumpkin's thermal/ridge lift script (thanks pumpkin). - Fixed explosion on impact (thanks Sakura_Chan). - Fixed smoke on damage (thanks super-truite). - Fixed harness obstructing view in first-person. - Fixed low poly wheels in first-person. - Bundled Arma 2 wind noise (thanks BIS!) - Clean-up scripts & config files. - Variometer available as user action. - Leaning animation forward & backward to gain reduce speed. And then I hope to be able to put more work into the archery mod, but it requires a lot of work unfortunately.
  4. mrflay

    FLAY Hang Glider Mod

    It should be in the available in the "empty" side, so you need to place a regular unit down first. After that you should find an entry called "FLAY Hang Glider" in class "Air". Hope this helps!
  5. mrflay

    [Early Preview] 3D Editor

    Boolean expressions in SQF are not short-circuited, so this is what's causing the error message (in FillListObjects.sqf). if (isClass (_vehicleConfig) && (getNumber(_vehicleConfig >> "side")) == _side && (getText(_vehicleConfig >> "vehicleClass")) == _classname && (getNumber(_vehicleConfig >> "scope") > 0) // && !(["base", _classname, false] call BIS_fnc_inString) ) then { ... The problem for me is with Arma2NET. Arma crashes as soon as any call is made to it (i.e. first call to LogV). After I removed the bundled Arma2Net, the editor starts without issues. Very nice, btw! :)
  6. Have you tried using BIS_fnc_UnitPlay? I think it may be easier than using setvelocity, if it works :) // [car, truck] execvm "tow.sqf" private ["_car", "_tow"]; private ["_carPos", "_towPos", "_time", "_startpos", "_endpos", "_animData"]; _car = _this select 0; // the car to be towed (vehicle) _tow = _this select 1; // the tow truck (vehicle) // need to disable simulation so it doesn't explode. _car enableSimulation false; _carPos = getPosASL _car; _towPos = getPosASL _tow; // calculate playback animation time based on distance _time = ((_car distance _tow) / 10); //_time = 5; // adjust start and end position for playback if required _startpos = [_carPos select 0, _carPos select 1, (_carPos select 2) + 0]; _endpos = [_towPos select 0, _towPos select 1, (_towPos select 2) + 2]; // create the unit play animation data _animData = [ [0, _startpos, getDir _car], // add more positions here ... [_time, _endpos, getDir _tow] ]; // play the tow animation and wait for it to complete [_car, _animData, [_tow, "tow_anim_done"], true, true, 0, 0] spawn BIS_fnc_UnitPlaySimple; waitUntil { _tow getVariable "tow_anim_done" }; // attach car to tow truck _car attachTo [_tow, [0,0,2]]
  7. mrflay

    AI Discussion (dev branch)

    I find this incredibly frustrating as well. These issues in particular: 10143: Grouped AI is aware of kills even when they shouldn't notice 13493: AI is alerted immediately when a unit it knowsabout is killed 13494: AI knows about all units of the same side in the direction it is facing It's possible to get around some of the issues using scripts, but it's no substitute for a proper solution.
  8. mrflay

    JavaScript for ARMA

    Just stumbled upon this thread: http://forums.bistudio.com/showthread.php?134053-Carma-A-C-to-SQF-quot-native-quot-Interface :)
  9. mrflay

    JavaScript for ARMA

    I'll just answer my own silly question :) From http://community.bistudio.com/wiki/Extensions: Hence, it's not possible to block a script (even if it is running in the background)... I did not know that.
  10. mrflay

    JavaScript for ARMA

    Cool :) A trivial, but useful addition is to make the addon execute "init.js" when mission is started. Eg., // fn_init.sqf ... [] spawn { private ["_script"]; _script = loadFile "init.js"; _script call js_fnc_exec; missionNamespace setVariable ["js_initDone", true]; }; Altough, in dev branch arma will display an error if the init.js file does not exist (should be ok in stable/release build, I think). Wouldn't changing the SQF background thread to call a blocking js function (instead of using waitUntil) have the same effect? [] spawn { while { true } do { _event = [] call JS_fnc_nextRequest; // blocks until next call/exec request becomes available. _result = _event call JS_fnc_processRequest; // execute the appropriate SQF command or function. _result call JS_fnc_sendResult; // send result to javascript (could also be baked into the js_fnc_nextrequest to save one callExtension call) }; }; Afaik, netId/objectFromNetId only works in multiplayer. In single player I think you would need to use something like bis_fnc_objectVar, although I'm not sure how well this method scales (object mapping is stored in the mission namespace and broadcasted across the network). I took the debug support from SilkJS, see v8.cpp in my dev branch. To use it, you also need to install node.js and the node-inspector module (with npm). However, since node-inspector requires a working fs module to show the source files during debugging, you also need to modify the PageAgent.js to get it working. Replace contents of the getResourceTree function with a call to done(); // C:\Users\<username>\AppData\Roaming\npm\node_modules\node-inspector\lib\PageAgent.js getResourceTree: function(params, done) { done(); //if (this._debuggerClient.isRunning) { // this._doGetResourceTree(params, done); //} else { // this._debuggerClient.once( // 'connect', // this._doGetResourceTree.bind(this, params, done) // ); //} }, Then it's just a matter of opening the node.js console and run node-inspector. Browse to the url specified and bring up the console.
  11. mrflay

    JavaScript for ARMA

    Nice to see another update! I've been experimenting a little bit with this addon and in my opinion it has huge potential! cURL Since you have made the source available (thank you very very much!), I decided I would attempt to add cURL support for it. I have made my implementation available on github, if you're interested in having a look. The cURL implementation was taken from SilkJS, another open source javascript framework. It works well enough for my purposes. SQF from Javascript Another experiment I did was trying to call SQF from Javascript. It uses a background SQF thread that listens for and processes requests made from javascript. A request consists of the name and arguments of the command or function to execute together with a unique id. The requests are put in a queue (not thread-safe) in javascript and polled sequentually by the SQF background thread. // pseudo code... [] spawn { while { true } do { waitUntil { JS("sqf.hasRequest()") }; // wait until SQF call is made in javascript. _event = JS("sqf.nextRequest()"); _result = _event call JS_fnc_processRequest; // execute the appropriate SQF command or function. if (_result) then { _result call JS_fnc_addResult; // send result to javascript }; }; }; Then in javascript, this module handles the SQF requests and responses. var sqf = (function () { var self = this; self.sequence = 1000; self.results = []; self.events = []; // non-blocking, returns SQF request handle function exec2(expr) { var id = "" + (self.sequence++); var time = new Date().getTime(); self.events.push({ id: id, type: "exec", time: time, args: expr }); self.results[id] = { id:id, time:time, valid:false }; return id; } // non-blocking, returns SQF request handle function call2(name, args) { var id = "" + (self.sequence++); var time = new Date().getTime(); self.events.push({ id: id, type: "call", time: time, args: [name].concat(args) }); self.results[id] = { id:id, time:time, valid:false }; return id; } // blocking, checks results for SQF request with specified id (note: result is not currently removed) function result(id) { var done = false; var now = new Date(); var timeout = new Date(now.getTime() + 1000); while (!done && now < timeout) { now = new Date(); done = self.results[id].valid; sleep(0); } if (!self.results[id].valid) { throw "error: sqf exec timed out"; } return self.results[id].value; } return { exec2: exec2, call2: call2, hint: function (expr) { exec2("hint '" + expr + "'"); }, // blocking exec: function (expr) { id = exec2(expr); return result(id); }, // blocking call: function (name, args) { id = call2(name, args); return result(id); }, hasRequest: function () { return self.events.length > 0; }, nextRequest: function () { var ev = []; if (self.events.length > 0) { var el = self.events[0]; ev = [el.id, el.time, el.type, el.args]; self.events = self.events.splice(1); } return ev; }, addResult: function (id, value) { self.results[id] = { id: id, value: value, valid: true }; }, getResult: function (id) { return self.results[id].value; }, }; }()); Obviously, this is a naive implementation and there's a tremendous overhead for making calls to SQF. However, if performance is not an issue, this works adequately. For example, with this it's possible to completely encapsulate the SQF API in javascript and write nice Object Oriented wrapper classes for commonly used stuff. Eg., var player = (function (sqf) { return { get pos() { return sqf.exec("position player"); }, get atl() { return sqf.exec("getPosATL player"); }, get asl() { return sqf.exec("getPosASL player"); }, nearest: function (typeName) { return sqf.call("JSQF_fnc_nearest",typeName); // needs some kind of object wrapping }, ... }; }(sqf)); Debugging Finally, I attempted to get the node-inspector debugger working, but it has some issues. Basically, it's possible to set breakpoints, stepping through the code, inspecting variables and calling functions. However, it's not yet possible to see the source code while doing it, so this limits the usefulness quite dramatically. Anyways, many thanks for making this awesome addon!
  12. These takeoffs all work for me (full or half-flaps): http://cloud-2.steampowered.com/ugc/600391697217528584/2245248027A83C9D0C4799F5F695E4D28F283402/ But still, the airfield obviously is not designed for jets. Edit:
  13. mrflay

    [WIP] Pilatus PC-21

    Yeah. I hate to be that guy, but this model is likely ripped considering the uploader has uploaded tons of stuff from other games (tomb raider, iron man, ...) Edit 2: Actually, the model is legit (even if the source isn't). It's made by Petar Jedvaj for use in flightgear, but he has also made it available for free.
  14. I was considering using a model from turbosquid in a mod I'm making, but I'm not sure if the turbosquid license (faq) permits use of the model in Arma. From my chat with one of their copyright agents: My understanding of this is that you can use a model from turbosquid in Arma provided: A. The 3d model is binarized (from condition 1). B. The original textures are not included (from condition 2). Anyone around here able to give me a definite answer?
  15. mrflay

    FLAY Hang Glider Mod

    Yes, that works too :) However, you should replace "this" with empty brackets [] for automatic wind direction, or a number (0-360) within brackets for hard coded wind direction, eg. [90].
  16. mrflay

    Turbosquid license

    After discussing the tool issue with the turbosquid representative, he concluded its existance does not prevent use of turbosquid models in arma. So provided the model is binarized it's ok. Thanks, I'll check it out. Edit: Wow, a CC licensed Robinsson R22 and recurve bow!
  17. mrflay

    FLAY Hang Glider Mod

    1. Create and save a new mission. 2. Create a new text file in the mission directory and copy-paste his script to it. 3. Name the text file "fn_soaring.sqf". 4. Preview the mission. 5. Open debug console and type nul = [] execVM "fn_soaring.sqf"; 6. Press enter and continue the game.
  18. mrflay

    FLAY Hang Glider Mod

    Wow, I haven't checked this thread for quite some time. Sorry I missed your post! I'll try to get this stuff sorted for the next update (I'm hoping close to A3 launch, if time permits). Can I bundle your script with the addon? The addon source and models are available on github: https://github.com/mrflay/FLAY_HangGlider However, the model lacks UV coordinates.
  19. The L-159 Alca has a take off distance of about 440 meters. Which is also what the A-143 Buzzard has in game. The northern airstrip is about 330 meters, so in my opinion it should not be able to take off from there. Although, the L-159 has a 750 meter landing distance, while the A-143 can land "safely" in about 50 meters. :)
  20. Check "List of files to copy directly" in options, make sure *.hpp, *.ext, and *.sqm are there. .pac;*.paa;*.sqf;*.sqs;*.bikb;*.fsm;*.wss;*.ogg;*.wav;*.fxy;*.csv;*.html;*.lip;*.txt;*.bisurf;*.rvmat;*.hpp;*.ext;*.sqm;
  21. mrflay

    Turbosquid license

    Well' date=' that's unfortunate. That clearly means I can't use the model in my mod. In fact, since most of the 3D-model re-sellers I've come across have a similar clause, the only option left is to try and make the model myself. I'm sure there are a lot of infringing stuff there, but not so much as I thought there would be. I try to look into the source as much as is possible before purchasing a model from them (of course, I'm not in the industry so, this is based solely on comparison to other sites, eg. 3D warehouse).
  22. mrflay

    Turbosquid license

    I also asked them about distribution: So, while I agree with Gnat, safe bet is to remake the textures yourself.
  23. mrflay

    Turbosquid license

    I was afraid of that. Thanks for the confirmation PuFu.
  24. I haven't been able to reproduce this issue yet. Does it happen only when you pick up the bow from ammobox or does it happen even with predefined archer units? Thanks!
  25. mrflay

    Magazines should be a proxy

    Magazine proxies are the way to go. Using hidden selection for magazines is a terrible idea if that's what you are suggesting. Edit: but of course, it would be nice to have for other things.
×