Hi, I have a Problem with my party system for my Game. When Players are in a Party and they attack a Enemy, the enemy wont die. It's HP will be stuck at 0 and the players will not earn EXP. Heres the Code Where they Earn EXP.
I can't find out why the enemy doesn't die and they dont earn EXP. There's more code for the Party System but its just the Join Party and Leave party commands. Could anybody help?Code:' Check if in party, if so divide the exp up by 2 If Player(Attacker).InParty = False Or Player(Attacker).Party.ShareExp = False Then If GetPlayerLevel(Attacker) = MAX_LEVEL Then Call SetPlayerExp(Attacker, Experience(MAX_LEVEL)) Call BattleMsg(Attacker, "You can't gain anymore Star Points!", BRIGHTBLUE, 0) Else Call SetPlayerExp(Attacker, GetPlayerExp(Attacker) + Exp) Call BattleMsg(Attacker, "You gained " & Exp & " Star Points.", BRIGHTBLUE, 0) End If Else q = 0 ' The following code will tell us how many party members we have active For X = 1 To MAX_PARTY_MEMBERS If Player(Attacker).Party.Member(X) > 0 Then q = q + 1 End If Next X ' MsgBox "in party" & q If q = 2 Then 'Remember, if they aren't in a party they'll only get one person, so this has to be at least two Exp = Exp * 0.75 ' 3/4 experience ' MsgBox Exp For X = 1 To MAX_PARTY_MEMBERS If Player(Attacker).Party.Member(X) > 0 Then If Player(Player(Attacker).Party.Member(X)).Party.ShareExp = True Then If GetPlayerLevel(Player(Attacker).Party.Member(X)) = MAX_LEVEL Then Call SetPlayerExp(Player(Attacker).Party.Member(X), Experience(MAX_LEVEL)) Call BattleMsg(Player(Attacker).Party.Member(X), "You can't gain anymore Star Points!", BRIGHTBLUE, 0) Else Call SetPlayerExp(Player(Attacker).Party.Member(X), GetPlayerExp(Player(Attacker).Party.Member(X)) + Exp) Call BattleMsg(Player(Attacker).Party.Member(X), "You gained " & Exp & " Star Points.", BRIGHTBLUE, 0) End If Call SendEXP(X) End If End If Next X Else 'if there are 3 or more party members.. Exp = Exp * 0.5 ' 1/2 experience For X = 1 To MAX_PARTY_MEMBERS If Player(Attacker).Party.Member(X) > 0 Then If Player(Player(Attacker).Party.Member(X)).Party.ShareExp = True Then If GetPlayerLevel(Player(Attacker).Party.Member(X)) = MAX_LEVEL Then Call SetPlayerExp(Player(Attacker).Party.Member(X), Experience(MAX_LEVEL)) Call BattleMsg(Player(Attacker).Party.Member(X), "You can't gain anymore Star Points!", BRIGHTBLUE, 0) Else Call SetPlayerExp(Player(Attacker).Party.Member(X), GetPlayerExp(Player(Attacker).Party.Member(X)) + Exp) Call BattleMsg(Player(Attacker).Party.Member(X), "You gained " & Exp & " Star Points.", BRIGHTBLUE, 0) End If Call SendEXP(X) End If End If Next X End If End If




Reply With Quote