How to control set position animation

0 favourites
  • 14 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • I still try to understand and adapt the catmull rom script wrote by R0J0hound and I need some explanations about it. In this script was used a set position animation and I need control the time that animation start. Script is follow:

    <img src="http://dl.dropbox.com/u/72651057/code.gif" border="0" />

    For example: If I use a loop to create Sprite objects by the system and use the button to start it e press it after 10 seconds after the animation preview, the Sprite will appears in the center of the stage and not in the home position. I want the animation to start after pressing the button, and not before.

    Please, I really need to uderstand the procedures about how to control this animation

    Thanks

  • Looks like you can modify the first value "time" and see if that changes the animation speed. Ive not seen this before though, so can you describe or show what it does when running?

  • I didn?t find a "time" variable.

    Please, look directly in the capx that R0J0hound relesead:

    http://dl.dropbox.com/u/5426011/examples%208/catmullrom.capx

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Bump

  • Plz, I need only some explanations: If "time" is not a variable what�s and how to control?

  • The Variable 't' stands for time.

    You can use an additional boolean condition ('idle') with the for each loop. (if Sprite.Idle is false) That way the sprites starts if you switch the boolean condition.

    I think you should use a different approach: The script can only work out one path, any object must be on the path. You could use pathfinding for your sprite to approach your path and then 'switch' to path follow mode. I don't really understand what you want to do though

  • Hi GameForger

    Thank you very much for the instructions. I'll try to implement them.

    I try to develope a game that has ghosts as enemies. This rotation system with constant speed generates a very interesting movement for this type of character, better than if I had used waypoint. Will be able to get the same result with pathfind?

  • I created a boolean variable in the sprite and set it to false, added a new conditional above the "System" event with loop, to check if the variable is true and use a button to change the variable to true. The result is the same: depending on how long I wait to click the button, the sprite appears already in the middle of the screen because the animation keeps happening before I hit the button.

  • UP

  • Sorry for insisting so much, but I'm really interested in understanding this script and adapting for my needs after.

  • I think this is the only way:

    Ready. Three times

  • I think you mean

    Careful not to sound like a jerk ;)

  • Edited.

    Thanks sqiddster

  • New try.

    BUMP

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)