Power Up actor, 3 frames of animation

timbirks

  • Posts: 75
Hi all, I've created a PowerUp actor which has 3 frames of animation, 1 for each type of power up, the animation continually plays through the frames until the player collides with it.  I'd like it so the player collects the power up dependant upon the frame that was being displayed when the actor collided with the power up.  Anyone know of the best way of getting stencyl to register a frame number? ie, if on frame 1: +500 point,  if on frame 2: +1 life ect.    many thanks
Super Crash Land v1.2 - Available to Download now from Google Play absolutely free!   

https://play.google.com/store/apps/details?id=com.timbirks.supercrashlandv12

Hectate

  • *
  • Posts: 4643
Block reference link

Returns the number of the current frame of the current animation for the specified Actor. As above, animation frames begin numbering at 0.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

sdieters

  • Posts: 2068
@Hectate, for some reason it keeps looping the frames for the animations, even if i unchecked the loop box.

there you go buddy ( see attachment )

i tried to do it with frames as well, but i think that is a problem in 3.0, since i have done it multiple times in 2.0. so you have to go for different animations per PowerUp actor.

make sure that you uncheck the looping box in the appearance tab!

Time = amount of time between switching animation
State 1-3 + animations
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

Hectate

  • *
  • Posts: 4643
I'm confused; there's nothing in the OP that states looping is an issue. Was this intended for a different thread?
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

sdieters

  • Posts: 2068
Hi all, I've created a PowerUp actor which has 3 frames of animation, 1 for each type of power up, the animation continually plays through the frames until the player collides with it.  I'd like it so the player collects the power up dependant upon the frame that was being displayed when the actor collided with the power up.  Anyone know of the best way of getting stencyl to register a frame number? ie, if on frame 1: +500 point,  if on frame 2: +1 life ect.    many thanks
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

Hectate

  • *
  • Posts: 4643
Hi all, I've created a PowerUp actor which has 3 frames of animation, 1 for each type of power up, the animation continually plays through the frames until the player collides with itI'd like it so the player collects the power up dependant upon the frame that was being displayed when the actor collided with the power up.  Anyone know of the best way of getting stencyl to register a frame number? ie, if on frame 1: +500 point,  if on frame 2: +1 life ect.    many thanks
Adding emphasis is fun! The italics are mine.
I'm -pretty sure that the only actual question was how to get the frame number. The rest was a description of the setup involved.
So what I understand is:
1. An actor that animates a single 3-frame animation, looping.
2. Certain frames of that animation need to correspond to specific results.
3. How can I find out what frame the actor is on at any given moment?
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

timbirks

  • Posts: 75
Hi, sorry for the confusion, @Hectate you are correct, I'd like to find the frame number a power up actor is on when 'collected'.  Thanks for both your help, on this thread and on previous threads.    Very much appreciated.
Super Crash Land v1.2 - Available to Download now from Google Play absolutely free!   

https://play.google.com/store/apps/details?id=com.timbirks.supercrashlandv12

sdieters

  • Posts: 2068
@ hectate
yeah now i see it. my bad ^^
anyway, i was creating a little setup in which i switch the frames by code, so he can easily adjust the time between changing frames. i did that by using the following behaviour (see attached video for both setup and result). but for some reason the delay between switxhing frames varies allot, even though it's done by the same attribute.

so perhaps you can explain this? since i didnt had this problem in 2.0

@Timbirks, well at least you know how to aplie the right action if you hit the actor on a certain frame =)
NOTE: frame number 1 is grey, so its not empty =p
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p