Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Creating a .bmp and importing it
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
SwAnK




PostPosted: Tue Apr 26, 2005 11:56 pm   Post subject: Creating a .bmp and importing it

hey, could somone explain to me Pic.Draw amd how to properly use it. I want to create rolling dice im guessing you could use like a rollover to simulate rolling, which means you'd just put it in a loop somehow???

also how do u get to the part in turing help about AI??? ive looked all over for it
Sponsor
Sponsor
Sponsor
sponsor
jamonathin




PostPosted: Wed Apr 27, 2005 5:47 am   Post subject: (No subject)

Pic.Draw does exactly what it says. Draw Displays a picture. Now, there has to be a variable (int) that is already assigned to a picture. This sample code will import a picture called "mypic.bmp" and draw it at (0, 0). Now the picMerge part will merge all of the white stops of the picture in with whatever it is being drawn on. If you dont want it to merge you can simply use picCopy.
code:
var pic:int := Pic.FileNew("mypic.bmp")
Pic.Draw(pic, 0, 0, picMerge)

Not all pictures need to be from a file though, you can draw something in turing, take a picture of that, and use that instead.
code:

drawfilloval(10,10,5,5,12)
var pic:int := Pic.New ( 5, 5, 15, 15)
Pic.Draw( pic, 100, 100, picCopy)

Just look up how to do AI. It deals with a lot of if statements. Basically, you just put what you would do, into an if statement.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: