Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating npc pokemon based on level.
#5
Well you simply want the CurrentLevelStats + NextLevelStats.

So, lets say you still want to use the function. You could do it like this:

Code:
Function GetPokeStats(ByVal PokemonIndex As Long, ByVal level As Long) As Long
Dim i as Byte
    For i = 1 to Level
       Int(Pokemon(PokemonIndex).Str) = GetVar()
       etc...
    Next i
End Function

Now the GetVar will use the "i" variable. Something like this:
Code:
GetVar(path, "LEVEL & i, "Attack")

So in the For loop you will need to add them together, so the previous is added to the new etc..

Code:
Function GetPokeStats(ByVal PokemonIndex As Long, ByVal level As Long) As Long
Dim i as Byte
    For i = 1 to Level
       Int(Pokemon(PokemonIndex).Str) = Int(Pokemon(PokemonIndex).Str) + GetVar(path, "LEVEL & i, "Attack")
       etc...
    Next i
End Function

Remember that the GetVar isnt correctly done here.. I think this would be what your looking for? Otherwise I can give you some other ideas or develop this one.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)