![]() |
Adding Scripted 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: Adding Scripted Tile (/showthread.php?tid=2482) |
Adding Scripted Tile - Nean - 09-01-2009 I was working on this (everything will be hardcoded of course), and I ran into a small snag. I need this: Code: If Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index)).Type = TILE_TYPE_SCRIPTED Then To run off of a select case, any idea how I would do this? I seriously doubt I'll be successful in this, but I'd at least like to get this part figured out... :\ Re: Adding Scripted Tile - Nean - 10-01-2009 Okay, with a little help from GIAKEN, I managed to get some stuff done. Now I don't have any errors... Nothing just works... xD Heres what I have: Client Code: Private Sub cmdCancel_Click() Code: Public ScriptNum As Long Code: If frmMirage.optscripted.Value Then Code: Case TILE_TYPE_SCRIPTED Code: frmScript.Show vbModal Code: Public Const TILE_TYPE_SCRIPTED As Byte = 7 SERVER Code: If Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index)).Type = TILE_TYPE_SCRIPTED Then Code: Public Const TILE_TYPE_SCRIPTED As Byte = Code: Sub Scripted(ByVal scriptnum As Long) Can anyone see anything wrong, that needs to be changed? I'd be eternally greatful if someone can point out the error. :\ also sorry for the messy code, I'll clean it up in a bit... Re: Adding Scripted Tile - Jacob - 10-01-2009 Code: Sub Scripted(ByVal scriptnum As Long) You should pass the Index into the sub. Right now your index will always be 0. Re: Adding Scripted Tile - Nean - 10-01-2009 I have: Code: If Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index)).Type = TILE_TYPE_SCRIPTED Then And: Code: Sub Scripted(ByVal scriptnum As Long, index As Long) Still doesn't work. :\ Re: Adding Scripted Tile - Nean - 10-01-2009 Nevermind, I got this done. The problem was where I was placing the check. xD |