Instant Respawn

CanaryMod related discussions

Instant Respawn

Postby Rash_SR » Mon Jan 16, 2017 9:18 pm

Hello Guys!

I want to code a plugin! if a player died you can click "Respawn" or "back to title". i want to skip this process that a player respawned instant without clicking something.
so i code a playerdeathhook and tried it with "player.closeWindow();" but nothing happend. Someone knows a helpfull solution?

Thanks for help!
Rash_SR
 
Posts: 11
Joined: Mon Jan 18, 2016 5:58 pm

Re: Instant Respawn

Postby Scoin0 » Tue Jan 24, 2017 11:25 am

Rash_SR wrote:Hello Guys!

I want to code a plugin! if a player died you can click "Respawn" or "back to title". i want to skip this process that a player respawned instant without clicking something.
so i code a playerdeathhook and tried it with "player.closeWindow();" but nothing happend. Someone knows a helpfull solution?

Thanks for help!


I don't actually think CanaryLib can do this. I think because it would be messing with the client which Canary can't do. I think. I don't really remember what it can and cannot do. It's been such a long time.

Sorry if I wasn't of any help.

Edit: I just had an idea. There is a possibility of this working but it's hard for me to put into words.

You could check the players health right, then when it goes under a certain mark like half a heart remaining send a message saying they died and respawn the player elsewhere. It's a very crude way of doing it but hey it works right? I wonder if you can add 'phantom hearts'. That way the hearts can go fully down but the character still live. I really have no idea what I'm talking about now but just throwing some ideas. (fuck I need to complete my degree)
I help out when I can. :)
Discord: scoin0
User avatar
Scoin0
 
Posts: 29
Joined: Mon Aug 17, 2015 8:11 pm
Location: Hawaii

Re: Instant Respawn

Postby Rash_SR » Tue Jan 24, 2017 2:03 pm

Scoin0 wrote:
Rash_SR wrote:Hello Guys!

I want to code a plugin! if a player died you can click "Respawn" or "back to title". i want to skip this process that a player respawned instant without clicking something.
so i code a playerdeathhook and tried it with "player.closeWindow();" but nothing happend. Someone knows a helpfull solution?

Thanks for help!


I don't actually think CanaryLib can do this. I think because it would be messing with the client which Canary can't do. I think. I don't really remember what it can and cannot do. It's been such a long time.

Sorry if I wasn't of any help.

Edit: I just had an idea. There is a possibility of this working but it's hard for me to put into words.

You could check the players health right, then when it goes under a certain mark like half a heart remaining send a message saying they died and respawn the player elsewhere. It's a very crude way of doing it but hey it works right? I wonder if you can add 'phantom hearts'. That way the hearts can go fully down but the character still live. I really have no idea what I'm talking about now but just throwing some ideas. (fuck I need to complete my degree)


Thanks for the answer! i think i do something like this. i check with a damagehook if the hearts after the damage < 0 cancel the damage event and then "respawn" them with full life. not the best solution but the smartest with canary!
Rash_SR
 
Posts: 11
Joined: Mon Jan 18, 2016 5:58 pm

Re: Instant Respawn

Postby Scoin0 » Wed Jan 25, 2017 12:28 am

Rash_SR wrote:
Scoin0 wrote:
Rash_SR wrote:-snip-


-snip-


-snip-


As long as it works its fine :D
I help out when I can. :)
Discord: scoin0
User avatar
Scoin0
 
Posts: 29
Joined: Mon Aug 17, 2015 8:11 pm
Location: Hawaii


Return to Discussions

Who is online

Users browsing this forum: No registered users and 8 guests

cron