Colemann Posted November 21, 2011 Share Posted November 21, 2011 Error Compiling : Abigious name , Private Sub scrlProjectileDamage_Change() ??? Link to comment Share on other sites More sharing options...
mrmiguu Posted November 22, 2011 Share Posted November 22, 2011 @Colemann:> Error Compiling : Abigious name , Private Sub scrlProjectileDamage_Change() ???Ambigious name implies that the same submodule already exists within your source. Two of the same, my friend, two of the same. Link to comment Share on other sites More sharing options...
evilbunnie Posted November 22, 2011 Author Share Posted November 22, 2011 @Alexander:> Why do you have such a high max-range for the speed scrollbar? Anything past 50 is choppy because you have the arrows traveling on a tile-by-tile movement system. Why didn't you use an offset system that makes slower moving arrows actually appear to move slow instead of tile-by-tile?> > ::EDIT::> For the record, I was only testing this out on the precompiled client and server you posted as _Projectiles.zip_I'm pretty sure it is moving along on it's on course, it's not moving forward 32pixels everytime.. However I made this a long time ago, and if I didn't then I have no idea what state of mind I was in then.Edit, I remember I did it tile by tile because I was too lazy to do pixel based collision detection. Sorry sir. Link to comment Share on other sites More sharing options...
mrmiguu Posted November 23, 2011 Share Posted November 23, 2011 @Captain:> Edit, I remember I did it tile by tile because I was too lazy to do pixel based collision detection. Sorry sir.Pixel collision wouldn't have to even be done. You would just render the sprite to animate in a pixel-by-pixel fashion. Pixel movement, however, would require pixel-by-pixel collision checking. That's the same thing as tile-by-tile checking, except you check every one pixel(s) as opposed to ever 32 pixels. Link to comment Share on other sites More sharing options...
cheesymilk Posted November 24, 2011 Share Posted November 24, 2011 First of all thanks for the great Tut, but when I compile I get the following error:Compile error:Method or data member not foundit highlights the first .Frame4 within ItemEditorInitWhat did I do wrong? Link to comment Share on other sites More sharing options...
mrmiguu Posted November 24, 2011 Share Posted November 24, 2011 @cheesymilk:> First of all thanks for the great Tut, but when I compile I get the following error:> > Compile error:> > Method or data member not found> > it highlights the first .Frame4 within ItemEditorInit> > What did I do wrong?You installed it incorrectly.Try again **. u .** Link to comment Share on other sites More sharing options...
Lasimo Posted November 25, 2011 Share Posted November 25, 2011 Can't find Sub Main anywhere, checked all over client folder. Link to comment Share on other sites More sharing options...
evilbunnie Posted November 25, 2011 Author Share Posted November 25, 2011 @Lasimo:> Can't find Sub Main anywhere, checked all over client folder.You need VB6. Link to comment Share on other sites More sharing options...
Lasimo Posted November 26, 2011 Share Posted November 26, 2011 I already have VB6 and did the first step with the modConstants file and whatnot, but I still cant find Sub Main. I'm probably just navigating with it wrong or something, but still, can't find it. Link to comment Share on other sites More sharing options...
evilbunnie Posted November 26, 2011 Author Share Posted November 26, 2011 @Lasimo:> I already have VB6 and did the first step with the modConstants file and whatnot, but I still cant find Sub Main. I'm probably just navigating with it wrong or something, but still, can't find it.Press Control+F and then "Current Project" and search. Link to comment Share on other sites More sharing options...
mrmiguu Posted November 26, 2011 Share Posted November 26, 2011 @Lasimo:> Can't find Sub Main anywhere, checked all over client folder.![](http://i2.photobucket.com/albums/y23/Alexanderthegreat91/Cant-tell-if-troll-or-just-stupid.jpg) Link to comment Share on other sites More sharing options...
Lasimo Posted November 26, 2011 Share Posted November 26, 2011 I expected as much when I decided to ask the forum.90% of people on this forum are dicks anyway. Link to comment Share on other sites More sharing options...
evilbunnie Posted November 26, 2011 Author Share Posted November 26, 2011 @Lasimo:> I expected as much when I decided to ask the forum.> 90% of people on this forum are dicks anyway.I just helped you, just ignore dem nigguhz. .. Link to comment Share on other sites More sharing options...
Lasimo Posted November 26, 2011 Share Posted November 26, 2011 @Captain:> I just helped you, just ignore dem nigguhz. ..Thanks btw, that helped alot. Link to comment Share on other sites More sharing options...
MeteorRain Posted November 27, 2011 Share Posted November 27, 2011 When I addedProjecTile as ProjectileRec it gave me an error starting with user-type definition or something. When removing it, it gave meMethod or Data member not found.And highlights .ProjecTile in sub checkattack. I'm 100% sure nothing is wrong, I did exactly as it told me to in tutorial.Anybody help? Link to comment Share on other sites More sharing options...
cheesymilk Posted November 29, 2011 Share Posted November 29, 2011 Me again, just got it so it will compile, but I also have alatar's quest mod.When I have a weapon with pic 1 selected in the projectile box, then press control the edit quest box pops up. I've been looking but can't find the conflict.Any ideas? Link to comment Share on other sites More sharing options...
zelch Posted December 1, 2011 Share Posted December 1, 2011 Where's Sub Main?Edit: Never mind, I found it Link to comment Share on other sites More sharing options...
zelch Posted December 1, 2011 Share Posted December 1, 2011 I can't get this to work for some reason. Whenever I go into the game it's the exact same as before I did all this, the editor didn't change at all. Link to comment Share on other sites More sharing options...
evilbunnie Posted December 1, 2011 Author Share Posted December 1, 2011 @zelch:> I can't get this to work for some reason. Whenever I go into the game it's the exact same as before I did all this, the editor didn't change at all.Did you compile? Link to comment Share on other sites More sharing options...
zelch Posted December 1, 2011 Share Posted December 1, 2011 I think so, but when I went to test them earlier in vb6, it would take me to the login screen and i would log in and it would give me a subscript out of range thing Link to comment Share on other sites More sharing options...
Domino_ Posted December 1, 2011 Share Posted December 1, 2011 Tested and found that there is no check if weapon is sword or bow…Just hes taking all Weapon types, yes?p.s. ohh need to fix it myself.. Link to comment Share on other sites More sharing options...
therehere3 Posted December 4, 2011 Share Posted December 4, 2011 ummm idk if this is right buuut i used VB 2008\. and i didnt even have a "Sub Main" but i had a Modconstants Link to comment Share on other sites More sharing options...
DrNova Posted December 4, 2011 Share Posted December 4, 2011 You can ONLY use VB6 Link to comment Share on other sites More sharing options...
erkro1 Posted December 4, 2011 Share Posted December 4, 2011 Small fix for this awesome tutorial to make projectiles be stopped by directional blocking and Resource blocks.**Server side**Replace **HandleProjectile** with this:```Public Sub HandleProjecTile(ByVal Index As Long, ByVal PlayerProjectile As Long)Dim x As Long, y As Long, i As Long ' check for subscript out of range If Index < 1 Or Index > MAX_PLAYERS Or PlayerProjectile < 1 Or PlayerProjectile > MAX_PLAYER_PROJECTILES Then Exit Sub ' check to see if it's time to move the Projectile If GetTickCount > TempPlayer(Index).ProjecTile(PlayerProjectile).TravelTime Then With TempPlayer(Index).ProjecTile(PlayerProjectile) ' set next travel time and the current position and then set the actual direction based on RMXP arrow tiles. Select Case .Direction ' down Case DIR_DOWN If isDirBlocked(Map(GetPlayerMap(Index)).Tile(TempPlayer(Index).ProjecTile(PlayerProjectile).X, TempPlayer(Index).ProjecTile(PlayerProjectile).Y).DirBlock, DIR_DOWN - 1) Then ClearProjectile Index, PlayerProjectile Exit Sub End If .y = .y + 1 ' check if they reached maxrange If .y = (GetPlayerY(Index) + .Range) + 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub ' up Case DIR_UP If isDirBlocked(Map(GetPlayerMap(Index)).Tile(TempPlayer(Index).ProjecTile(PlayerProjectile).X, TempPlayer(Index).ProjecTile(PlayerProjectile).Y).DirBlock, DIR_UP + 1) Then ClearProjectile Index, PlayerProjectile Exit Sub End If .y = .y - 1 ' check if they reached maxrange If .y = (GetPlayerY(Index) - .Range) - 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub ' right Case DIR_RIGHT If isDirBlocked(Map(GetPlayerMap(Index)).Tile(TempPlayer(Index).ProjecTile(PlayerProjectile).X, TempPlayer(Index).ProjecTile(PlayerProjectile).Y).DirBlock, DIR_RIGHT + 1) Then ClearProjectile Index, PlayerProjectile Exit Sub End If .x = .x + 1 ' check if they reached max range If .x = (GetPlayerX(Index) + .Range) + 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub ' left Case DIR_LEFT If isDirBlocked(Map(GetPlayerMap(Index)).Tile(TempPlayer(Index).ProjecTile(PlayerProjectile).X, TempPlayer(Index).ProjecTile(PlayerProjectile).Y).DirBlock, DIR_LEFT + 1) Then ClearProjectile Index, PlayerProjectile Exit Sub End If .x = .x - 1 ' check if they reached maxrange If .x = (GetPlayerX(Index) - .Range) - 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub End Select .TravelTime = GetTickCount + .Speed End With End If x = TempPlayer(Index).ProjecTile(PlayerProjectile).x y = TempPlayer(Index).ProjecTile(PlayerProjectile).y ' check if left map If x > Map(GetPlayerMap(Index)).MaxX Or y > Map(GetPlayerMap(Index)).MaxY Or x < 0 Or y < 0 Then ClearProjectile Index, PlayerProjectile Exit Sub End If ' check if hit player For i = 1 To Player_HighIndex ' make sure they're actually playing If IsPlaying(i) Then ' check coordinates If x = Player(i).x And y = GetPlayerY(i) Then ' make sure it's not the attacker If Not x = Player(Index).x Or Not y = GetPlayerY(Index) Then ' check if player can attack If CanPlayerAttackPlayer(Index, i, False, True) = True Then ' attack the player and kill the project tile PlayerAttackPlayer Index, i, TempPlayer(Index).ProjecTile(PlayerProjectile).Damage ClearProjectile Index, PlayerProjectile Exit Sub Else ClearProjectile Index, PlayerProjectile Exit Sub End If End If End If End If Next ' check for npc hit For i = 1 To MAX_MAP_NPCS If x = MapNpc(GetPlayerMap(Index)).Npc(i).x And y = MapNpc(GetPlayerMap(Index)).Npc(i).y Then ' they're hit, remove it and deal that damage ;) If CanPlayerAttackNpc(Index, i, True) Then PlayerAttackNpc Index, i, TempPlayer(Index).ProjecTile(PlayerProjectile).Damage ClearProjectile Index, PlayerProjectile Exit Sub Else ClearProjectile Index, PlayerProjectile Exit Sub End If End If Next ' hit a block If Map(GetPlayerMap(Index)).Tile(X, Y).Type = TILE_TYPE_BLOCKED Or Map(GetPlayerMap(Index)).Tile(X, Y).Type = TILE_TYPE_RESOURCE Then ' hit a block, clear it. ClearProjectile Index, PlayerProjectile Exit Sub End IfEnd Sub```**Client side**Replace **BltProjectile** with this:```' player ProjectilesPublic Sub BltProjectile(ByVal Index As Long, ByVal PlayerProjectile As Long)Dim x As Long, y As Long, PicNum As Long, i As LongDim rec As DxVBLib.RECT ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler ' check for subscript error If Index < 1 Or PlayerProjectile < 1 Or PlayerProjectile > MAX_PLAYER_PROJECTILES Then Exit Sub ' check to see if it's time to move the Projectile If GetTickCount > Player(Index).ProjecTile(PlayerProjectile).TravelTime Then With Player(Index).ProjecTile(PlayerProjectile) ' set next travel time and the current position and then set the actual direction based on RMXP arrow tiles. Select Case .Direction ' down Case 0 If isDirBlocked(Map.Tile(Player(Index).ProjecTile(PlayerProjectile).x, Player(Index).ProjecTile(PlayerProjectile).y).DirBlock, DIR_DOWN + 1) Then ClearProjectile Index, PlayerProjectile Exit Sub End If .y = .y + 1 ' check if they reached maxrange If .y = (GetPlayerY(Index) + .Range) + 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub ' up Case 1 If isDirBlocked(Map.Tile(Player(Index).ProjecTile(PlayerProjectile).x, Player(Index).ProjecTile(PlayerProjectile).y).DirBlock, DIR_UP + 1) Then ClearProjectile Index, PlayerProjectile Exit Sub End If .y = .y - 1 ' check if they reached maxrange If .y = (GetPlayerY(Index) - .Range) - 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub ' right Case 2 If isDirBlocked(Map.Tile(Player(Index).ProjecTile(PlayerProjectile).x, Player(Index).ProjecTile(PlayerProjectile).y).DirBlock, DIR_RIGHT + 1) Then ClearProjectile Index, PlayerProjectile Exit Sub End If .x = .x + 1 ' check if they reached max range If .x = (GetPlayerX(Index) + .Range) + 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub ' left Case 3 If isDirBlocked(Map.Tile(Player(Index).ProjecTile(PlayerProjectile).x, Player(Index).ProjecTile(PlayerProjectile).y).DirBlock, DIR_LEFT + 1) Then ClearProjectile Index, PlayerProjectile Exit Sub End If .x = .x - 1 ' check if they reached maxrange If .x = (GetPlayerX(Index) - .Range) - 1 Then ClearProjectile Index, PlayerProjectile: Exit Sub End Select .TravelTime = GetTickCount + .Speed End With End If ' set the x, y & pic values for future reference x = Player(Index).ProjecTile(PlayerProjectile).x y = Player(Index).ProjecTile(PlayerProjectile).y PicNum = Player(Index).ProjecTile(PlayerProjectile).Pic ' check if left map If x > Map.MaxX Or y > Map.MaxY Or x < 0 Or y < 0 Then ClearProjectile Index, PlayerProjectile Exit Sub End If ' check if we hit a block If Map.Tile(x, y).Type = TILE_TYPE_BLOCKED Or Map.Tile(x, y).Type = TILE_TYPE_RESOURCE Then ClearProjectile Index, PlayerProjectile Exit Sub End If ' check for player hit For i = 1 To Player_HighIndex If x = GetPlayerX(i) And y = GetPlayerY(i) Then ' they're hit, remove it If Not x = Player(MyIndex).x Or Not y = GetPlayerY(MyIndex) Then ClearProjectile Index, PlayerProjectile Exit Sub End If End If Next ' check for npc hit For i = 1 To MAX_MAP_NPCS If x = MapNpc(i).x And y = MapNpc(i).y Then ' they're hit, remove it ClearProjectile Index, PlayerProjectile Exit Sub End If Next ' if projectile is not loaded, load it, female dog. If DDS_Projectile(PicNum) Is Nothing Then Call InitDDSurf("projectiles\" & PicNum, DDSD_Projectile(PicNum), DDS_Projectile(PicNum)) End If ' get positioning in the texture With rec .top = 0 .Bottom = SIZE_Y .Left = Player(Index).ProjecTile(PlayerProjectile).Direction * SIZE_X .Right = .Left + SIZE_X End With ' blt the projectile Call Engine_BltFast(ConvertMapX(x * PIC_X), ConvertMapY(y * PIC_Y), DDS_Projectile(PicNum), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) ' Error handler Exit Suberrorhandler: HandleError "BltProjectile", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub``` Link to comment Share on other sites More sharing options...
Domino_ Posted December 4, 2011 Share Posted December 4, 2011 hmmm. Same can be used in spell casting. 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