Since i created the NEON element i wanted to add a graphics function to it. by trying some values to the "pixel_mode" i found out that 0x00000010 adds EMBR graphics and 0x00022000 enables the fire mode and i was wondering if there are other "pixel modes" available.
here are some more infos about graphics functions
jacob1:
You can look at the wiki, but it might not be that helpful.
I copied this from the readme for my mod though. It explains graphics functions:
Lua Graphics Functions: Allows you to change an element's graphics function.The values i, colr, colg, and colb are passed into the function. You must return cache, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, and fireb in that order. If you leave any out or as nil, it will get it's default value. The cola value is unused right now, but return 255 just incase. The cache value is a boolean that tells if it will add these valuesinto the graphics cache, meaning it will remember the return values and notrun your function again. This eliminates lag when a lot of particles aredrawn. The pixel_mode properties can be found in powdergraphics.h.
Example:
function graphics(i, colr, colg, colb) -- blue green with a bluish glow
return 1,0x00FF0008,255,0,255,255,255,0,0,255
end
tpt.graphics_func(graphics,tpt.el.eqve.id)
You need to actually know lua to use them.
to make eqve go in a menu, use tpt.el.eqve.menu = 1 and tpt.el.eqve.menusection = (number of menusection)
#define PMODE 0x00000FFF
#define PMODE_NONE 0x00000000 // Particle is invisible
#define PMODE_FLAT 0x00000001 // Particle is visible, nothing view
#define PMODE_BLOB 0x00000002 // Blob Display-like
#define PMODE_BLUR 0x00000004 // Like WTRV, blurry around a small radius.
#define PMODE_GLOW 0x00000008 // Glowing.
#define PMODE_SPARK 0x00000010 // Like EMBR (Small). Proved by mrsalit0s
#define PMODE_FLARE 0x00000020 // Like EMBR (Medium).
#define PMODE_LFLARE 0x00000040 // Like DEST agitated. (Huge)
#define PMODE_ADD 0x00000080 // Adds to similar particle effect
#define PMODE_BLEND 0x00000100 // Blends multiple similar particle effects together
--#define PMODE_FLARE 0x00000020
local mode_flare = 0x00000020
tpt.graphics_func(yourfunc, tpt.el.eqve.id)
function yourfunc (index, colourred, colourgreen, colourblue)
--Setting cache to 1 reduces lag
--return cache, pixel_mode, red, green, blue, firealpha, firered, firegreen, fireblue
return 1, mode_flare, colourred, colourgreen, colourblue
end
thank you, i'll try them :)
currently im using PMODE_SPARK in my NEON script and it seems that its affected by NEONs life value. the higher the life the greater the effect.
PMODE_FLARE is similar to the EMBR graphics and PMODE_LFLARE looks like exploding DEST