Attempting to include a particle system in a gma file.

So I’ve been working on a map that had a particle system in it so I placed a folder named particles in the addon file. then I dropped my pcf file and my particle manifest into that folder,
unfortunately when I try to create the gma file it claims that I can not include the particle manifest because it is a txt file.
I leave out the particle manifest and then go back and create the gma file, I place my newly made gma file in the garrysmod/addons folder. I see my map appear I load up the map and
the particles I included with the gma file do not appear simply because there is not a particle manifest. is there anyway around this?

Think you need to do it via Lua now.
add a .lua file in lua\autorun called whatever.lua

And in it put.


game.AddParticles("particles/nameofparticle.pcf")

Sadly this did not work for me, when I load up the map the console gives me this error
Attempting to create unknown particle system ‘Energybeam’
this is the code I used for the lua script


game.AddParticles("particles/idk.pcf")

Don’t you have to add the .pcf file as well as precache all the individual particle effects you want to use? Something like this -

[lua]
game.AddParticles(“particles/effectsandstuff.pcf”)
PrecacheParticleSystem(“Energybeam”)
PrecacheParticleSystem(“waterfall_fx”)
PrecacheParticleSystem(“fire_huge”)
PrecacheParticleSystem(“effect_number_4”)
[/lua]etc

It’ll still show the “Attempting to create unknown particle system” errors in the console, but the effects should show up anyway.

This is what is supposed to appear:

http://cloud.steampowered.com/ugc/577876279764965969/2A6D657D5E39B7584C4F0075BFF2A740DB87352C/[/thumb]
This is what actually appears:
[thumb]http://cloud-2.steampowered.com/ugc/577876279799184876/16C931305910E439AA190C71A6F2FA6A380205FD/

this is the lua file I used


game.AddParticles("particles/idk.pcf")
PrecacheParticleSystem("Surge")
PrecacheParticleSystem("Surge1A")
PrecacheParticleSystem("Surge1B")
PrecacheParticleSystem("Surge2")
PrecacheParticleSystem("Surge3")
PrecacheParticleSystem("Surge4")
PrecacheParticleSystem("Testasb44")
PrecacheParticleSystem("Testasb442")
PrecacheParticleSystem("Energybeam")
PrecacheParticleSystem("Blackhole")
PrecacheParticleSystem("Bigpulse")
PrecacheParticleSystem("Sqaureman2")
PrecacheParticleSystem("Sqaureman")
PrecacheParticleSystem("Sqaureman-")
PrecacheParticleSystem("Ropeman")


And you did it on both, client and server, and on load? ( Not in any functions or hooks )

No I have not tried both, or on load. how would I go about doing this?

Just put them at the top of a shared file? Where exactly are you running this from?

I’m currently running it from the lua/autorun/shared folder

there is no such folder as autorun/shared. Nothing there gets called afaik.
Move the file to lua/autorun/

just tried that I’m still getting the same results as last time

Where exactly is the .pcf at?

its located in the particles folder, If you want I can give you a zip file of both the gma and extracted form of the addon and let you inspect it your self.

Yep, that would make it easier.

here you go
https://dl.dropboxusercontent.com/u/17358546/IDK.zip

How are you loading the .gma?

I place it in my addons folder

It seems to be not loading like that, at least for me. I assume you have the map in your garrysmod/maps/ folder, that’s why you saw it.

shouldn’t precaching be done in Initialize hook?

no, it seems my map is being loaded from my ep2 maps folder if I remove it it does not show up. no wonder none of this is working, its because the addon isn’t even loading :v: