|
| 28 Jan 2014 10:50 AM |
I've made a number of custom action animations, and was hoping someone could tell me how I can put them like the Roblox actions, so that you perform them by saying, "/e [animation name".
Does anyone here have any experience with that? |
|
|
| Report Abuse |
|
|
EcIiptic
|
  |
| Joined: 12 Aug 2009 |
| Total Posts: 13737 |
|
|
| 28 Jan 2014 10:59 AM |
Chat(msg, plyr) if msg:sub(3) == "Jump" then --code here for jump animation elseif msg:sub(3) == "Walk" then --code here for walk animation end end
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) if message:sub(1,2) == "/e" then Chat(message, player) end end) end) |
|
|
| Report Abuse |
|
|
|
| 28 Jan 2014 11:10 AM |
1. Do I just put that in workspace, I take it?
2. I can copy/paste that last section as many times as needed without issues, correct? |
|
|
| Report Abuse |
|
|
EcIiptic
|
  |
| Joined: 12 Aug 2009 |
| Total Posts: 13737 |
|
|
| 28 Jan 2014 11:16 AM |
Use this instead, it's easier.
Place this script in workspace, then use your brain to figure out the rest. :)
InitiationPhrase = "e/" Length = string.InitiationPhrase:len()
Chat(msg, plyr) local Message = msg:lower() local Player = plyr if Message:sub(Length + 1) == "jump" then --code here for jump animation
elseif Message:sub(Length + 1) == "walk" then --code here for walk animation
end end
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) if message:sub(1, Lenth) == InitiationPhrase then Chat(message, player) end end) end) |
|
|
| Report Abuse |
|
|
EcIiptic
|
  |
| Joined: 12 Aug 2009 |
| Total Posts: 13737 |
|
|
| 28 Jan 2014 11:17 AM |
InitiationPhrase = "e/" Length = string.InitiationPhrase:len()
Chat(msg, plyr) local Message = msg:lower() local Player = plyr if Message:sub(Length + 1) == "jump" then --code here for jump animation
elseif Message:sub(Length + 1) == "walk" then --code here for walk animation
end end
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) if message:sub(1, Length) == InitiationPhrase then --Misspelled Length, sorry :P Chat(message, player) end end) end) |
|
|
| Report Abuse |
|
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 28 Jan 2014 11:17 AM |
@OOP
How did you make animations? |
|
|
| Report Abuse |
|
|
|
| 28 Jan 2014 11:18 AM |
Well, I suppose my brain has gotten me this far, so...
Thanks, at any rate. If I'm using the default walk and jump animations, what do I do? Just remove those sections? |
|
|
| Report Abuse |
|
|
|
| 28 Jan 2014 11:21 AM |
http://www.roblox.com/Roblox-Animation-plugin-item?id=142327236
Add an animation dummy from free models and select the plug in, then click it. It takes a bit of time to learn, but it's fairly easy once you get the hang of it. |
|
|
| Report Abuse |
|
|
|
| 28 Jan 2014 11:35 AM |
Alright- the one thing that's been giving me issues:
How do I actually implement my custom animations into the script? Do I put the actions as animations or as stringvalues? Where do I then put those, in the workspace or in the script like the roblox animations are? |
|
|
| Report Abuse |
|
|
EcIiptic
|
  |
| Joined: 12 Aug 2009 |
| Total Posts: 13737 |
|
|
| 28 Jan 2014 12:04 PM |
Your on your own with that one.
All I did was give you a function that fires when someone says "e/ jump" or "e/ walk"
You can add more elseif's for more animation's, and change the stringvalue of "jump" to something else if you want the person to say something else for it to fire.
But I don't know the first thing about making animations. |
|
|
| Report Abuse |
|
|