pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 09 Jul 2011 06:34 AM |
| I haven't found a glitch with it, but I have a feeling it *might* do this: has anyone ever heard of it firing more than once for one person? |
|
|
| Report Abuse |
|
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
Anaminus
|
  |
 |
| Joined: 29 Nov 2006 |
| Total Posts: 5945 |
|
|
| 09 Jul 2011 06:40 AM |
| What causes you to have that feeling? |
|
|
| Report Abuse |
|
|
| |
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 09 Jul 2011 06:40 AM |
| Darn. That will be really, really annoying for my script. |
|
|
| Report Abuse |
|
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 09 Jul 2011 06:42 AM |
@Anaminus - That glitch with the darkheart where someone gets more than one death. I need it to work for a sword script I am making.
reddeaths = 0 bluedeaths = 0
redDied() reddeaths = reddeaths + 1 end
blueDied() bluedeaths = bluedeaths + 1 end
alltheplayersinred.Died:connect(redDied) alltheplayersinblue.Died:connect(blueDied)
repeat wait() until reddeaths == 3 or bluedeaths == 3 --all of one team have died (3 in a team) |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 06:44 AM |
Make your own :)
function ConnectDiedEvent(PlayerHum,func)
local Player = PlayerHum local PlyDB = false local func = func
Player.Died:connect(function() if PlyDB == false then PlyDB = false func(game.Players:GetPlayerFromCharacter(Player.Parent)) coroutine.resume(coroutine.create(function() wait(6)--Replace with respawn time PlyDB = true end)) end end)
function Died(Ply) print(Ply.Name.." has died. :(") end
ConnectDiedEvent(game.Players.pighead10,Died) |
|
|
| Report Abuse |
|
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 09 Jul 2011 06:48 AM |
"if PlyDB == false then PlyDB = false" lol?
I'll make my own one if it ends up glitching. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 07:04 AM |
| You can't use CharacterRemoving? |
|
|
| Report Abuse |
|
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 09 Jul 2011 07:19 AM |
| No, because that doesn't fire when someone dies. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 07:22 AM |
It does...
The character still exists when the event is called.. |
|
|
| Report Abuse |
|
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
|
| 09 Jul 2011 07:34 AM |
The event CharacterRemoving is called before the character stops existing.
And it DOES exist.
|
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 09 Jul 2011 07:38 AM |
Ever wondered why there is a CharacterAdded event and a CharacterRemoving one?
One calls before the character is removed, the other calls after the new one is added.
That's the reason there is a character argument to both. |
|
|
| Report Abuse |
|
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
| |
|
|
| 09 Jul 2011 10:01 AM |
| Figure out what would cause .Died to be fired more than once, and have your script take note..? |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2011 10:06 AM |
| .Died fayls to. Sometimes it fires 3 times, other times it doesn't fire at all. I found that out while making a zombie game. |
|
|
| Report Abuse |
|
|
Aaaboy97
|
  |
| Joined: 05 Apr 2009 |
| Total Posts: 6612 |
|
|
| 09 Jul 2011 10:46 AM |
local already = {} function onDied(player) if already[player] then return end
already[player] = true
< as before > end
player.Character.Humanoid.Died:connect(function() onDied(player) end) |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 09 Jul 2011 11:05 AM |
| CharacterRemoving also fires when the player leaves because the player leaving removes the character. Why would you even suggest CharacterRemoving? |
|
|
| Report Abuse |
|
|