Does anyone know how to get this effect?

  • RedVelvetCake
    30th Jul 2017 Member 0 Permalink

    Like the glowing effect you see on neutrons. Is it a property or do i have to have custom draw code?

  • DanielGalrito
    30th Jul 2017 Member 0 Permalink

    It requires a graphics function, example:

     

    local function NeutG(i, r, g, b)
    return 1, 0x00010001, a, r, g, b, fa, fr, fg, fb
    end
    tpt.graphics_func(NeutG, tpt.element('neut'))

     

    You replace the 0x00010001 with what you want from the "Particle graphics function modes"

    at https://powdertoy.co.uk/Wiki/W/Lua_API:Renderer.html

    a,r,g,b stand for alpha, red ,green, blue, the colors of your element, and fa, fr, etc are the colors of the glowing effect

     

    in tpt.element('neut') you replace neut with the 4 letters of the desired element

    Edited once by DanielGalrito. Last: 30th Jul 2017
  • Potbelly
    15th Aug 2017 Banned 0 Permalink
    This post is hidden because the user is banned
  • jacob1
    15th Aug 2017 Developer 0 Permalink
    @Potbelly (View Post)
    The first argument is "cache", it tells it to remember what you are returning from the graphics function and never call it again. It saves a huge amount of CPU time for elements that don't change color / graphics.

    To fix it, just change the 1 to a 0
  • Potbelly
    15th Aug 2017 Banned 0 Permalink
    This post is hidden because the user is banned
    Edited once by Potbelly. Last: 15th Aug 2017
  • jacob1
    15th Aug 2017 Developer 0 Permalink
    @Potbelly (View Post)
    You forgot the 0, change the "return 1,ren.FIRE_ADD,..." to "return 0,ren.FIRE_ADD,..."

    There is no other way to do it, what you did is correct
    Edited once by jacob1. Last: 15th Aug 2017