[EO 2.3] Animation Layers

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

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

Thats all :)

Problem```

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

This is an old post are you using this engine?

E.O 2.0

it works,you just have to delete your maps, or build a convertor.

Problem is in server

i know, delete your maps server side.

Thanks now works great :)

But i need to make new maps (only 3) :D

be glad its only 3 :P

Why not changing it to an autotile animation like thing ?

so choose one and it will change then automatically +selected amount

M2Anim & F2Anim not working if i click on somting and place it on the map noting happens

are you sure you changed the BltMapFringeTile sub? Which engine are you using?

how to make it work with EO3 ??

You would have to change it to make it render

i tried to change it but didn’t work with me can you help me ?

What did you try? At least show you tried then maybe people will help.

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

Can anybody post a image (tileset) example?

I tried with my tilesets but all I got was a blinking tile. Or is this script just for blinking scripts?

i think its just for flashing tiles if you want like auto tiles you could rip it from another engine

Log in to reply