How to get animation of pinned object to play?

Get help using Construct 2

Post » Sat Nov 12, 2016 6:21 pm

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.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Sat Nov 12, 2016 6:26 pm

Whether it is pinned or not shouldn't affect anything to do with the animation, something must be blocking it from playing.
B
46
S
16
G
79
Posts: 2,170
Reputation: 46,857

Post » Sat Nov 12, 2016 7:00 pm

plinkie wrote: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.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Sat Nov 12, 2016 7:28 pm

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.
B
78
S
23
G
69
Posts: 1,353
Reputation: 43,985

Post » Sat Nov 12, 2016 8:23 pm

gamecorpstudio wrote: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.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107


Return to How do I....?

Who is online

Users browsing this forum: Bobbyneal100, Kin, mickclarke, sean080, tinhofiel, TRMG and 40 guests