Blockland Forums > Modification Help

Dynamically customizing respawn time

Pages: (1/2) > >>

Mr. Wallet:

I need to have the respawn timer in a minigame individually decided for each client at the moment the client dies. It's not that hard to do functionally by just scheduling a lockout period on respawning that triggers when a player dies, but then the default spawn timer for the minigame will be counted on the client's centerprint. Does anyone know an elegant solution?

Ephialtes:

Can you not just switch whichever variable (I'm guessing it's in the minigame object) is being used to determine the respawn time just before it's used (again, guessing somewhere in onDeath)? It's kind of cheap but it removes a lot of work.

Truce:


--- Quote from: Ephialtes on March 30, 2011, 06:15:22 PM ---Can you not just switch whichever variable (I'm guessing it's in the minigame object) is being used to determine the respawn time just before it's used (again, guessing somewhere in onDeath)? It's kind of cheap but it removes a lot of work.

--- End quote ---

If you change the variable while they're dead, they can either respawn earlier or later than the time shows.

Ephialtes:

I'm guessing it checks minigame.respawnTime in ::onDeath and schedules stuff appropriately. What I meant was changing minigame.respawnTime before it's used, or am I missing something here?

Mr. Wallet:

I'll give that a shot. I'd still prefer another method if anyone has one since it'll make it harder for me to make the minigame GUI setting a scalar multiplier on the respawn time down the road.

EDIT: doesn't work; the centerprint is determined at the moment of death but whether or not clicking will respawn the player depends entirely on the time elapsed and the current .respawnTime of the mini at the moment of the click. I suspect it's based on a sim-time subtraction, and not a schedule, which explains why nothing trace()s out server-side when respawn becomes available for a player.

Pages: (1/2) > >>

Go to full version