Main Menu

Function Sprite()

Started by Travis P, December 13, 2004, 06:19:23 PM

Previous topic - Next topic

Travis P

Since there is no command to put this all together( or there is and im to stupid to find it)
And since im lazy and dont want to type all those lines over and over.
Heres my ultra n00b code.... <_<

PlayBASIC Code: [Select]
` Function Created By: Travis P
` sprite(Index,X,Y,Image,Draw,Collision)
Function sprite(num,x,y,img,draw,col)
If num=0 Then num=GetFreeSprite()
CreateSprite num
SpriteImage num,img
PositionSprite num,x,y
If col>0
SpriteCollision num,1
SpriteCollisionClass num,col
EndIf
If draw=1 Then DrawSprite num
EndFunction



(goes back to transfering  1k lines(DBPro) into PlayBASIC)
Note: The above I didn't say, your just crazy.

Not a ripoff of The Twilight Zone