|
| 06 Sep 2016 03:34 PM |
Hello, I've got the basic NPC that is a roblox character model that uses pathfinding and works in FE conditions.
Now I'm having two problems:
1) It won't let me play an animation on the AI 2) I have no idea how to make a custom character rig for monsters instead of the usual Roblox NPCs.
Any help guys?
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 03:48 PM |
b1
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 03:58 PM |
ah i would also know how to do this
My sharks spread love and peace all over ROBLOX forums! r+://298907724r+://463745627 |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 04:00 PM |
Okay then how? x.x
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 04:01 PM |
sorry, i meant that i would also like to know how to do this
My sharks spread love and peace all over ROBLOX forums! r+://298907724r+://463745627 |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 04:03 PM |
Oh thanks...
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 06 Sep 2016 04:23 PM |
I forget how I got them to animate, but I had the same issue as you at first. Sorry :(
|
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 04:27 PM |
;-;
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 06 Sep 2016 04:30 PM |
Ensure moving them with moveto plays the animation (im pretty sure it did for me although didn't with pathfinding)
I might have created a custom animation w/ same animation and used that
you should be able to use a custom rig without a problem tho
|
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 04:36 PM |
Wait, what do you mean? My AIs are moved with Moveto, yes...
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 06 Sep 2016 04:42 PM |
like if you manually use moveto do they animate? if not its a rig prob pretty sure
|
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 04:45 PM |
This is the segment of code with Moveto:
for _, point in ipairs(points) do repeat script.Parent:MoveTo(point) animTrack:Play() distance = (point - script.Parent.Parent.Torso.Position).magnitude wait() until distance <= 3 end
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 04:46 PM |
| the best way to make AI is to keep making new paths all the time and moving to the 2nd point unless you want things that can get in the way (such as moving obstacles) ## ## follow something that moves to not work correctly |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 05:03 PM |
Er so did I do it incorrectly? xD
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 05:04 PM |
| well if you only make one path, that path will not change unless you make a new one. |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 05:05 PM |
Mm so what would be a better way to rewrite it??
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 05:07 PM |
| there is no "better way" but one of the best ways is to constantly generate a path that is connected to some event (to prevent major server lag) like Heartbeat or something, then have the character always generate new paths each time and follow the 2nd or 3rd points (since when a character reaches point 2, it will be replaced with point 1 in a new path) |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 05:08 PM |
Alrighty, I'll try to do that. Any suggestions for playing animations?
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 05:10 PM |
torso.Velocity.Magnitude
is the length of the vector
so you can use that to find out how fast they are moving |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 05:21 PM |
No no, I'm talking about the animations and such...
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 05:25 PM |
??????? local playing = nil
if torso.Velocity.Magnitude > something and playing~=walk then idle:Stop(0.2) walk:Play(0.2) playing = walk elseif torso.Velocity.Magnitude <= something and playing~=idle then walk:Stop(0.2) idle:Play(0.2) playing = idle end
--0.2 is fade time |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 05:26 PM |
idle and walk are supposed to be what? I got the other two done.
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 05:29 PM |
you just need to check the speed of the character
and just in case you do not want them to be walking while falling, multiply the velocity by Vector3.new(1,0,1) before getting the magnitude |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 05:30 PM |
while wait do local playing = nil local torso = script.Parent.Parent.Torso
if torso.Velocity.Magnitude > 0 and playing~=walk then idle:Stop(0.2) walk:Play(0.2) playing = walk elseif torso.Velocity.Magnitude <= 0 and playing~=idle then walk:Stop(0.2) idle:Play(0.2) playing = idle end end
This is currently what I have running on the side inside the script. Now, what are idle and walk supposed to be?
"Everybody has a chapter they don't read aloud." |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2016 05:35 PM |
dont copy my code, figure out how to do it for yourself otherwise you would not even know why you are doing what you are |
|
|
| Report Abuse |
|
|