Experience ???

Status
Not open for further replies.
Level 15
Joined
Sep 27, 2009
Messages
672
Hi everyone i need to make this:
-When player finishes quest his hero will gain 35 EXP...
-When i do this:
  • Actions
    • Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
      • Loop - Actions
        • Hero - Add 35 experience to (Picked unit), Show level-up graphics
It adds me more than 35... How can i fix that, it should give exactly what i wrote... ?
 
Are you sure you used "(Picked Unit)"?
Because if you used a variable (like Hero, which I HIGHLY suggest you use), it would add 35 x number of units owned by Red.

The most simple solution is creating a unit-variable (with array if it's multi-player) and setting the player's hero to that variable.
So Hero[1] = Red's Hero.
Hero[2] = Blue's Hero.
etc...

Then adding experience becomes easy, you stop leaking unit groups and the trigger actually goes faster.
 
You're picking up ALL units owned by Player 1, maybe you have more than 1 unit in the map that is NOT a Hero ?
Possible, 1 Hero unit and 3 Normal Unit ???
So, it picks a total of 4 units
Perhaps, 4 * 35 = 140 EXP for your Hero unit
Because, Normal Unit doesn't have EXP Bar, therefore I think that the EXP has been transfered to your Picked Unit, Hero-type Unit
 
Status
Not open for further replies.
Back
Top