How to get animation of pinned object to play?

0 favourites
  • 5 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • In my game i have shields as a power-up. If they are available, the ball (player) will automatically spawn 1 shield. The shield is animated, with a speed of 5.

    In my event sheet i have:

    System > MagnaShield greater 1 -- Ball -> Spawn MagnaShield on layer "Player" (image point 0) 2nd action MagnaShield > pin to Ball (position only)

    The ball will spawn the shield just fine.

    The problem is the shield's animation will not play when it is pinned to the ball, even if i try to 'set' or 'start' the animation. If i insert the shield on a layout and run it, the animation plays fine.

    How can i get the shields animation to play once it's pinned to the ball?

    Thanks for any help with this problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Whether it is pinned or not shouldn't affect anything to do with the animation, something must be blocking it from playing.

  • Whether it is pinned or not shouldn't affect anything to do with the animation, something must be blocking it from playing.

    There is an object in the game that is 1/4 size of the ball. This gets centered and pinned to the ball. It's only there to check if the ball is hanging far enough off the disks to be destroyed.

    I changed from the ball spawning the shield to this 'ball check', and pinned the shield to it as well. It worked as intended. So, i went and changed back to the ball spawning the shield and the shield being pinned to the ball. Again, it works as intended.

    I didn't change anything else. Only those 2 actions. Don't know why it wouldn't work on the first attempt of the ball spawning the shield and the shield being pinned to the ball itself.

    Weird.

  • i think the issue, is that your pinned action happens on a continuous loop, try calling the pinned behavior action, on a trigger once sub event see if that helps.

    if u dont have more then one animations for the shield ball effect, the animation should start playing by its own once its spawned, if the animation speed has a value higher then 0

    however we cant help u exactly without a snapshot of the actual event system u have or a simplified capx of the issue.

  • i think the issue, is that your pinned action happens on a continuous loop, try calling the pinned behavior action, on a trigger once sub event see if that helps.

    if u dont have more then one animations for the shield ball effect, the animation should start playing by its own once its spawned, if the animation speed has a value higher then 0

    however we cant help u exactly without a snapshot of the actual event system u have or a simplified capx of the issue.

    Thanks for the reply

    Aa i mentioned in my 2nd post, it works now. I changed the objects that spawned the shield but then changed it back to the ball.

    So i really didn't change anything, and it works now.

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