Property 'm_Effects' not found for entity type 'player'
Posted: Sun May 24, 2015 4:36 pm
Title says it all:
When trying to use this code:
Code: Select all
[SP] Caught an Exception:
Traceback (most recent call last):
File '../addons/source-python/packages/source-python/events/listener.py', line 93, in fire_game_event
callback(game_event)
File '../addons/source-python/plugins/hw/hw.py', line 221, in player_spawn
hero.execute_skills('player_spawn', player=player)
File '../addons/source-python/plugins/hw/entities.py', line 284, in execute_skills
passive.execute_method(method_name, **eargs)
File '../addons/source-python/plugins/hw/entities.py', line 355, in execute_method
method(self, **eargs)
File '../addons/source-python/plugins/hw/heroes/default.py', line 45, in player_spawn
effects = player.get_property_int('m_Effects')
File '../addons/source-python/packages/source-python/entities/entity.py', line 360, in get_property_int
return self._get_property(name, 'int')
File '../addons/source-python/packages/source-python/entities/entity.py', line 419, in _get_property
name, self.classname))
ValueError: Property 'm_Effects' not found for entity type 'player'
When trying to use this code:
Syntax: Select all
# Invisible
effects = player.get_property_int('m_Effects')
if not effects & EntityEffects.NODRAW:
player.set_property_int('m_Effects', effects | EntityEffects.eff)
else:
player.set_property_int('m_Effects', effects & ~EntityEffects.NODRAW)