Lua drawline not working

  • sfsjunior
    1st Nov 2014 Member 0 Permalink

    Hello!

    I'm making a new mod from the element suggestions of my last mod and i need to draw some lines in the screen. I've found tpt.drawline(x,y,x2,y2,r,g,b,a) in tpt wiki, but it don't works! I've tried pausing the game and writing "tpt.drawline(100,100,0,0,255,255,255,255)" at the console, but i don't see nothing!

    Can someone help?

    Thanks very much!

    *sorry for bad english...

  • mecha-man
    1st Nov 2014 Member 0 Permalink

    it only lasts for one frame (a ingame frame not a simulation frame) and immediately disappears afterwards, so it went too fast for you to see.

  • sfsjunior
    1st Nov 2014 Member 0 Permalink

    @mecha-man (View Post)

     So how can i draw things without placing particles (like wifi in fancy mode)?

  • mniip
    1st Nov 2014 Developer 0 Permalink
    @sfsjunior (View Post)
    You draw them every frame. Use tpt.register_step for that
  • sfsjunior
    1st Nov 2014 Member 0 Permalink

    @mniip (View Post)

     Thanks! Thanks very much! It worked!
    :D :D

    Edited 2 times by sfsjunior. Last: 1st Nov 2014