Timer Issue?

Having an issue with something I thought would be straightforward, but isn't that always the case. Yes I have read the "timers are for chumps" thread, but I'm just making a proof of concept template so I figured "Timer" was quicker even if dirtier.

What I want:
A "rain" of blocks falling that have different images.

My code:
Actor: Spawner
Timer: every 0.2 seconds spawn actor "block"

Global variable "count" (integer)

Actor: block
Accelerate @270(scene) speed 200
Rule: if self.time>4 destroy
Rule: if self.time<= 0.2
Do:
Rule: if count =1
set image to block1
Set count to 2
.....(3 more rules to cover 2,3,4)
Rule: if count=5
Set image to block5
Set count to 1

My block images are just rectangles with numbers 1-5 on them (like I said just want proof of concept for now)

Results: a steady stream of blocks with the #5 on them falling across the screen

I tried moving the self.time condition to 0.1 and 0.3 but it appears to make no difference.

I have tried re-ordering the rules to change count before or after change image but that also appears to make no difference.

Thoughts?

Grim

Comments

  • grimtoothgrimtooth Member Posts: 69
    If i set "Count" to 5 in game attribute panel.. then i now get a screen full of block #4's (it was previously set at #1 in game attribute panel.
  • grimtoothgrimtooth Member Posts: 69
    ok, disregard... went through and re-entered all my "set Count=" integers using only the green checkmark instead of writing numbers in the box and it seems to have worked out (also changed the self.time condition to 0.02 sec and still works yay)

    Sorry for the spam, carry on
    Grim
Sign In or Register to comment.