Page 2 of 2

Re: Auto Respawn

Posted: Sat Nov 05, 2016 4:50 pm
by Kill
L'In20Cible wrote:Also, the following:

Syntax: Select all

Delay(ar_delay.get_int(), respawn, player.userid)

def respawn(userid):
try:
player = Player.from_userid(userid)
except ValueError:
return
if player.dead: # is player dead?
player.spawn()

Could now simply be:

Syntax: Select all

player.delay(ar_delay.get_int(), player.spawn)


Yes, but I want to make sure the player is dead, as iPlayer suggested.

Re: Auto Respawn

Posted: Sat Nov 05, 2016 4:56 pm
by satoon101
The reason L'In20Cible mentions that is that we now do that check automatically:
https://github.com/Source-Python-Dev-Te ... 2d81a67e4c

Re: Auto Respawn

Posted: Sat Nov 05, 2016 5:20 pm
by Kill
satoon101 wrote:The reason L'In20Cible mentions that is that we now do that check automatically:
https://github.com/Source-Python-Dev-Te ... 2d81a67e4c

Okay, thanks!