Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Dead Players (https://forums.graalonline.com/forums/showthread.php?t=134268501)

xAndrewx 07-21-2013 08:20 AM

Dead Players
 
When a player dies their body acts as a 'block'

Is there any way to disable a dead person from blocking? We use onwall / onwall2 to detect (custom movement)

I know there is a way around this using 'noplayerkilling()' but there is no toggle to 'enableplayerkilling()'

thanks

Emera 07-21-2013 08:48 AM

Quote:

Originally Posted by xAndrewx (Post 1720853)
When a player dies their body acts as a 'block'

Is there any way to disable a dead person from blocking? We use onwall / onwall2 to detect (custom movement)

I know there is a way around this using 'noplayerkilling()' but there is no toggle to 'enableplayerkilling()'

thanks

If you're using a custom movement, couldn't you run a check to see if the player's ani is "dead" (or whatever your death ani is :3) so they aren't taken into account when you're running your wall check?

xAndrewx 07-21-2013 11:40 AM

no because onwall and onwall2 returns true / false... lol

Emera 07-21-2013 12:30 PM

Quote:

Originally Posted by xAndrewx (Post 1720858)
no because onwall and onwall2 returns true / false... lol

I don't understand. If you're trying to stop a dead body from blocking, just run a check to see if a player's in the position you're checking and if there's a dead player there just skip the onwall check.

callimuc 07-21-2013 01:01 PM

Quote:

Originally Posted by Emera (Post 1720859)
I don't understand. If you're trying to stop a dead body from blocking, just run a check to see if a player's in the position you're checking and if there's a dead player there just skip the onwall check.

then players would be able to glitch through blocking npcs/walls

DustyPorViva 07-21-2013 03:55 PM

PHP Code:

//#CLIENTSIDE
function onPlayerChanges(pl) {
  if (
pl.ani.name == "dead"pl.isblocking false;



xAndrewx 07-21-2013 04:20 PM

Does that work @ Dusty?


Script help for 'isblocking':
TServerNPC.isblocking - boolean
TServerNPC.isblockingprojectiles - boolean

DustyPorViva 07-21-2013 05:20 PM

Quote:

Originally Posted by xAndrewx (Post 1720864)
Does that work @ Dusty?


Script help for 'isblocking':
TServerNPC.isblocking - boolean
TServerNPC.isblockingprojectiles - boolean

It should, it's one of those undocumented v6 things:
http://forums.graalonline.com/forums...postcount=1635

But it's clientside only, so you basically either have to loop through all the players clientside and change their blocking status, or use a function(like onPlayerChanges).

However onPlayerChanges() is only called when the player's head changes, or they enter the screen buffer. I'm trying to get Stefan to add onPlayerTouchsPlayer(playerobj) so there's a more reliable way of updating a player's blocking status.

xAndrewx 07-22-2013 05:17 PM

Interesting, thanks.

I assume since it's boolean you can toggle

Admins 07-22-2013 09:35 PM

It's documented in my version :) (start with -listscriptfuntions)
TServerPlayer.isblocking - makes the player blocking or non-blocking on the current client only

There can also be other ways to handle this:
- on server-side set the player classic health to zero while the player is dead (player.hp/hearts)
- on client-side you can use TServerLevel.isnopkzone = true/false, you can set this before using onwall and unsetting afterwards

TSAdmin 07-23-2013 05:23 AM

Quote:

Originally Posted by Stefan (Post 1720921)
It's documented in my version :) (start with -listscriptfuntions)
TServerPlayer.isblocking - makes the player blocking or non-blocking on the current client only

There can also be other ways to handle this:
- on server-side set the player classic health to zero while the player is dead (player.hp/hearts)
- on client-side you can use TServerLevel.isnopkzone = true/false, you can set this before using onwall and unsetting afterwards

Being documented in your version doesn't make it documented :p Just means you're the only one who actually has that particular documentation to access. Would be great if others could access this sometime *nudge nudge* ;)

xAndrewx 07-23-2013 06:34 AM

Quote:

Originally Posted by Stefan (Post 1720921)
It's documented in my version :) (start with -listscriptfuntions)
TServerPlayer.isblocking - makes the player blocking or non-blocking on the current client only

There can also be other ways to handle this:
- on server-side set the player classic health to zero while the player is dead (player.hp/hearts)
- on client-side you can use TServerLevel.isnopkzone = true/false, you can set this before using onwall and unsetting afterwards

Yay!! I'll try it later :D

xAndrewx 07-23-2013 06:28 PM

Hmmm when I set the players HP to 0 it made them walk through, however on Era iOS it still showed the 'End' sign and it kinda crashed my client

xAndrewx 08-31-2013 12:59 PM

Any ideas :(

fowlplay4 08-31-2013 03:23 PM

Don't use the hearts system.

smirt362 09-01-2013 02:55 PM

You could allow them to be pushed or pulled like a block. That's always fun.


All times are GMT +2. The time now is 07:36 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.