Syntax: Select all
blue_fire = Generic('particles/blue_flame_test.pcf', True)
@ClientCommand('+lookatweapon')
def test_particle(player_info, command):
player = PlayerEntity(index_from_playerinfo(player_info))
particle = make_particle(player.origin, 'blue_flame_c', 3)
particle.set_parent(player, -1)
def make_particle(location, particle_name, duration):
particle = Entity(create_entity('info_particle_system'))
particle.effect_name = particle_name
particle.origin = location
particle.set_property_int('m_iEffectIndex', string_tables.ParticleEffectNames.add_string(particle_name))
particle.call_input('Start')
tick_delays.delay(duration, particle.remove)
return particle
The code above gives me no errors, and yet nothing happens. There are no particles. The .pcf file contains blue_flame, blue_flame_b, blue_flame_c, blue_flame_d, and blue_flame_e.
I came across thisSourceMod plugin which uses PrecacheGeneric() to change the burning particles. So I tried using the same method in Source.Python, but to no avail. What am I doing wrong?