game: CSGO.
since all topics are a bit outdated about the particle system and after checking the source i couldn't find a solution here i am.
This is my current code:
Syntax: Select all
@Event('server_spawn')
def load_particles(game_event):
engine_server.precache_generic('particles/blood_impact.pcf', True)
def spawnBloodParticle(particleName, origin, duration):
particle = Entity.create('info_particle_system')
particle.origin = origin
particle.effect_name = particleName
particle.effect_index = string_tables.ParticleEffectNames.add_string(particleName)
particle.start_active = 1
particle.start()
particle.delay(duration, particle.remove())
@Event('player_death')
def _player_death(game_event):
player = Player.from_userid(game_event.get_int('userid'))
playerOrigin = player.get_datamap_property_vector('m_vecOrigin')
bloodParticle('blood_impact_basic', playerOrigin, 3)
particle name taken from https://developer.valvesoftware.com/wik ... _Particles
I checked https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/data/source-python/entities/CParticleSystem.ini but i couldn't really get it to work. Particles are not spawning and when it gets to the point of removal it says:
TypeError: 'NoneType' object is not callable
Any help would be appreciated.
Cheers,
CANi
Edit: Found this
https://github.com/Source-Python-Dev-Te ... Sprite.ini
Can you explain what
drop_model_index = m_nDropModel
spray_model_index = m_nSprayModel
does and is?