Blitz (116/119)

From:David McMinn
Date:27 Jun 2001 at 12:21:26
Subject:Re: Animation Question

Hi Jason

> How would I go about animating a character in Blitz? In AMOS I used to use AMAL
> but since using Blitz I have yet to find an effective method. I have tried putting all of
> the frames that I want to animate in data statements and reading them into a
> variable that is used to select the image. Is this the best way to tackle the
> problem?

The general method I guess is correct (repeating loops of shape numbers),
although I think it would be quicker like this:

#START_FRAME_LEFT = 1
#END_FRAME_LEFT = 3
#START_FRAME_RIGHT = 4
#END_FRAME_RIGHT = 6

If JoystickLeft(1)
startframe = #START_FRAME_LEFT
playerframe = #START_FRAME_LEFT-1
endframe = #END_FRAME_LEFT
EndIf

If JoystickRight
startframe = #START_FRAME_RIGHT
playerframe = #START_FRAME_RIGHT-1
endframe = #END_FRAME_RIGHT
EndIf

playerframe+1
If playerframe>endframe Then playerframe=startframe
QBlit 0,playerframe,100,100



|) /\ \/ ][ |) |\/| c |\/| ][ |\| |\| | dave@blitz-2000.co.uk
http://members.nbci.com/david_mcminn | ICQ=16827694
Porn Sci-Fi: 'Star Trek: Deep Throat 9'

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie