Justn Posted September 10, 2012 Author Share Posted September 10, 2012 Ok this is a simple roof system. Basically it adds a new layer, the roof. When I player steps on the new threshold tile attribute the roof layer is invisible.. This was ripped from Alatar’s house system so all credits to him..**Server-****modConstants**Add this to the bottom of your tile constants:``` Public Const TILE_TYPE_THRESHOLD As Byte = 15 ```**modEnumerations**Find : **Public Enum MapLayer** and add this before the layer count:```Roof```**Client-****modEnumerations**Find : **Public Enum MapLayer** and add this before the layer count:```Roof```**modDirectDraw7**Find: **' blit out upper tiles**Under: Call **BltMapFringeTile(X, Y)** add this:``` Call BltRoof(X, Y) ```Next add this to the bottom of **modDirectDraw7**:``` Public Sub BltRoof(ByVal X As Long, ByVal Y As Long) Dim rec As DxVBLib.RECT Dim i As Long With Map.Tile(X, Y) i = MapLayer.Roof If .Layer(i).tileset > 0 Then rec.Top = .Layer(i).Y * PIC_Y rec.Bottom = rec.Top + PIC_Y rec.Left = .Layer(i).X * PIC_X rec.Right = rec.Left + PIC_X If Not Threshold = True Then Call Engine_BltFast(ConvertMapX(X * PIC_X), ConvertMapY(Y * PIC_Y), DDS_Tileset(.Layer(i).tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) End If End If End WithEnd Sub```**modText**Find:```Case TILE_TYPE_SLIDE DrawText TexthDC, tX, tY, "S", QBColor(BrightCyan)```Under it add this:``` Case TILE_TYPE_THRESHOLD DrawText TexthDC, tX, tY, "T", QBColor(BrightCyan)```**modGameLogic**Find this:``` ' Check to see if the map tile is blocked or not If Map.Tile(X, Y).Type = TILE_TYPE_BLOCKED Then CheckDirection = True Exit Function End If ```**Above** it add this:``` If Map.Tile(X, Y).Type = TILE_TYPE_THRESHOLD Then Threshold = Not Threshold Exit Function End If ```**modConstants**Add this to the bottom of your tile constants:``` Public Const TILE_TYPE_THRESHOLD As Byte = 15 ```**modGlobals**Add this to the bottom:``` Public Threshold As Boolean ```**modGameEditors**Find this:``` ' slide If frmEditor_Map.optSlide.Value Then .Type = TILE_TYPE_SLIDE .Data1 = MapEditorSlideDir .Data2 = 0 .Data3 = 0 End If ```**Below** it add this:``` ' Threshold If frmEditor_Map.optThreshold.Value Then .Type = TILE_TYPE_THRESHOLD .Data1 = 0 .Data2 = 0 .Data3 = 0 End If ```**Form Work-****frmEditor_Map**First add this code to the bottom of **frmEditor_Map**:``` Private Sub cmdRoof_Click()Threshold = Not ThresholdEnd SubPrivate Sub optThreshold_Click()' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler ClearAttributeDialogue picAttributes.Visible = False ' Error handler Exit Suberrorhandler: HandleError "optThreshold_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub```1.Now in the frame: **fraLayers.** Copy and paste one of the map layer radio buttons (make sure to paste inside of fraLayers) and set the index to 6 (or the next number if u have more layers).2.Next create a **command button** in **fraLayers** and name it: **cmdRoof**Set the caption to: **Roof**3.Find the **map attributes** and create a new radio button on **fraAttribs**. Name it: **optThreshold**And that should be it.. Its pretty basic and the only issue I can think of is one found here:[my one issue](http://www.touchofdeathforums.com/community/index.php?/topic/128934-function-for-getting-the-players-last-position/)If anyone has a solution for that it would be perfect but still works well as is…. Link to comment Share on other sites More sharing options...
lollicat Posted September 10, 2012 Share Posted September 10, 2012 I actually really like the idea. I'll have to try it out. Link to comment Share on other sites More sharing options...
tslusny Posted September 10, 2012 Share Posted September 10, 2012 Of course this is from house system right? ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) But gj i was always too lazy to rip it ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
Murdoc Posted September 10, 2012 Share Posted September 10, 2012 This is great, thanks for sharing. Link to comment Share on other sites More sharing options...
Whackeddie99 Posted September 10, 2012 Share Posted September 10, 2012 Damn, I programmed one from scratch into Cinder. Oh well, I guess you can't make something unique anymore these days. Link to comment Share on other sites More sharing options...
lollicat Posted September 10, 2012 Share Posted September 10, 2012 Not sure if this is an error or me being stupid. In the client,"Compile error: Method or data member not found"Highlights ".value" in If frmEditor_Map.optThreshold.value Then within modGameEditors Link to comment Share on other sites More sharing options...
Guest Posted September 10, 2012 Share Posted September 10, 2012 > Damn, I programmed one from scratch into Cinder. Oh well, I guess you can't make something unique anymore these days.Believe it or not there are about 9000 other games that also have the same system.Also I think that instead of completely making the layer invisible, putting its alpha down would look much better. Link to comment Share on other sites More sharing options...
Whackeddie99 Posted September 10, 2012 Share Posted September 10, 2012 > Believe it or not there are about 9000 other games that also have the same system.When i said unique, I mean't unique to eclipse.> Also I think that instead of completely making the layer invisible, putting its alpha down would look much better.*Sigh* exactly what I did. You guys are killin me Link to comment Share on other sites More sharing options...
Justn Posted September 10, 2012 Author Share Posted September 10, 2012 What do u mean by putting the alpha down? Sorry I'm.slow Link to comment Share on other sites More sharing options...
Guest Posted September 10, 2012 Share Posted September 10, 2012 Making it transparent. Link to comment Share on other sites More sharing options...
Justn Posted September 10, 2012 Author Share Posted September 10, 2012 Oh.. but this was intended for dx7 so I take it thats not possible :/ Link to comment Share on other sites More sharing options...
hisherwin Posted September 11, 2012 Share Posted September 11, 2012 i suggest to make 2 attribute for roof system , so there will be no issue , AnonMica did 2 Attribute 1 attribute is to remove the roof layer and the second is to make back what it really looks like , And we also add a saveoptions system on the roof system , So when they are inside the house and log out , the roof will be on what it looks like before you log out..sorry for my english Link to comment Share on other sites More sharing options...
Justn Posted September 11, 2012 Author Share Posted September 11, 2012 Yea that's what I was thinking about doing just seems like a waste of tile space though.. might just do that tonight :/ wish there was a better way Link to comment Share on other sites More sharing options...
hisherwin Posted September 11, 2012 Share Posted September 11, 2012 Actually that was a better way ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) Link to comment Share on other sites More sharing options...
Zetasis Posted September 11, 2012 Share Posted September 11, 2012 Ignore this I'm retarded. ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
Stein Posted September 11, 2012 Share Posted September 11, 2012 > Yea that's what I was thinking about doing just seems like a waste of tile space though.. might just do that tonight :/ wish there was a better wayMake a single tiletype and just alternate between the two states of visibility as you move over it. Link to comment Share on other sites More sharing options...
Justn Posted September 11, 2012 Author Share Posted September 11, 2012 > Make a single tiletype and just alternate between the two states of visibility as you move over it.That's what it currently does though? Link to comment Share on other sites More sharing options...
Kemerd Posted September 12, 2012 Share Posted September 12, 2012 It makes a layer over other layers, that when you step on a certian tile, it makes it look like you stepped inside the house, or makes that tile disappear. Link to comment Share on other sites More sharing options...
Justn Posted September 12, 2012 Author Share Posted September 12, 2012 > It makes a layer over other layers, that when you step on a certian tile, it makes it look like you stepped inside the house, or makes that tile disappear.I'm confused are u asking a question? ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) Link to comment Share on other sites More sharing options...
Stein Posted September 12, 2012 Share Posted September 12, 2012 > That's what it currently does though?Then what's the problem? I'd reckon that works just fine. Adding another tiletype would just be a waste. Link to comment Share on other sites More sharing options...
Justn Posted September 12, 2012 Author Share Posted September 12, 2012 Yea i know having another tile type is a waste thats just how it is in sherwins project…I know its not a huge deal but with the way it is now u can step on the tile type turn back around and walk out of the house and since u didnt step on tile a second time the roof layer is still gone yet ur outside or if u did it the other way ur in the house with the roof on.. just alittle unrealistic ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) Link to comment Share on other sites More sharing options...
Stein Posted September 12, 2012 Share Posted September 12, 2012 Could always set up a directional parameter for it. Say, if you walk OFF OF it facing direction x it switches off, and direction y switches it on. Link to comment Share on other sites More sharing options...
Justn Posted September 12, 2012 Author Share Posted September 12, 2012 Ah yea that's what I was trying to do basically but ur way seems much easier ill try it Link to comment Share on other sites More sharing options...
Ganjika Posted September 13, 2012 Share Posted September 13, 2012 Are there any screenshots of this? - That would be epic. =] Link to comment Share on other sites More sharing options...
PVJsquad Posted September 13, 2012 Share Posted September 13, 2012 must delete all maps ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now