Prop spawn effect like when spawned from the Q menu
9 replies, posted
Is there some way you can replicate the same spawn effect as when you spawn a prop in sandbox in lua? You know, where you see a little distortion when the prop appears.
Of course, look at the sandbox source.
[QUOTE=Python1320;19624709]Of course, look at the sandbox source.[/QUOTE]
Ah right, thought it was coded into GMod itself. Anyway, I still can't get it working. I copied the "propspawn" from the sandbox's effects map to my gamemode's effects map, and used the same lua code for spawning it:
[lua]
local eff = EffectData()
eff:SetEntity( newprop )
util.Effect( "propspawn", eff, false, true )
[/lua]
I tried running it on both the server and the client, but the effect just won't appear. No related notifications in console. I put a print statement in the EFFECT.Init but it's not getting called.
Works fine for me.
I didn't use the two extra arguments though.
[QUOTE=CapsAdmin;19625630]Works fine for me.
I didn't use the two extra arguments though.[/QUOTE]
And it just doesn't work for me, without giving me a single hint of what could be wrong. The effect just doesn't appear. :(
There shouldn't be much of a reason why it isn't working past the entity not actually getting set. Try using a different effect and see if it works in its place.
Now this is just bullshit: I copied a refract_ring effect to my gamemode and made that spawn instead of the propspawn effect; it worked fine. Now I switched back to the propspawn effect, and all of a sudden that's working too.
This is as illogical as programming gets.
[QUOTE=Clavus;19626199]Now this is just bullshit: I copied a refract_ring effect to my gamemode and made that spawn instead of the propspawn effect; it worked fine. Now I switched back to the propspawn effect, and all of a sudden that's working too.
This is as illogical as programming gets.[/QUOTE]
Garrysmod sometimes needs a restart before certain things work. I don't know the cause of it.
[QUOTE=Clavus;19626199]Now this is just bullshit: I copied a refract_ring effect to my gamemode and made that spawn instead of the propspawn effect; it worked fine. Now I switched back to the propspawn effect, and all of a sudden that's working too.
This is as illogical as programming gets.[/QUOTE]
Are you either deriving from sandbox or have copied the effect into your gamemode's effects directory?
Lol I've never had effects when spawning props, maybe because i dont run my SVN Version?
Sorry, you need to Log In to post a reply to this thread.