This does find "gm.rpgtrail.pcf" from directory but fails to precache it. Why?
[lua]
local particles = file.Find("particles/*", "GAME")
PrintTable(particles)
PrecacheParticleSystem("gb_rpgtrail")
[/lua]
Attemped to precache unknown particle system "gb_rpgtrail"!
PrecacheParticleSystem takes the particle name, NOT particle FILE name.
[editline]20th October 2015[/editline]
Files must be added with [url]http://wiki.garrysmod.com/page/game/AddParticles[/url]
Now i just need to spawn the particle.
[lua]
game.AddParticles( "particles/gb_rpgtrail.pcf" )
function ENT:Init()
ent:CreateParticleEffect("gb_rpgtrail", 1)
end
[/lua]
Which also gives error: "Attempting to create unknown particle system 'gb_rpgtrail'"
You must both, add the file and precache the effect before you can use it.
Sorry, you need to Log In to post a reply to this thread.