Grags_1977
Ultra Cool Member
- Reaction score
- 32
I want to take away 20% gold of my hero when he dies.
Set player1 gold to player1 gold - 20%
How do I do this please?
Set player1 gold to player1 gold - 20%
How do I do this please?
Trigger:
- Player - Set Player 1 (Red) Current gold to ((Player 1 (Red) Current gold) - ((Player 1 (Red) Current gold) x (Integer(0.20))))
mmm, if you convert 0.2 to integer does it becomes 0??
i think you must convert the current gold to real first, then multply and the turn it into integer.
This can be done also. At first you need to know which amount of experience is needed for which level. This can be found in the gameplay constants. Afterwards you can make an integer-array that stores the minimum-experience for every level and finally you can than write your trigger, which sets the experience of the hero to an minimumvalue according to the level the hero currently has.I was contimplating making death permanent forcing the user to save & load. But decided against it. But I don't want death to be just a tiny inconvenience either. I would LOVE to make the user lose all thier experience towards thier next level. But wouldn't have the slightest idea where to begin. As setting the hero's xp to zero really does set it to zero (Includes ALL levels they have)