Power up from off screen. Not repeating. Heres my code.

CaptFinnCaptFinn Member Posts: 1,828
edited November -1 in Working with GS (Mac)
I have a power up actor that I want to come from off screen every 10 secs. ( 10 secs is for testing purposes) It works the first 10 secs but not 10 secs after that. My code is this.

Runner Actor:
Timer
Every 10 Sec Run to Completion

Inside the timer I have 2 Interpolates

1 self.position.x 512
Duration 5 Linear

2 self.position.y 384
Duration 5 Linear.

Rule actor on collide with base
inside the rule Destory actor.

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    is it colliding with the base right away?

    once its destroyd its gone, so its not there to interolate every 10 seconds

    try this. have the alpha on it set to 0, have a rule every 10 seconds change alpha to 1

    then have another rule when alpha =1 interpolate self position x to 512 and interpolate self position y to 384

    then you can have one more rule when attribute self position x is = or greater then 512 or when actor collides with base (any condition valid)

    change attribute self color alpha to 0

    thaat will keep you a nice repeating recycle
Sign In or Register to comment.