Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


Tonka last won the day on November 18 2012

Tonka had the most liked content!

Community Reputation

37 Excellent

About Tonka

  • Rank
    Advanced Member
  • Birthday 03/17/1984

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Has anyone used the Gizmo gfx.FBO functions to render strings and primatives to a texture that is used by an object attached to an aircraft? I been trying to use gfx.newTexture to build a texture slot, with various combinations of using gfx.loadPNG, gfx.newPBO, and gfx.usePBO, but in the absence of a code example to study I haven't had much happen in the sim. (Other than making it go crazy when I wasn't releasing the FBO at the end of the function!) The object I'd like to dynamically texture is a HUD screen. Could anyone advise which drawing event would be best to use for this as well please? I need a phase that draws to a fixed surface, so OnDraw_Windows is not suitable. I have some strings and primatives being rendered to the Cockpit3D/-PANELS-/panel.png in the OnDraw_Gauges_3D() event without issue, but I'd like to dedicate a texture to a lua generated HUD screen, if possible. Any clues would be much appreciated. Cheers.
  2. Tonka

    librain plugin and Gizmo

    Just had a quick look, and the librain plugin i downloaded from https://github.com/skiselkov/librain/releases has the following in my log.txt: 2019-03-27 20:50:22 librain[plugin.c:590]: This is librain (v0.10) libacfutils-3babedf Loaded: X:\X-Plane 11 Beta/Resources/plugins/librain.plugin/win_x64/librain.plugin.xpl (skiselkov.librain) Therefore, the plugin sig to use with plugins.findPlugin is "skiselkov.librain" you could try changing the line: if plugins.findPlugin("librain.plugin.xpl") then to if plugins.findPlugin("skiselkov.librain") then And it might be worth implementing a 2 second timer in an OnFirstFrame() function, to delay the initialising of your link to librain. Hope you get it working, you can help me implement here then! :-D
  3. Just posting this here to help anyone who googles this in the future. If trying to use the plugins.findPlugin function in Gizmo, be aware that it is specifically looking for the plugin signature, which can be found alongside the Loaded: line in X-Planes log.txt So if you are looking to check whether plugin admin is loaded (bad example, its always loaded unless you've broken something) then look for the following line in the log: Loaded: X:\X-Plane 11 Beta/Resources/plugins/PluginAdmin/64/win.xpl (xpsdk.examples.pluginadmin). Then in your lua script use the following to check for its presence: if( plugins.findPlugin( "xpsdk.examples.pluginadmin" ) )then --we could find the plugin and are capable of sending messages to it in a useful manner. end The Gizmo API suggests looking for "Win.xpl", but this is not what Gizmo is looking for. (The API actually states plugins.findPlugin( signature ) but the example shows .xpl) Cheers.
  4. Ah cool! Was beginning to wonder how many actual devs were in that Facebook group! I could do with altering the colour of the entire screen when the strobe flashes, to really represent the burning retina experienced with real strobes!
  5. Video attached (23mb) X-Plane 2018-06-22 20-17-20-05.wmv
  6. Sure. I used a timer to make custom strobe lighting, with the associated spill light etc The timer is built outside of the main per frame loop, and stopped/started as necessary, according to the strobe light switch. The StrobeFlash_1 function is ONLY called when the timer has run out, so i use it to show the strobe light for 1 frame every 1 second. -- create timer outside of main loop so it is only created once StrobeTimer_1 = timer.newTimer("StrobeFlash_1" , 1) -- Create 1 second Timer - Function called when time = 0 -- main function to handle per frame stuff.... function Main() dref.setFloatV(dref_sim_StrobeBrightness, 1, 0) -- Write to sim drefs for global lighting STROBE OFF dref.setInt(dref_sim_StobeFlashNow, 0) -- Write to sim drefs for global lighting STROBE OFF if StrobeSwitch == 0 then -- If beacon turned off if StrobeTimer_1 ~= nil then -- And associated timer is alive, then timer.stop(StrobeTimer_1) -- Stop the timer end if StrobeSwitch ~=1 then -- If beacon turned on timer.reset(StrobeTimer_1) -- Reset the timer end -- So timer starts continuosly countingg down from 1 second to 0 seconds end end function StrobeFlash_1() -- Called when time = 0 (so strobe is only on for 1 frame) dref.setFloatV(dref_sim_StrobeBrightness, 1, 1) -- Write to sim drefs for global lighting STROBE ON dref.setInt(dref_sim_StobeFlashNow, 1) -- Write to sim drefs for global lighting STROBE ON dref.setFloat(dref_NewStrobe, 1,) -- Write to custom dref to set light to on ONLY when time = 0 end If the Timer is built inside the flight loop, we are technically saying "build this same timer" every frame. Instead, build the timer once, and start/stop/reset or alter it per frame as needed. I'll post a video of the result shortly.
  7. Solved: I was initialising the Timer in the main() flight loop, so the Timer was being initialised every loop, hence the "function already registered" error.
  8. Picking up X-Plane development again after a long hiatus. When trying to initialise a timer in a script I get the error "function already registered for timers". I see this error when using the following timer.newTimer("TimerNew" , 1) I see that a similar error was being reported for the IXEG 737 a while ago. Does anyone know what causes this issue please? I have no other timers in my scripts, and I've tried a variety of timer names. Cheers.
  9. Tonka

    v16.11.03.1645 API

    No apology necessary Ben. Thanks for the continued development of Gizmo.
  10. Tonka

    v16.11.03.1645 API

    Has the API changed in the latest version? Gizmo is loading but init.lua doesn't appear to get called from my acf folder/scripts Cheers.
  11. The AC3D plugin is long over due for an update, and while all of the new features for manipulators etc are in the code base, Laminar do not currently have the man power to devote to building releases for all 3 operating systems. It is my understanding that the code on github should build a mac plugin, but requires porting to Windows. Is anyone with the necessary skills able to take a look and see if this very useful plugin could be brought back in to development? Repo is here for anyone wanting to fork it - https://github.com/X-Plane/xptools Thanks!
  12. Tonka

    X Plane crash on exit with SMP 3.1.2

    Define stable. Doesn't sound like its stable at the moment...
  13. It sounds like a Z Buffer thing You can specify a polygon offset in objects, and i think ground polygons to tell the GPU where to draw the ground textures in relationship to each other. See the Obj8 spec here. Can't find one for .pol atm.
  14. Tonka

    Windows 10 x64 Pro Errors

    Check the smart data for your disks. Might be worth swapping the SATA cables too, they fail more frequently than the disks themselves. Make an image of your OS drive when you're done with the fresh install, saves a lot of time when you hit errors, or fancy a refresh to clear out all the accumulated windows junk. Try Acronis, or Macrium, both make images and bootable recovery media, i think.
  15. I'd like to create a dataref for the Magnetic Indicator showing when a pilot is breathing. I have some respiratory rate data, and as expected the breaths per minute increases with pilot stress. How can i code this? I'm thinking of something like a sin wave or triangular wave that changes frequency, but how can i specify the frequency? I have a sin wave pulsing from -1 to 1 with the elapsed time dataref, but i cant figure out how to alter the frequency reliably. How can i make a triangular wave go from 0 to 1 over exactly n seconds, and then repeat? Thanks for any tips!