Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Something like CTF
#15
Sonire Wrote:I believe it's something like this:

Code:
If Map(GetPlayerMap(MyIndex)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex)).Type = TILE_TYPE_FLAG Then
        If GetPlayerClass(MyIndex) = 0 Then
             Map(GetPlayerMap(Index)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex)).Anim = Class0Flag
        End If
        If GetPlayerClass(MyIndex) = 1 Then
             Map(GetPlayerMap(MyIndex)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex)).Anim = Class1Flag
        End If
End If

Now, where I have Class0Flag and Class1Flag, you need to count how many tiles your flag is in your tile set. So if Class 0 Flag was the 3rd tile, in the second row, Class0Flag should be replaced with the number 9.

Code:
0123456
789----
-------

sorry but i do not understnad the last code.
Code:
0123456
789
A normal tileset got 8 tiles a row so for example if the flag is on the 8th tile of the first row this wouldn't work? right.
And how does the computer knows the height and the width of each tile.
And at last where must i add his code??


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)