Little strange scripts?

  • jacob1
    26th Sep 2016 Developer 3 Permalink
    It's not a bug, lua step functions happen after the zoom window is drawn.

    In order to support the zoom window, you should use sim.adjustCoords(x, y) to get the zoom window position, and draw separate graphics here if the coordinates were different. This function adjusts for the zoom window (be careful because it also adjusts the coordinates to be in bounds, I think).

    Adjusting the beginning and ending points of the line may cause issues if one point is inside the zoom window and one isn't. You'd probably need to handle this properly (I would just be lazy and not draw the line in this case).
    Edited once by jacob1. Last: 26th Sep 2016
  • Alexwall
    4th Oct 2016 Member 0 Permalink

    @jacob1 (View Post)

     nice "its a feature not a bug!"

  • TPT_PL
    4th Oct 2016 Member 1 Permalink
    Get ontopic plz.
  • TPT_PL
    9th Oct 2016 Member 1 Permalink
    Ok guys.
    My new elements:
    LITH (Lithium), sort of chargeable battery.
    Link: http://pastebin.com/88gY24LD
    BERY (Beryllium), breaks into toxic dust (toxic BRMT?)
    Link: http://pastebin.com/58F8ZaFH
    Edited 2 times by TPT_PL. Last: 9th Oct 2016
  • DanielGalrito
    9th Oct 2016 Member 1 Permalink
    Edited once by DanielGalrito. Last: 9th Oct 2016
  • TPT_PL
    11th Oct 2016 Member 1 Permalink
    @DanielGalrito (View Post)
    Great! I'd like to see that in official.

    BTW, new element:
    BRON (Boron), halfs the life of NEUT touching it (half-life, lol)
    Link: http://pastebin.com/WU8JbGuJ
    Edited once by TPT_PL. Last: 11th Oct 2016
  • 12Me21
    2nd Nov 2016 Member 2 Permalink

    I hate dust VOID!
    elem.property(elem.DEFAULT_PT_VOID,"Update",sim.partKill)

    Edited once by 12Me21. Last: 2nd Nov 2016
  • techyman305
    2nd Nov 2016 Member 0 Permalink

    @12Me21 (View Post)

     That's really funny.

  • RCAProduction
    28th Nov 2016 Member 0 Permalink

    As for how to make it draw effects in the zoom window: 

     

    You need to create a section of code that checks for zoomenabled and then checks the zoom level. After this, you can draw squares in the zoom window's area, based on the info you just gathered and a little bit of math. 

     

    I didn't name actual variables, though. You'd have to look those up.

     

    -RCAP

  • TPT_PL
    28th Nov 2016 Member 1 Permalink

    @RCAProduction (View Post)

     Or just have this in graphics function?

    Gosh?