generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Game Design
Home Search
 

Re: Animation help

Previous Thread :: Next Thread 
SuperRoblox893 is online. SuperRoblox893
Joined: 01 Jun 2014
Total Posts: 634
29 Jun 2015 07:24 PM
How would I make that if a NPC wants to damage someone with a sword or nothing, they do an attack animation?
Report Abuse
SuperRoblox893 is online. SuperRoblox893
Joined: 01 Jun 2014
Total Posts: 634
29 Jun 2015 07:25 PM
And I want them when then slash and lunge, it damages.
Report Abuse
SuperRoblox893 is online. SuperRoblox893
Joined: 01 Jun 2014
Total Posts: 634
29 Jun 2015 07:34 PM
The animations I talk about NPCs are in Field of Battle.
Report Abuse
SuperRoblox893 is online. SuperRoblox893
Joined: 01 Jun 2014
Total Posts: 634
29 Jun 2015 08:05 PM
bumpppppp
Report Abuse
SuperRoblox893 is online. SuperRoblox893
Joined: 01 Jun 2014
Total Posts: 634
29 Jun 2015 08:46 PM
Forever alone -SuperRoblox893
Report Abuse
SuperRoblox893 is online. SuperRoblox893
Joined: 01 Jun 2014
Total Posts: 634
29 Jun 2015 09:03 PM
b2
Report Abuse
SuperRoblox893 is online. SuperRoblox893
Joined: 01 Jun 2014
Total Posts: 634
30 Jun 2015 06:16 AM
been a night and still no response
Report Abuse
Glaecium is not online. Glaecium
Joined: 28 Aug 2010
Total Posts: 7720
30 Jun 2015 06:33 AM
ik how to make animations but i do not know how to use them
sorry m8 :/



"DAVID STAY THE HELL AWAY FROM MY BABY" ~rached65 6/26/2015
Report Abuse
SuperRoblox893 is online. SuperRoblox893
Joined: 01 Jun 2014
Total Posts: 634
30 Jun 2015 06:35 AM
ik how to make them too but cant use them
Report Abuse
SuperRoblox893 is online. SuperRoblox893
Joined: 01 Jun 2014
Total Posts: 634
30 Jun 2015 08:42 AM
if i dont have any suggestions i would have to cancel my project..
Report Abuse
SuperRoblox893 is online. SuperRoblox893
Joined: 01 Jun 2014
Total Posts: 634
30 Jun 2015 04:28 PM
b3
Report Abuse
Vesqueral is not online. Vesqueral
Joined: 30 Jan 2015
Total Posts: 2336
30 Jun 2015 04:48 PM
Here, use this fm code I made a while ago

local AI = {};

AI.torso = script.Parent.Torso;
AI.hum = script.Parent.Humanoid;
AI.targ = nil;
AI.los = 100;
AI.connections = {};

function AI:getClosestHum(prList)

local list = prList or game.Players:GetPlayers();
local closest = self.los;
local torso;

for _,hum in pairs(list) do
if hum and hum.Parent then
local dist = (hum.Character.Torso.Position - self.torso.Position).magnitude;
if dist <= closest then closest = dist; torso = hum.Character.Torso end -- set closest to the distance and the torso as the new closest torso.

end
end
return torso, closest
end

function AI:isClose(dist)
if dist < 10 then return true end
end

function AI:move(pos)
print("Ran")
self.hum:MoveTo(pos);
end

function AI:discon()
for _,v in pairs(self.connections) do
if v then
v:disconnect()
end
end
end

function AI:mainLoop()
while wait(1) do
local con;
self:discon()
self.targ,dist = self:getClosestHum();
if self.targ then
self:move(self.targ.Position)
table.insert(self.connections,con);
if self:isClose(dist) then self.targ.Parent.Humanoid:TakeDamage(10 - -dist) end -- add damage closer to target
end
end
end

coroutine.resume(coroutine.create(function()AI:mainLoop()end))

Just put it in a humanoid, it won't animate, you'll have to edit it for that
Report Abuse
SuperRoblox893 is online. SuperRoblox893
Joined: 01 Jun 2014
Total Posts: 634
30 Jun 2015 06:30 PM
K, I will try it tomorrow will it work with the npc with the sword too?
Report Abuse
SuperRoblox893 is online. SuperRoblox893
Joined: 01 Jun 2014
Total Posts: 634
30 Jun 2015 06:37 PM
I want to change the damage of the NPC I think you have to edit the damage at a line that says 10
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image