damian666 Posted April 3, 2011 Author Share Posted April 3, 2011 yeah, like i said in title, i got it almost working, btw, most code is allready there xd```' send animations 'For x1 = 0 To Map(MapNum).MaxX 'For y1 = 0 To Map(MapNum).MaxY 'If Map(MapNum).Tile(x1, y1).Type = TILE_TYPE_ANIM And Map(MapNum).Tile(x1, y1).Data1 > 0 Then 'Call SendAnimation(MapNum, Map(MapNum).Tile(x1, y1).Data1, x1, y1, 0, 0) 'End If 'Next 'Next```this is in conjunction with a tiletype i made.problem im having is, i cant find the right spot to send it from, i tried serverloop, but that just kept sending, and index clientside kept rising, so not good >.<so question is, does anybody know where the hell i could place this piece of code?ofcourse i know i have to only send when there are players on map.Any suggestions are welcome :)Dami Link to comment Share on other sites More sharing options...
23.kraft Posted April 4, 2011 Share Posted April 4, 2011 in theory, if done properly no matter where is the code (because you have a defining) "For x1 = 0 To Map (MapNum). MaxX"there is still an option to remove:'For x1 = 0 To Map (MapNum). MaxX 'For y1 = 0 To Map (MapNum). MaxYand put it in PlayerMove``` With Map (GetPlayerMap (index)). Tile (GetPlayerX (index), GetPlayerY (index)) If .Type = TILE_TYPE_ANIM And Map (GetPlayerMap (index)). Tile (GetPlayerX (index), GetPlayerY (index)). Data1> 0 Then Call SendAnimation (GetPlayerMap (index), Map (GetPlayerMap (index)). Tile (GetPlayerX (index), GetPlayerY (index)). Data1, GetPlayerX (index), GetPlayerY (index), 0, 0) End If```If your code is correct in theory it should work) Link to comment Share on other sites More sharing options...
23.kraft Posted April 4, 2011 Share Posted April 4, 2011 + For this to work you can create your procedure(you can put in modGameLogic):```Public Sub Animation(ByVal MapNum As Long)dim x1 as longdim y1 as long 'For x1 = 0 To Map(MapNum).MaxX 'For y1 = 0 To Map(MapNum).MaxY 'If Map(MapNum).Tile(x1, y1).Type = TILE_TYPE_ANIM And Map(MapNum).Tile(x1, y1).Data1 > 0 Then 'Call SendAnimation(MapNum, Map(MapNum).Tile(x1, y1).Data1, x1, y1, 0, 0) 'End If 'Next 'NextEnd Sub she can look at PlayerMoveSub PlayerMove(ByVal index As Long, ByVal Dir As Long, ByVal movement As Long, Optional ByVal sendToSelf As Boolean = False)at the very endcall Animation (MapNum)End Sub``` 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