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 » Scripters
Home Search
 

Re: How does one create prioritized animations?

Previous Thread :: Next Thread 
RemasteredBox is not online. RemasteredBox
Joined: 19 Jun 2016
Total Posts: 2140
05 Sep 2016 02:16 PM
Assuming I'm lerping the default character joints, how would I create some sort of priority system? I tried a bunch of if statements to override animations and it ended up being 400+ lines for two animations. I need some way to make animations overlap each other. Such as walk animations get overridden by jump, but jump gets overridden by climb or swim, etc.


I can C-Sharply, can you?
Report Abuse
imtellingmommy is not online. imtellingmommy
Joined: 10 Mar 2013
Total Posts: 817
05 Sep 2016 02:18 PM
##################################################
Report Abuse
RemasteredBox is not online. RemasteredBox
Joined: 19 Jun 2016
Total Posts: 2140
05 Sep 2016 03:18 PM
bump


I can C-Sharply, can you?
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
05 Sep 2016 03:26 PM
I would have the animations as functions, and these functions set a "priority" variable depending on their priority

so for example, if walking animation is 2 priority and jumping is 3, when the jumping function animation is called, it changes the var value to 3

the walking animation loop uses an if statement to see if the current priority is higher than it's priority, and returns the function (to end it)
Report Abuse
RemasteredBox is not online. RemasteredBox
Joined: 19 Jun 2016
Total Posts: 2140
05 Sep 2016 03:27 PM
@Aggressive

Could you show me an example? :(


I can C-Sharply, can you?
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
05 Sep 2016 03:30 PM
local priority = 0

function walkanimation () --2 priority
if priority > 2 then return nil end
priority = 2
while priority <= 2 then
--animate
wait()
end
end

function jumpanimation() --3 priority
if priority > 3 then return nil end
priority = 3
while priority <= 3 then
--animate
wait()
end
end

something like that
Report Abuse
RemasteredBox is not online. RemasteredBox
Joined: 19 Jun 2016
Total Posts: 2140
05 Sep 2016 03:32 PM
Okay thanks.


I can C-Sharply, can you?
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
05 Sep 2016 03:33 PM
an issue with that script is when an animation is done, the priority level will stay high

at the end of the function you could set priority to 0 so the next highest animation would take over
Report Abuse
RemasteredBox is not online. RemasteredBox
Joined: 19 Jun 2016
Total Posts: 2140
05 Sep 2016 03:34 PM
Danks fam.


I can C-Sharply, can you?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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