• hl2 particle effect testing in gmod sandbox, don't know where to start
    2 replies, posted
I see this list of particles - Half I'd like to test them out in sandbox to see which I would want to use but I just get errors. So I guess I'm doing it wrong. The lua I wrote below the errors is in the server autorun folder. So I assume if I start up a map in sandbox it should be running. I also assume it's supposed to make the effect happen wherever I'm looking at, if it does work. ] dangus Attempted to create unknown particle system type "ExplosionEmbers"! ] dangus2 Attempted to create unknown particle system type "ExplosionFlash"! game.AddParticles( "particles/explosion.pcf" ) PrecacheParticleSystem( "ExplosionEmbers" ) if ( SERVER ) then -- A test console command to see if the particle works, spawns the particle where the player is looking at. concommand.Add( "dangus", function( ply, cmd, args ) ParticleEffect( "ExplosionEmbers", ply:GetEyeTrace().HitPos, Angle( 0, 0, 0 ) ) end ) end game.AddParticles( "particles/explosion.pcf" ) PrecacheParticleSystem( "ExplosionFlash" ) if ( SERVER ) then -- A test console command to see if the particle works, spawns the particle where the player is looking at. concommand.Add( "dangus2", function( ply, cmd, args ) ParticleEffect( "ExplosionFlash", ply:GetEyeTrace().HitPos, Angle( 0, 0, 0 ) ) end ) end
The names in the link you gave are not correct. You need to open the needed file with particle editor to get the names. (NOTE: explosion.pcf is stored in tf2 particles, not gmods) (NOTE: I didnt use any particles before so there might be an easier solution) So now, to open a particle editor go to steam, open any source game launch options and add "-tools" parameter there. Now when you open this game you get this window: https://files.facepunch.com/forum/upload/469093/8e01bced-1004-43ce-bc16-750729e0bc4a/image.png then go here and click on particle editor: https://files.facepunch.com/forum/upload/469093/9e335ce6-f2a6-4635-89aa-ff7e1ff097c3/image.png Now you need the file itself. For that you need a program called GCFScape. Now open this file in "Team Fortress 2\tf" folder: https://files.facepunch.com/forum/upload/469093/ad0669b2-3237-46a7-97aa-c029f21fffc6/image.png with GCFScape and navigate to "root\particles" . Find the file you need and just drag it in some folder(not GCFScape folder) Now go here: https://files.facepunch.com/forum/upload/469093/bda728f5-b37d-4a44-b58b-ea0a418239f9/image.png and open a file you just extracted. And now you can see all the particle effects in that file.
Oh neat thanks a lot. I was actually trying to use just the particles that come with gmod for this one, but I can set gmod to launch with -tools if I right click the game in steam and go to properties - 'set launch options...' and put -tools in the box. Then when I start them game and go to tools -> particle editor and then click file -> open I get a list of the pcf files that come with gmod. From there I can open them up and see what the name of the particle system is. There's also a preview of the effect in the lower right if I click on the effect name within the pcf file. So my particles.lua in my server-> autorun folder is as follows and when I type dangus, dangus2, or dangus3 in the console (when I start the game without the -tools parameter) then those effects spawn wherever I am looking when I typed it. game.AddParticles( "particles/gmod_effects.pcf" ) PrecacheParticleSystem( "generic_smoke" ) if ( SERVER ) then -- A test console command to see if the particle works, spawns the particle where the player is looking at. concommand.Add( "dangus", function( ply, cmd, args ) ParticleEffect( "generic_smoke", ply:GetEyeTrace().HitPos, Angle( 0, 0, 0 ) ) end ) end game.AddParticles( "particles/vortigaunt_fx.pcf" ) PrecacheParticleSystem( "vortigaunt_charge_token" ) if ( SERVER ) then -- A test console command to see if the particle works, spawns the particle where the player is looking at. concommand.Add( "dangus2", function( ply, cmd, args ) ParticleEffect( "vortigaunt_charge_token", ply:GetEyeTrace().HitPos, Angle( 0, 0, 0 ) ) end ) end PrecacheParticleSystem( "vortigaunt_charge_token_b" ) if ( SERVER ) then -- A test console command to see if the particle works, spawns the particle where the player is looking at. concommand.Add( "dangus3", function( ply, cmd, args ) ParticleEffect( "vortigaunt_charge_token_b", ply:GetEyeTrace().HitPos, Angle( 0, 0, 0 ) ) end ) end
Sorry, you need to Log In to post a reply to this thread.