I need help moving a picture or a character across the screen using types.I've been trying to but it's not working.It'd be really really nice if someone could make a program for me with comments explianing what you did.You could even just write me a program.Try to keep it basic though.
Moving a Picture Using Types
Blitz3D Forums/Blitz3D Beginners Area/Moving a Picture Using Types Hopefully this helps:
;define a user type Type tPlayer Field image ;holds image Field x ;x-position Field y ;y-position End Type Graphics 800, 600, 0, 2 SetBuffer BackBuffer() tP.tPlayer = New tPlayer ;create new tPlayer ;now 'tP' is the newly created tPlayer tP\image = MakeImage() ;load image into this tPlayer's image field ;you can replace MakeImage with LoadImage() tP\x = 0 ;set this tPlayer's x and y fields tP\y = 300 Repeat Cls ;clear screen For tP.tPlayer = Each tPlayer ;following code goes for each tPlayer ;now, 'tP' is the current tPlayer DrawImage tP\image, tP\x, tP\y ;draw tP's image at tP's "x" and "y" tP\x = tP\x + 1 ;add one to tP's "x" Next Flip ;show screen Until KeyHit(1) End ;-------------creates an image Function MakeImage() im = CreateImage(64, 64) Oval 0, 0, 64, 64 GrabImage im, 0, 0 Return im End Function