|
| 24 Apr 2016 09:44 PM |
Is there a way I can find if a player died but make sure it wasn't because he reseted?
|
|
|
| Report Abuse |
|
|
|
| 24 Apr 2016 09:46 PM |
| Maybe if it isn't instant 1 hit ko |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2016 09:46 PM |
I guess I could disable reset and add a custom one?
|
|
|
| Report Abuse |
|
|
| |
|
|
| 24 Apr 2016 09:52 PM |
| Think of it like this, there are only three ways a character can die. Something created in your game that kills them, they fall off the edge of the map, or they reset. If you can make it so they can't fall off the map, then you have created only two ways for them to die. Now all you need to do, is change every script in the game that kills them to add a specific object into their character on death. Most bloxx weapons are created to add a creator tag into the humanoid when they are killed. Once you have completed this task, all you need to do is check if that object is in their character when they die, and there you go. Now you know if they reset or if they were killed in game. |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2016 09:54 PM |
http://wiki.roblox.com/index.php?title=Reset
Disable reset then you're able to just use the Died event
http://wiki.roblox.com/index.php?title=API:Class/Humanoid/Died
|
|
|
| Report Abuse |
|
|
|
| 24 Apr 2016 10:00 PM |
| That still leaves two ways for them to die, falling off the map, and dying in game. You still need to find a way to prevent them from falling off the map. |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2016 10:12 PM |
There is an even simplier way. You could have the client see if the server already knows that player is dead. This is how it would work:
Once the client detects that the player has died, it sends a signal (using a RemoteFunction) that tells the server to check if it knows that the player is dead. Know the server will have a counter that will count how much time has past (since the player has died) UNTIL the message from the client has been sent. Next the server anlizes the counter's wait time, and if the time is small enough, that means that the "death message" has been sent from the that client FIRST.
In other words, this system detects if the client knew that that player died first, or if the server did (since the reset option always displays the death first before the server knows about it). |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 24 Apr 2016 10:15 PM |
I don't understand. But its ok.
|
|
|
| Report Abuse |
|
|
|
| 24 Apr 2016 10:22 PM |
In english:
If a different player killed our player, the server would know first. But if our little friend did a kamikaze attack and hit the reset button, that death would be displayed FIRST on the client's computer, then on the server after awhile. We want to know the time it took for the server to know when the client learned that he or she had died. |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 01:20 AM |
here is a way that nobody thought of
name the humanoid to a certain name, and access it to that name like this
user=game:service'Players'.Shimotsuki; user.Character:findFirstChild'Humanoid'.Name='Human';
get_custom=function(user) for Index,Stuff in next,user.Character:children()do if Stuff.className=='Humanoid'and Stuff.Name=='Human'then return Stuff; end; end; end;
break=get_custom(user); break:destroy(); |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 02:19 AM |
| @LaterlLace, this still would pose a problem for those that fall off the edge of the map, as that would be seen by the server side as a kill rather than a reset. |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2016 03:02 AM |
| Just put a LocalScript inside of them somewhere that runs a loop to detect if their Y position is below a certain point. If so, it adds the same thing to them that the rest of the game's "kill scripts" do. That should be a solution to them falling off the map. |
|
|
| Report Abuse |
|
|