Skip to main content
gamedev.net
🔒 Locked

removing graphics

Started by One-Winged Angel 7 replies 150+ views
Original Post
One-Winged Angel
One-Winged Angel
I have been surching all over the net for something to help me remove a graphic, and I can''t find anything. What I am mainly trying to do is take of a npc in a 2d rpg when I change maps. And i am trying to remove a text box and the text in it for people talking. I would gladly appericate any help. Thank you.
NickW
NickW
Consider using layers in your drawing code...

For Example:
  

void DrawFrame()
{
DrawTiles();
DrawNPCs();
DrawDialogText();
}


You may end up drawing over some stuff, but that''s no big deal
One-Winged Angel
One-Winged Angel
I think that would work for the message boxes, but I for the npc sprite to go away when I switch maps and not be on the same place once I load and draw it. So if anyone knows how to do that, I would appericate there help.
One-Winged Angel
One-Winged Angel
would taking off the grphic have anything to do with ~whatever?
I was just looking at the code and wasn''t sure.
MarkyD
MarkyD
Sorry to stray from the topic here, but how did a one-winged angel learn to program?

There''s no substitute for failure.
One-Winged Angel
One-Winged Angel
I learned from just going over a few tutorials, and I mainly said that last statment to bump the thread back to the top. I''m almost positive it has nothing to do with taking off the graphic. Also, does anyone know how to pause the code until a button is pressed, like displayng a message box, and wait till the usere hits enter to goto the next line.
Midnight Coder
Midnight Coder
I don''t really understand. Your game loop should draw the necessary NPCs, but then during a map change NPC data would be changed so NPCs simply wouldn''t be drawn anymore in that spot. If you want to take off a graphic in a frame, just don''t draw it. Could you be more specific about how exactly your game handles drawing and stuff?
One-Winged Angel
One-Winged Angel
For midnight coder, I think that is what is supposed to happen, and I had relized this a little before your post, and havent got to testing it much. For the other guy I see what you mean and I will look into that. Thanks guys for all your help.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.