Loadimage into Type

BlitzMax Forums/BlitzMax Beginners Area/Loadimage into Type

767pilot(Posted 2006) [#1]
Any idea how to load the manimage into the player.image field please?



Type man

Field x,y,action,image

End Type

Global player:man

Global manimage:TImage=LoadImage("mainchr.bmp")

player=New man
player.x=400
player.y=300
player.image=manimage



thanks
Graham


tonyg(Posted 2006) [#2]
Type man

Field x,y,action,image:TImage

End Type
Graphics 640,480
Global player:man

Global manimage:TImage=LoadImage("mainchr.bmp")

player=New man
player.x=400
player.y=300
player.image=manimage
DrawImage player.image,player.x,player.y
Flip
WaitKey()

Graphics mode was missing.
I also changed image field to a TImage.


767pilot(Posted 2006) [#3]
Great, thanks for your help T