123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|557|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> RotateZoomer?

Thu, 20 Dec 2007, 16:54
Hotshot
What I have done easy way of doing scaling sprites where the snow board rotate it round and also come toward ya and back like rotatezoomer if u know what i mean.

so What I am doing wrong?

Fri, 21 Dec 2007, 12:19
Hotshot
do anyone know what I am trying to do?
Fri, 21 Dec 2007, 18:24
Forklift_Fred
First of all, you need to change your If...Then section. Either use a second variable set before the loop:



or simply combine the If...Then:



This is because...

DIR=+DIR is the same as DIR=0+DIR. If DIR is negative it will stay negative (0+-0.6 = 0-0.6 = -0.6), if it is positive it will stay positive (0+0.6 = 0.6) So in fact, DIR=+DIR is the same as DIR=DIR

However...

DIR=-DIR is the same as DIR=0-DIR. If DIR is negative it will become positive (0--0.6 = 0+0.6 = 0.6), if it is positive it will become negative (0-+0.6 = 0-0.6 = -0.6)

Secondly, because you are working with floating point numbers and not whole numbers (integers) you need to declare both DIR and SHIFT with a # (which confuses me because I always thought that marked it as an integer and % marked it as floating point!?) If you are lazy (like me!) then you can usually get away with just using the # the first time. In your example that would be DIR#=0.6 and MoveEntity PLANE,0,SHIFT#,0 (though I would put the SHIFT#=SHIFT+DIR at the start of the loop, then the If...Then and then MoveEntity last otherwise the plane will go above 20 and below 0 by one step each time)

The next problem is that the plane seems to dissappear and not reappear, even though the SHIFT value on screen goes back to zero...

After a bit of thought, I realised that SHIFT is always positive so the plane is always moving up! The only thing that changes is the amount that it moves up by.

You can either use MoveEntity PLANE,0,DIR,0 and use SHIFT to count the steps, or PositionEntity PLANE,0,SHIFT,0

I hope that all makes sense

-=-=-
Come rain or shine...
Fri, 21 Dec 2007, 19:56
Hotshot
thank you Forklift_Fred for good well explain
Now I got RotateZoomer up and running
Sat, 22 Dec 2007, 18:27
Forklift_Fred
Glad to be able to help