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

Username:   Password: 
 RegisterRegister   
 A few things I need help with...
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Rinaldi363




PostPosted: Fri Oct 14, 2005 5:21 pm   Post subject: A few things I need help with...

Ok I'm making an RPG, and I know a lot of the basics about armour and health and attacks... but theres a few things I need help with.

1. I want a box (,) and I want it to stay there 24/7. So like it never leaves or disapears, this box is used for text, so also I would like to know how to make text appear in it, and as mroe text comes, the old text scrolls up and disapears. (If you need a better explaination jsut ask me Smile)

2. I figured out how to load pictures, but how do you make them move? I mean like, I can make them move but it drags along the background... someone suggested making the background the same colour as the background as the picture, but what if I want a multicoloured back ground? I want pictures to be ables to move nice and smooth without colours being messed up.

3. How do I make it so if you press a button it will do something? Like jsut making a button in general. Persay I wanted an inventory and when you press it with your mouse it will equiped a certain weapon.

If you could help me with this that would be awesome. I'll probably have mroe questions and ask you guys after but this is great for now.

Thanks everyone!
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Fri Oct 14, 2005 6:16 pm   Post subject: (No subject)

1) Textboxes. Turing's GUI can do this.
2) clear the screen, a la cls. Redraw the background. Redraw everything.
3) Turing's GUI has buttons as well.

You can make your own GUI as well, which you may want to consider. You'd need to know about mouse input and keyboard input at the very least. Records would be good. Classes would be better. Inheritence and implementation would be better.
Rinaldi363




PostPosted: Fri Oct 14, 2005 7:08 pm   Post subject: (No subject)

Umm a long time ago I accidently deleted some "WidgetModule.t" code... can anyone send it to me or post it... it says I need it for it to work, thanks.

And umm..

The text box I jsut wanted it to be something like...
code:
drawbox (0, 0, 639, 125, black)

So tis like inside the game, and it stays there the whole time even when I clear screen, any ideas?
Rinaldi363




PostPosted: Fri Oct 14, 2005 7:14 pm   Post subject: (No subject)

Another thing about the picture moving around, I notice lot of flashes happen as its doing it, for example:
code:
loop
drawfillbox (0,0,400,500,purple)
drawfillbox (0,0,100,500,green)
Pic.ScreenLoad ("Defend Head.jpg", 50, 175, picCopy)
delay (100)
cls
drawfillbox (0,0,400,500,purple)
drawfillbox (0,0,100,500,green)
Pic.ScreenLoad ("Defend Head.jpg", 55, 180, picCopy)
delay (100)
cls
drawfillbox (0,0,400,500,purple)
drawfillbox (0,0,100,500,green)
Pic.ScreenLoad ("Defend Head.jpg", 60, 185, picCopy)
delay (100)
cls
drawfillbox (0,0,400,500,purple)
drawfillbox (0,0,100,500,green)
Pic.ScreenLoad ("Defend Head.jpg", 65, 190, picCopy)
delay (100)
cls
drawfillbox (0,0,400,500,purple)
drawfillbox (0,0,100,500,green)
Pic.ScreenLoad ("Defend Head.jpg", 70, 195, picCopy)
end loop


Also, how would I eliminate any colour around an object in MS Paint? If I can't is there a downloadable program I can?
[Gandalf]




PostPosted: Fri Oct 14, 2005 7:48 pm   Post subject: (No subject)

Just fill it in...

Look up setscreen("offscreenonly") and View.Update. The first goes at the very beginning of you progrma, and the other at then end of your animation loop when you are drawing everything.
Cervantes




PostPosted: Fri Oct 14, 2005 8:00 pm   Post subject: (No subject)

If you clear the screen, nothing will remain. Just a sheet of bgcolour.

Doing drawbox will not update with text or allow for input of text.

You can use Pic.SetTransparentColour(), I believe.
codemage




PostPosted: Mon Oct 17, 2005 12:30 pm   Post subject: (No subject)

If you really want to avoid using the GUI component, you can use 'mousewhere' to see if you've clicked on a certain box / button.

It's not nearly as nice, programming-wise, but you may find it easier.
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  [ 7 Posts ]
Jump to:   


Style:  
Search: