Forum rules - please read before posting.

Player Animation to run after Player stands still for few seconds

Hi Chris,
I want to create some custom animations for player and 
want those to be played after Player is standing still for more than say 3 or 5 seconds.
When he is standing shorter than standard Player_idle.
After 5 th second passes player is starting to do something else 
(looking onto watch or checking pockets).

How can I achiewe that in AC ?
Is this possible using engine itself ?
Or should I make some custom scrypting in Unity ?

Thanks in advance
Wojciech

 

Comments

  • What animation engine are you using?  If Mecanim, then you could do that directly within your Mecanim controller - just wire up a new idle animation after an an initial idle animation plays.

    Otherwise, yes - a custom script could do that by reading the amount of time a Player has been idle for:

    AC.KickStarter.player.charState == CharState.Idle

    How to change the idle animation, however, will depend on your animation engine.
  • Sprites Unity unfortunetly (Guess its the basic one ?).

    Maybe friend will help me implement that code.

    So how to connect that code with AC engine (Sprites Unity) ? 
    (so my helper have more info on that subject? ;]).

    Thanks


  • Im total coding noob, 
    (I'v made 1 simple game in Phaser once, but that was JS i guess ?).

    and here is C# and its way to complex for me...
    ;]
    (great to have graphical scrypting like in AC thou).

  • If you swap your animation engine to Sprites Unity Complex, you can do the same Mecanim trick I mentioned - it's basically Mecanim but for 2D characters.  See Section 3.9 of the Manual for more on that mode.
  • Great will try to do that !
    ;]

  • I was trying to find Brian prefab with Sprites Unity Complex to learn from but dont have it in my folders.
    Should I downlad newest version of AC ?

    My current version is 1.53d


  • Any version of AC includes the 2D Demo, which is where Brain's character sprites are.  Using the latest version of AC is always recommended though - just be sure to back up your project and read the "Upgrade notes" for each update first.
  • Yes but in my folders there was normal Brian prefab (Sprites Unity), (and could not find Sprites Unity Complex one).

    Will try to update and check again.


  • Such a prefab was introduced in v1.54c.
  • edited March 2017
    Hi,
    I'v just noticed that You added resume previously played music piece to "Play Music" action in newest build.
    Great job !
    Is much better now ;)
    Thanks

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.