|
| 15 Dec 2009 04:13 PM |
| Yes, I used MakeJoints(). My NPC has more than 6 bricks. I defined a Torso, Left Leg, and Right Leg. I changed the name of Humanoid to Enemy. And my NPC keeps dying. Any ideas? |
|
|
| Report Abuse |
|
|
mactrent
|
  |
| Joined: 04 Mar 2009 |
| Total Posts: 1239 |
|
|
| 15 Dec 2009 04:14 PM |
Enemy.Health=Enemy.MaxHealth
<~mac |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2009 04:15 PM |
| Tried that. My NPC still goes down like a tree that just had an encounter with a chainsaw wielding lumberjack. |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 15 Dec 2009 04:16 PM |
| Pfft, just make sure the humanoid comes .5 seconds after it is spawned. So make sure there is no humanoid in the NPC then spawn one .5 seconds later. It dies because when the scripts make the joints, the humanoid has already confirmed that they are not there before hand. |
|
|
| Report Abuse |
|
|
mactrent
|
  |
| Joined: 04 Mar 2009 |
| Total Posts: 1239 |
|
|
| 15 Dec 2009 04:16 PM |
Did you define the health BEFORE you put it in workspace?
If you didn't, that would leave a bit of time where its health was 0...
<~mac |
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Dec 2009 04:22 PM |
| My NPC breaks apart whether or not the Humanoid is there... So that's the problem, I guess it's unstable? |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 15 Dec 2009 04:23 PM |
OMG
Listen to what mactrent said.....imbecile... |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2009 04:24 PM |
I tried it, fool.
It still collapses. |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 15 Dec 2009 04:25 PM |
| Then you are the fool, you don't look hard enough. Before you ignorantly insult me again, try LOOKING |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2009 04:26 PM |
| At 30 lines? I've checked everything. There isn't a single error, output has no help, so... it's a lost cause right now. |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
| |
|
|
| 15 Dec 2009 04:31 PM |
while true do wait (0.01) local dude = game.Workspace:findFirstChild("Necromancer") if (dude==nil) then local c = game.Lighting.Necromancer:clone() c:MakeJoints() c.Parent = game.Workspace c.Torso.CFrame = CFrame.new(0, 11.9, 239.5) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),0) wait (0.5) local ce = game.Lighting.Enemy:clone() ce.Health = ce.MaxHealth ce.Parent = c elseif (dude.Enemy.Health==0) then local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "The Necromancer has been slain! Good work, brave heros!" wait (15) m:remove() wait (15) dude:remove() local cl = game.Lighting.Necromancer:clone() cl:MakeJoints() cl.Parent = game.Workspace cl.Torso.CFrame = CFrame.new(0, 11.9, 239.5) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),0) wait (0.5) local cle = game.Lighting.Enemy:clone() cle.Health = cle.MaxHealth cle.Parent = cl local msg = Instance.new("Message") msg.Text = "The Necromancer has returned! Fend him off until he is no more!" msg.Parent = game.Workspace wait (5) msg:remove() end end |
|
|
| Report Abuse |
|
|
mactrent
|
  |
| Joined: 04 Mar 2009 |
| Total Posts: 1239 |
|
|
| 15 Dec 2009 04:38 PM |
| Did it at least stay alive long enough to keep together when you CFramed the torso? |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2009 04:38 PM |
| No, you gave me an idea though. CFrame the torso THEN Make Joints. That oughtta work. :P |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Konamii
|
  |
| Joined: 02 Feb 2009 |
| Total Posts: 47 |
|
|
| 15 Dec 2009 05:13 PM |
I haven't read your script, but I'll offer a piece of random help. sorry if it doesn't help.
c=person:Clone() c.Parent=game.Workspace c:MakeJoints() c.Torso.CFrame=CFrame.new(x,y,z)
if your humanoid in question already has an animate script, then replace c:MakeJoints() with c.Head:MakeJoints()
For some reason, trying to make joints welds causes an error, at least back long time ago when I scripted. Don't know about now |
|
|
| Report Abuse |
|
|
Konamii
|
  |
| Joined: 02 Feb 2009 |
| Total Posts: 47 |
|
|
| 15 Dec 2009 05:13 PM |
| Be sure to put the Makejoints between setting parent, and cframing it |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2009 05:17 PM |
Wow, thanks :o I'll try that some other time. |
|
|
| Report Abuse |
|
|
|
| 15 Dec 2009 06:04 PM |
| For some reason. Even if I set the health. The Humanoid still has the health of 0 when it gets into the NPC. |
|
|
| Report Abuse |
|
|
Kevin7704
|
  |
| Joined: 08 Jan 2009 |
| Total Posts: 5568 |
|
|
| 23 Dec 2009 07:42 PM |
Pfft, just make sure the humanoid comes .5 seconds after it is spawned. So make sure there is no humanoid in the NPC then spawn one .5 seconds later. It dies because when the scripts make the joints, the humanoid has already confirmed that they are not there before hand.
its the max health |
|
|
| Report Abuse |
|
|
Kevin7704
|
  |
| Joined: 08 Jan 2009 |
| Total Posts: 5568 |
|
|
| 23 Dec 2009 07:43 PM |
c=person:Clone() c.Parent=game.Workspace c:MakeJoints() c.Torso.CFrame=CFrame.new(x,y,z)
if your humanoid in question already has an animate script, then replace c:MakeJoints() with c.Head:MakeJoints()
thats why the NPC died |
|
|
| Report Abuse |
|
|
ProbeIke
|
  |
| Joined: 22 Apr 2008 |
| Total Posts: 3134 |
|
| |
|
Arioka
|
  |
| Joined: 01 Sep 2008 |
| Total Posts: 5165 |
|
|
| 23 Dec 2009 07:45 PM |
| This is a really old thread. I only posted it for refrance. I'm sure they don't need help anymore. Don't you guys check first? |
|
|
| Report Abuse |
|
|