def _on_level_change(hero): player = hero.owner spend_skills.send(player) pointer = player.give_named_item('env_smokestack', 0, None, False) entity = Entity(index_from_pointer(pointer)) Model('effects/yellowflare.vmt') for output in ('basespread 10', 'spreadspeed 60', 'initial 0', 'speed 105', 'rate 50', 'startsize 7', 'endsize 2', 'twist 0', 'jetlength 100', 'angles 0 0 0', 'rendermode 18', 'renderamt 100', 'rendercolor 255 255 3', 'SmokeMaterial effects/yellowflare.vmt'): entity.add_output(output) entity.turn_on() entity.set_parent(player.pointer, -1) entity.delay(0.5, entity.turn_off, cancel_on_level_end=True)
def _on_level_change(hero): player = hero.owner spend_skills.send(player) pointer = player.give_named_item('env_smokestack') entity = Entity(index_from_pointer(pointer)) Model('effects/yellowflare.vmt') for output in ('basespread 10', 'spreadspeed 60', 'initial 0', 'speed 105', 'rate 50', 'startsize 7', 'endsize 2', 'twist 0', 'jetlength 100', 'angles 0 0 0', 'rendermode 18', 'renderamt 100', 'rendercolor 255 255 3', 'SmokeMaterial effects/yellowflare.vmt'): entity.add_output(output) entity.turn_on() entity.set_parent(player.pointer, -1) entity.delay(0.5, entity.turn_off, cancel_on_level_end=True)
def level_up(player): player.client_command('play */source-python/wcs/levelup.mp3') pointer = player.give_named_item('env_smokestack', 0, None, False) entity = Entity(index_from_pointer(pointer)) for output in ('basespread 10', 'spreadspeed 60', 'initial 0', 'speed 105', 'rate 50', 'startsize 7', 'endsize 2', 'twist 0', 'jetlength 100', 'angles 0 0 0', 'rendermode 18', 'renderamt 100', 'rendercolor 255 255 3', 'SmokeMaterial effects/yellowflare.vmt'): entity.add_output(output) entity.call_input('TurnOn') entity.set_parent(player.pointer, -1) tick_delays.delay(2, entity.call_input, 'TurnOff') tick_delays.delay(2.1, entity.call_input, 'Kill')
def level_up(player): """Display the level up effect on a player.""" pointer = player.give_named_item('env_smokestack', 0, None, False) entity = Entity(index_from_pointer(pointer)) entity.add_output('basespread 10') entity.add_output('spreadspeed 60') entity.add_output('initial 0') entity.add_output('speed 105') entity.add_output('rate 50') entity.add_output('startsize 7') entity.add_output('endsize 2') entity.add_output('twist 0') entity.add_output('jetlength 100') entity.add_output('angles 0 0 0') entity.add_output('rendermode 18') entity.add_output('renderamt 100') entity.add_output('rendercolor 255 255 3') entity.add_output('SmokeMaterial effects/yellowflare.vmt') entity.call_input('TurnOn') entity.set_parent(player.pointer, -1) tick_delays.delay(2, entity.call_input, 'TurnOff') tick_delays.delay(2.1, entity.call_input, 'Kill')