![]() |
Flag system, chaning the .mask tile - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: Flag system, chaning the .mask tile (/showthread.php?tid=935) |
Flag system, chaning the .mask tile - Leighland - 17-05-2007 So basically this is the concept. Someone from team A touches a flag on the map. It turns red. Someone later comes along from team B and the flag turns green. Later on the flag is touched by someone belonging to no team, and the flag turns gray (neutral). I have the code done for this using a flag type and an alignment variable in the player type, and a TILE_TYPE_FLAG constant so that the mappers can place flags on certain maps. My problem is changing the mask tile that the flag is on when it is touched, to correspond with the team color that touched it. I have the red flag, green flag, and gray flag in the first 3 32x32 spot of the tile set, like so: ![]() So I want it to so this. When the flag is nuetral, the .mask image for the tile should be the gray flag, and when someone comes along and touches, say from the red team, it changes the .mask tile to the red flag. How can I do this? I am very bad when it comes to image work, especially with mirage so any help would be appreciated. I figured putting some code in the gameloop sub might work the best, using an if statement as such: Code: For y = 0 To MAX_MAPY My problem is choosing the right tiles. I don't understand the mapping side of the mirage source as well as I probably should... obviously. So, any help? Or perhaps a better way of doing this? - Dragoons Master - 17-05-2007 That seams to be ok but I think it would be better if you don't change the .mask stuff, becouse there may be a few problems with that. Just right before the bltmask stuff, easy to find in gameloop, add a new blit that blits this thing to the screen. Maybe a maptiletype would be easier. About the img stuff, I mean you said you don't know it, just take a look at bltplayer and try to blit yhe same way that thing is done. Good lukc, it seams to be quite fun ^^ - Leighland - 17-05-2007 Thanks, I got it working though. Minor bugs here and there but that is to be expected right :p. Works somewhat how I imagined but again not perfect. Maybe I'll throw up a tutorial for tihs after i get it all working right ... since it is kind of fun, and highly competative. - Tony - 19-05-2007 Looks easy to do. But great concept. I like it Re: Flag system, chaning the .mask tile - Coke - 16-06-2007 That would be great, mixed with a guild system, combat arena guild battles with flags would be hilariouse! |