Graphic that stays on screen, help.
Displaying 1-8 of 8 total.
1
whitecell

Ok, so far ive got my map done, my player and thats about it. I hav fooled around with zones and a few other things just to test them out. What I have been trying to do for about 5 hours is have an image appear from the time my game starts till it ends. I can get it to appear with with a textbox but that does me no good because it causes the player to stop untill I press enter. I know this is the wrong way to do it but I just wanted to get the image in the right position and this was the only way to test it for me.


So, long story short - I need a little help to have an image on my screen that will stay there and let the player move. The image is just to show what the player looks like and eventually use it to display stats and what-not in real time.

Posted on 2006-01-27 08:30:20

Want to reply? login or register!

pthaloearth

you'll need to fist load your image up.


//in system.vc
int imageToDraw=loadImage("imagename.jpg");


Next create a function to draw the image like so:


//in system.vc
void drawOnScreen()
{
TBlitlucent(60,200,0,imageToDraw,screen);
}


finally in the first function of your map code,


//in map.vc
void onLoad()
{
hookRetrace("drawOnScreen");
//load the player and whatever else
}


and that'll draw the image to the screen every retrace.

Posted on 2006-01-27 09:29:28

Want to reply? login or register!

pthaloearth

almost forgot you will also need to load up your map in maped3 and go to: map>properties. Type onLoad into the 'startup script' box.

Posted on 2006-01-27 09:34:03

Want to reply? login or register!

whitecell

Ah, thanks alot! Been banging my head alot trying to figure it out. Thanks again!

Posted on 2006-01-27 10:23:56

Want to reply? login or register!

Technetium

Also, doesn't built-in sprite option allow graphics to be drawn that stay visible until explicitly removed?

Posted on 2006-01-28 23:26:07

Want to reply? login or register!

Overkill

Technetium: Nope.

That's what HookRetrace() is for. It allows you to do routines whenever the Retrace layer in the renderstring is hit.

Though, that would be nice if you could just bind an image to a specific layer on the screen. And any changes to the image would be shown on refresh.

Posted on 2006-01-29 11:00:39

Want to reply? login or register!

resident

I think Tech is talking about the sprite system that was shoehorned into Verge a little while ago Overkill.

If it doesn't do what he describes, what the hell is it for?

Posted on 2006-01-29 14:56:15

Want to reply? login or register!

Overkill

The sprite system doesn't work right, to my knowledge, hence why it's relatively undocumented.

Posted on 2006-01-29 19:03:12

Want to reply? login or register!


Displaying 1-8 of 8 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.