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

Ravenshade

Members
  • Posts

    64
  • Joined

  • Last visited

    Never

Ravenshade's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I'd just like to ask what code I need to edit in order to change the tiles covered. I'd like for 'running' (aka RUNNING) to move 4 tiles instead of one >.>
  2. Ravenshade

    Jumping

    Look, if you don't want to accept that my solution works for me (and I've now extensively tested, I can find nothing, absolutely nothing broken) that is up to you. Admittedly, this is a very big project for me, which is why, everything is segmented and I already do regular back ups so that if I do something seriously wrong, I can always roll back. I am learning how to do things and if this comes to nothing, then it comes to nothing, but at least I can say I tried rather than having never tried at all.
  3. Ravenshade

    Jumping

    Not a damn clue actually XD but thanks for the vote of confidence Edited the code post some more Interesting…not as expected ^_^;
  4. Ravenshade

    Jumping

    I edited my post just above. As it is, you don't want to help, so don't. Feel free to ignore my threads. I am working on the code myself. You don't have to like it. Edit Do you know how I was taught to swim? I was chucked into the deep end of the reservoir. I'm still here.
  5. Ravenshade

    Jumping

    That was…very helpful of you. I think I've figured on the section, so any input would be helpful however... I'm thinking of editing the client side code...: Please note this is not a solution it's a WIP and doesn't yet work. Notes... >! This doesn't let NPC's jump. >! End Notes In ModGameLogic ``` Sub CheckMovement() ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If IsTryingToMove Then If CanMove Then ' Check if player has the shift key down for running If ShiftDown Then Player(MyIndex).Moving = MOVING_RUNNING Else Player(MyIndex).Moving = MOVING_WALKING End If 'Jump Mod 'Check if player has AltGr key down for jumping If AltGrDown Then Player(MyIndex).Moving = MOVING_JUMPING Else Player(MyIndex).Moving = MOVING_WALKING End If 'End Jump Mod Select Case GetPlayerDir(MyIndex) Case DIR_UP Call SendPlayerMove Player(MyIndex).YOffset = PIC_Y Call SetPlayerY(MyIndex, GetPlayerY(MyIndex) - 1) Case DIR_DOWN Call SendPlayerMove Player(MyIndex).YOffset = PIC_Y * -1 Call SetPlayerY(MyIndex, GetPlayerY(MyIndex) + 1) Case DIR_LEFT Call SendPlayerMove Player(MyIndex).XOffset = PIC_X Call SetPlayerX(MyIndex, GetPlayerX(MyIndex) - 1) Case DIR_RIGHT Call SendPlayerMove Player(MyIndex).XOffset = PIC_X * -1 Call SetPlayerX(MyIndex, GetPlayerX(MyIndex) + 1) End Select If Player(MyIndex).XOffset = 0 Then If Player(MyIndex).YOffset = 0 Then If Map.Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex)).Type = TILE_TYPE_WARP Then GettingMap = True End If End If End If End If End If ' Error handler Exit Sub errorhandler: HandleError "CheckMovement", "modGameLogic", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` ``` Sub ProcessMovement(ByVal Index As Long) Dim MovementSpeed As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler ' Check if player is walking, and if so process moving them over Select Case Player(Index).Moving Case MOVING_WALKING: MovementSpeed = ((ElapsedTime / 1000) * (RUN_SPEED * SIZE_X)) Case MOVING_RUNNING: MovementSpeed = ((ElapsedTime / 1000) * (WALK_SPEED * SIZE_X)) 'Jump Mod Case MOVING_JUMPING: MovementSpeed = ((ElapsedTime/1000) * (RUN_SPEED * SIZE_X)) 'End Jump Mod Case Else: Exit Sub End Select Select Case GetPlayerDir(Index) Case DIR_UP Player(Index).YOffset = Player(Index).YOffset - MovementSpeed If Player(Index).YOffset < 0 Then Player(Index).YOffset = 0 Case DIR_DOWN Player(Index).YOffset = Player(Index).YOffset + MovementSpeed If Player(Index).YOffset > 0 Then Player(Index).YOffset = 0 Case DIR_LEFT Player(Index).XOffset = Player(Index).XOffset - MovementSpeed If Player(Index).XOffset < 0 Then Player(Index).XOffset = 0 Case DIR_RIGHT Player(Index).XOffset = Player(Index).XOffset + MovementSpeed If Player(Index).XOffset > 0 Then Player(Index).XOffset = 0 End Select ' Check if completed walking over to the next tile If Player(Index).Moving > 0 Then If GetPlayerDir(Index) = DIR_RIGHT Or GetPlayerDir(Index) = DIR_DOWN Then If (Player(Index).XOffset >= 0) And (Player(Index).YOffset >= 0) Then Player(Index).Moving = 0 If Player(Index).Step = 1 Then Player(Index).Step = 3 Else Player(Index).Step = 1 End If End If Else If (Player(Index).XOffset = 0 Then DirDown = False If GetAsyncKeyState(VK_LEFT) >= 0 Then DirLeft = False If GetAsyncKeyState(VK_RIGHT) >= 0 Then DirRight = False If GetAsyncKeyState(VK_CONTROL) >= 0 Then ControlDown = False If GetAsyncKeyState(VK_SHIFT) >= 0 Then ShiftDown = False 'Jump Mod If GetAsyncKeyState(VK_RMENU) >= 0 Then AltGrDown = False 'End Jump Mod ' Error handler Exit Sub errorhandler: HandleError "CheckKeys", "modInput", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ```
  6. Ravenshade

    Jumping

    Just in case I'd want to add any other action, can someone tell me if there's a tutorial about adding another action? Such as jumping…or climbing? I ran a search but pulled nothing >..<
  7. That was very clear, thank you very much ^_^
  8. Oh, on second thoughts I'm not sure I actually edited this one…lemme go check. Edit No actually I didn't edit it XD. However I did use it to find what I was actually after. I edited GetPlayerStat instead =P (*infuriates Robin further*) Thanks for the information Rithy I wasn't quite aware of what it does, but now I understand a little more. I know about Loop but nothing of how the Server and Client communicate, I'll be learning about that soon.
  9. Thus far the only issue I've found is that…well, it has had the desired effect of removing 'real' data. Therefore players don't know how many points exactly they have put into a particular area. I'm sure there will be more errors and I'll deal with them as I find them. With regards to your opinion, I was referring to your second paragraph sir.
  10. Thank you for your opinion Robin. The purpose of my changes is to completely remove real data. True I could and probably should have written it inside it's own function, however I haven't.
  11. Hi folks, I just tried this… I may have missed something, I don't know. I can't seem to find anything, so, debug time. I tried to compile and got... "Compile Error: Method or Data Member not found" with the following highlighted: ``` .scrlQuest ``` It's part of the scrlQuest.Value = NPC(Editor line **Steps taken** I've checked my code in the client section and it all seems to check out. The server compiles fine. When I run the debug I have the following line highlighted Runtime Error '321' Invalid File Format ``` frmMain.optMOn.Value = True ``` **Steps taken** Re copied and pasted the frmMain The server side compiles fine. Please please, can you detail the changes you have made in the other files so that I know what to tag as a mod.
  12. Hi, I have this code… ``` Function GetPlayerStat(ByVal Index As Long, Stat As Stats) As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Function 'added modification to convert real to percentage Dim total_points As Long Dim count_loop As Long total_points = 0 count_loop = 1 Do While count_loop
  13. I think I found it. If I use ``` Function GetPlayerStat(ByVal Index As Long, Stat As Stats) As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Function 'added modification to convert real to percentage Dim total_points As Interger Dim count_loop As Byte total_points = 0 count_loop = 1 Do While count_loop < 6 total_points = total_points + Player(Index).Stat(count_loop) count_loop = count_loop + 1 Loop GetPlayerStat = (Player(Index).Stat(Stat) / total_points) * 100 'removed stuff 'GetPlayerStat = Player(Index).Stat(Stat) ' Error handler Exit Function errorhandler: HandleError "GetPlayerStat", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Function End Function ``` Is this legitimate code? I'm getting overflow…Run Time Error '6' Overflow>.< Since this is a different topic nao...i'll post a new topic
  14. o.o; I see so I'll have to add everything to get total points…ugh. Edited the original question then.
  15. Thank you very much. I've recently been learning about timers and that might actually be a better idea >.<
×
×
  • Create New...