Author Topic: Help needed understanding call when finished  (Read 3518 times)

SJones

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Help needed understanding call when finished
« on: October 21, 2012, 03:43:51 AM »
I have searched, read and tried to figure out the "call when finished" field on the animation scripts.

on the UIbuttonplay animation script help page it says this can be used to play another animation after the current one has finished.
http://www.tasharen.com/?page_id=875

however I am strugeling to understand / working this feature, I am not a coder and an artist, all searches have reference to code.

All I am trying to do at the moment is to play a second animation after the first one has finished from a UI interaction (eg. button press etc.) possibly chain more after that if possible.

for the most part I have NGUI working perfectly how I need and has been fantastic tool to work with (way better than the stock unity UI) this though is the only subject I have struggled to research and get a guide on how to do it.

while I say I am not a coder I can do some code but avoid it like the plague, if someone could point me in the right direction to a least programmy way of using this feature I would be most grateful.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Help needed understanding call when finished
« Reply #1 on: October 21, 2012, 03:32:04 PM »
Call When Finished function is indeed aimed at developers. You can use it to call a custom function on a remote object.

Is there a particular reason why you are trying to chain several animations like this instead of just creating one animation?

You can use UIButtonPlayAnimation script here to trigger animations in a chain. Just set it to trigger via OnClick event, and set the "call when finished" function to be "OnClick".

SJones

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Help needed understanding call when finished
« Reply #2 on: October 21, 2012, 10:12:28 PM »
thank you for your super helpful response, (going to test this in a mo!)

I have been given more some thought to your question before you asked it, I am still learning unity's animation as I have come from UDK, but the main reason would be for example, reverse animation, there may be several steps to a final menu with different animations at each step, and if you wanted to reverse this animation, instead of making another animation combining all of them, you would simply use the same animations for going forwards in a reverse linked chain.