Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO 2.3] Animation Layers


blkcrow
 Share

Recommended Posts

Animation layers for EO 2.3

**Server Side**

in modEnumeration replace this

```

Public Enum MapLayer

Ground = 1

Mask

Mask2

Fringe

Fringe2

' Make sure Layer_Count is below everything else

Layer_Count

End Enum

```

with this

```

Public Enum MapLayer

Ground = 1

GroundAnimation

Mask

MaskAnimation

Mask2

Mask2Animation

Fringe

FringeAnimation

Fringe2

Fringe2Animation

' Make sure Layer_Count is below everything else

Layer_Count

End Enum

```

Thats all Server side

**Client Side**

in modEnumeration replace this

```

Public Enum MapLayer

Ground = 1

Mask

Mask2

Fringe

Fringe2

' Make sure Layer_Count is below everything else

Layer_Count

End Enum

```

with this

```

Public Enum MapLayer

Ground = 1

GroundAnimation

Mask

MaskAnimation

Mask2

Mask2Animation

Fringe

FringeAnimation

Fringe2

Fringe2Animation

' Make sure Layer_Count is below everything else

Layer_Count

End Enum

```

somewhere in modGlobals add

```

Public LayerAnim As Boolean

```

in modGameLogic in sub GameLoop find

```

Dim tmr10000 As Long

```

below it add

```

Dim LayerAnimTimer As Long

```

in the same sub find

```

' *********************'

' ** Render Graphics **'

' *********************'

```

above it add

```

If LayerAnimTimer < Tick Then

LayerAnim = Not LayerAnim

LayerAnimTimer = Tick + 1000 ' edit this value to change The speed witch the animation is being played'

End If

```

in modDirectDraw7 in sub BltMapTile find this

```

' render'

Call Engine_BltFast(ConvertMapX(x * PIC_X), ConvertMapY(y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

```

and replace it with this

```

If i Mod 2 = 0 Then

If LayerAnim Then

' render'

Call Engine_BltFast(ConvertMapX(x * PIC_X), ConvertMapY(y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

End If

Else

Call Engine_BltFast(ConvertMapX(x * PIC_X), ConvertMapY(y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

End If

```

in the same module in sub BltMapFringeTile find this

```

' render'

Call Engine_BltFast(ConvertMapX(x * PIC_X), ConvertMapY(y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

```

and replace it with this

```

If i Mod 2 = 0 Then

If LayerAnim Then

' render'

Call Engine_BltFast(ConvertMapX(x * PIC_X), ConvertMapY(y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

End If

Else

Call Engine_BltFast(ConvertMapX(x * PIC_X), ConvertMapY(y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

End If

```

now open frmEditor_Map and add new option buttons as shown in the pic and name the optLayer

![](http://www.freemmorpgmaker.com/files/imagehost/pics/4def6f7a7f29f74ba96ba46ba5e6b533.png)

make sure their index is in order (e.g. Ground = 1, GAnim =2, Mask = 3 etc.)

Thats all ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)
Link to comment
Share on other sites

  • 7 months later...
Problem```

ResourceCache(mapNum).ResourceData(Resource_Count).cur_health = Resource(Map(mapNum).Tile(x, y).Data1).health

```not working ![:(](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/sad.png)
Link to comment
Share on other sites

Thanks now works great ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)

But i need to make new maps (only 3) ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png)
Link to comment
Share on other sites

  • 3 months later...
  • 1 year later...
this code

```
        If GetTickCount Mod 1000 < 500 Then
            ' skip tile?
            If (.Layer(MapLayer.MaskAnim).Tileset > 0 And .Layer(MapLayer.MaskAnim).Tileset <= NumTileSets) And (.Layer(MapLayer.MaskAnim).x > 0 Or .Layer(MapLayer.MaskAnim).y > 0) Then
              If Autotile(x, y).Layer(i).renderState = RENDER_STATE_NORMAL Then
                    ' Draw normally
                    RenderTexture Tex_Tileset(.Layer(i).Tileset), ConvertMapX(x * PIC_X), ConvertMapY(y * PIC_Y), .Layer(i).x * 32, .Layer(i).y * 32, 32, 32, 32, 32, -1
                ElseIf Autotile(x, y).Layer(i).renderState = RENDER_STATE_AUTOTILE Then
                    ' Draw autotiles
                    DrawAutoTile i, ConvertMapX(x * PIC_X), ConvertMapY(y * PIC_Y), 1, x, y
                    DrawAutoTile i, ConvertMapX((x * PIC_X) + 16), ConvertMapY(y * PIC_Y), 2, x, y
                    DrawAutoTile i, ConvertMapX(x * PIC_X), ConvertMapY((y * PIC_Y) + 16), 3, x, y
                    DrawAutoTile i, ConvertMapX((x * PIC_X) + 16), ConvertMapY((y * PIC_Y) + 16), 4, x, y
                End If
            End If

```
Link to comment
Share on other sites

  • 2 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...