Oh! well it's not really a problem is it?
You just have to duplicate the object and change its text with event as you still have the value in the global variables.
minaPlatform.capx
and what about the second capx? with simulated control?
Just cleaned things up and explain the Global variable concept in comment.
like that?
rollRoll.capx
Develop games in your browser. Powerful, performant & highly capable.
Don't understand why you have 3 NPC object instead of 3 instances of the same object
Forgot to ask last time I saw your capx
1) assuming the pivot is in the center of the sprite
foreach Sprite Sprite.X >= LayoutWidth-Sprite.Width/2 -> Sprite: set touchBoundary to true -> Sprite: set yStart to Sprite.Y
yStart is an instance variable
2)
Global variable yPixels = 100 Sprite: Y position is lower than Sprite.yStart+yPixels Sprite: is touchBoundary -> Sprite: set Y to Sprite.Y+50*dt
will move the sprite by 100px down at 50px/sec
3) how do you move them to left in the first place?
I think you can achieve this effect with the canvas, by pasting your shield on start of frame, and then pasting a destination out blowing sprite on top of it to erase them.
Mod edit :
Please see : This tutorial
I guess the function forget the picking but without seeing the function I can't really say.
Also I never used the TimeLine plugin so I don't really know what it does and how to use it.
Set default controls to No in the property panel
You then will have to simulate the right and left movement but you'll be able to always jump.
In your case it seems to be a toggle
you don't need another variable, just a bit of math
Koopa: is overlapping flag -> Koopa: set Move to 3-Koopa.Move
if move = 1 -> 3-1 = 2
if move = 2 -> 3-2 = 1
fake8Direction.capx
Or maybe just simulate control
8DirSimulate.capx
global variable Timer System: Every ticks -> add dt to Timer local variable min local variable sec -> System: set min to floor(Timer/60) -> System: set sec to int(Timer)%60 -> Text: set Text to right("00"&min,2)&":"&right("00"&sec,2)
dt is a special word in c2 that return the time spent between two ticks. so after 60 ticks if you run at 60fps, so 1 second later, Timer will equal 1 (what a coincidence!)
also the right(string,length) function return the right part of a string, so the expression will zero fill the number.
% is the modulo operator:
0%60 = 0
20%60 = 20
60%60 = 0
80%60 = 20
value tends to cycle when you use modulo. (officially a%b gives the remainder of the euclidian division of a by b... unofficially... easy cycling)
Member since 31 Dec, 2010