When you throw bugbait, flies appear at the point of impact.
Is it possible to spawn these flies using lua? Or how might this be done? I wanted to use the flies in a game-mode.
I don't really know where the flies come from :)
[IMG]http://i.imgur.com/cUh6ilb.jpg[/IMG]
You should be able to do this with util.Effect and proper effect name, which I don't know.
[editline]31st August 2015[/editline]
Actually no, it is done using env_sporeexplosion.
[editline]31st August 2015[/editline]
[url]https://github.com/ValveSoftware/source-sdk-2013/blob/55ed12f8d1eb6887d348be03aee5573d44177ffb/sp/src/game/server/smoke_trail.cpp#L420-L440[/url]
[del]if you can find it [URL="https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexe14a.html"]here[/URL] [/del]
[editline] addaw [/editline]
ninja'd, it's not there anyways
[QUOTE=Robotboy655;48577301]You should be able to do this with util.Effect and proper effect name, which I don't know.
[editline]31st August 2015[/editline]
Actually no, it is done using env_sporeexplosion.
[editline]31st August 2015[/editline]
[url]https://github.com/ValveSoftware/source-sdk-2013/blob/55ed12f8d1eb6887d348be03aee5573d44177ffb/sp/src/game/server/smoke_trail.cpp#L420-L440[/url][/QUOTE]
Thanks, I have never looked at this kind of thing before.
What is env_sporeexplosion? Do you know if there's any other information on this to get me started? Or any other examples?
Edit: Is this an effect then?
[img]http://i.imgur.com/itQKNXV.png[/img]
[QUOTE=Robotboy655;48577382]-snip-[/QUOTE]
Ye, I probably should start doing that more often ;)
Thanks for your help, I'll give it a go.
[editline]30th August 2015[/editline]
Thanks Robotboy, after some searching around I found some information on it.
I now have my flies xD Didn't realize you could just spawn it with ents.Create.
[IMG]http://i.imgur.com/TXoTgIW.png[/IMG]
Here's a spawn function if anyone needs it in the future:
[CODE]
function spawnSporeExplosion( pos )
local explosion = ents.Create("env_sporeexplosion")
explosion:SetKeyValue( "SpawnRate", 100 )
explosion:SetPos( pos )
explosion:Spawn()
explosion:Input("Enable")
end
[/CODE]
Sorry, you need to Log In to post a reply to this thread.