![]() |
Change Sprite Attribute - Printable Version +- Mirage Engine (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: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Change Sprite Attribute (/showthread.php?tid=41) |
Change Sprite Attribute - Tutorial Bot - 01-06-2006 Author: funkynut Difficulty: 1/5 This will make a simple sprite changing attribute. :: SERVER & CLIENT SIDE :: First, in modtypes add: (BE SURE TO DO THIS BOTH CLIENT AND SERVER SIDE!) Code: Public Const TILE_TYPE_SPRITE = 9 :: SERVER SIDE :: In modGameLogic, find: Code: Call SendDataToMap(GetPlayerMap(Index), "MAPKEY" & SEP_CHAR & x & SEP_CHAR & y & SEP_CHAR & 1 & SEP_CHAR & END_CHAR) Code: 'Check for sprite tile and then change the sprite :: CLIENT SIDE :: Find: Code: If .Type = TILE_TYPE_KEYOPEN Then Call DrawText(TexthDC, x * PIC_X + 8, y * PIC_Y + 8, "O", QBColor(white)) Beneath it, add: Code: If .Type = TILE_TYPE_SPRITE Then Call DrawText(TexthDC, x * PIC_X + 8, y * PIC_Y + 8, "S", QBColor(BrightBlue)) Code: If frmMirage.optKeyOpen.Value = True Then Code: If frmMirage.optsprite.Value = True Then Now the final bit; adding radio button to the map editor. In the mapeditor, add a radio button and name it optsprite. Double click it and add: Code: frmsetsprite.Show vbModal Now make a new form called frmsetsprite. Make two picture boxes called:
Make two command buttons called
Make a scrollbar called scrlsprites. Make a timer called tmrsprite. Make a label called lblspritenum. Okay, now add this code in your new form: Code: Private Sub cmdcancel_Click() |