• Custom thrustereffect not rendering
    7 replies, posted
[b]Objective: [/b]Add a new thrustereffect from the EP2 library. Effectname: "rockettrail" from TF2 [b]Error: [/b]The effect aren't rendering, but showing up in the thruster-stool effect menu. no errors in the console. [b]Code: [/b] [lua]-- Code put in lua/autorun/Thruster.lua list.Set( "ThrusterEffects", "#Rocket", { thruster_effect = "rocket" } ) -- Code put in gamemodes/sandbox/entities/entities/gmod_thruster/cl_init.lua function ENT:EffectDraw_rocket() self.ParticleSystem = ents.Create( "info_particle_system" ) self.ParticleSystem:SetPos(self.Entity:GetPos()) self.ParticleSystem:GetParticleEffect( "rockettrail" ) self.ParticleSystem:Spawn() self.ParticleSystem:Activate() self.ParticleSystem:SetParent(self.Entity) end [/lua] [b]Notes: [/b] I mostly got the code from the Info_particle_controller Stool
I'm not sure how to help you because your code seems fine to me. It might just be a matter of tweaking the actual entity (By setting its KeyValues, or something similar.) Maybe you've already seen [url="http://developer.valvesoftware.com/wiki/Info_particle_system"]this[/url] page but go down the list and make sure you mess around with all the key values. I wish I could help you out more than that.
What is "GetParticleEffect" ? It isn't on the wiki. You can use [url=http://wiki.garrysmod.com/?search=ParticleEffectAttach][I]ParticleEffectAttach[/I] [img]http://wiki.garrysmod.com/favicon.ico[/img][/url] for orange box particle systems.
thank you very much, I will try so. [editline]07:11PM[/editline] Just found out something... The file gamemodes/sandbox/entities/entities/gmod_thruster/cl_init.lua resets itself after each restart, so editing in it would be impossible... is there any other way to add a new thrustereffect?
-oops-
tried to make it to an addon file with override, but still it won't work... maybe it's my code that's wrong again... [lua]function ENT:EffectDraw_rocket() ParticleEffectAttach("rockettrail",PATTACH_ABSORIGIN_FOLLOW,self.Entity,0) end[/lua]
Wouldn't you want to make it an addon [I]without[/I] override?
[QUOTE=Zcom;19282678]Wouldn't you want to make it an addon [I]without[/I] override?[/QUOTE] My addon contains the files that already exists in the gmod folder, with a little edit (added the effect), but the entire file is there. So to add the new effect I'll have to override the existing file with a new one that is the same as the old one, just with a little edit. :buddy:
Sorry, you need to Log In to post a reply to this thread.