- Joined
- Dec 20, 2007
- Messages
- 128
Okay so an EXP system came into my head. Though it takes a lot of indexing and my coding powers are not sufficient to make it. It goes like this.
XP Gained = (Total Damage Done By Player / Spawn Total Damage Received) x Spawn Default XP Given
Wherein:
XP Gained - The XP gained by the heroes when the spawn dies.
Total Damage Done By Player - The total damage done by a player to the spawn.
Spawn Total Damage Received - The total damaged received by the spawn.
Spawn Default XP Given - A default integer for total XP given by a unit-type.
Also I want a condition wherein the hero must be in 1500 range within the spawn or the Hero wont receive any XP (Hero still acquires XP even when dead)
_______________________________________
As far as I can tell maybe it would work like
1. The spawn has an index when it enters the map.
2. When the spawn is damaged, the damage is then stored to an index for the owner of the damaging unit which is linked to the index of the spawn.
3. When the spawn dies a trigger checks for the heroes present within 1500 range and distributes the XP according to the formula above.
I wanted to try using arrays but I don't think the cap 8000 would be big enough since I won't be able to figure out recycling the arrays which are already empty.
XP Gained = (Total Damage Done By Player / Spawn Total Damage Received) x Spawn Default XP Given
Wherein:
XP Gained - The XP gained by the heroes when the spawn dies.
Total Damage Done By Player - The total damage done by a player to the spawn.
Spawn Total Damage Received - The total damaged received by the spawn.
Spawn Default XP Given - A default integer for total XP given by a unit-type.
Also I want a condition wherein the hero must be in 1500 range within the spawn or the Hero wont receive any XP (Hero still acquires XP even when dead)
_______________________________________
As far as I can tell maybe it would work like
1. The spawn has an index when it enters the map.
2. When the spawn is damaged, the damage is then stored to an index for the owner of the damaging unit which is linked to the index of the spawn.
3. When the spawn dies a trigger checks for the heroes present within 1500 range and distributes the XP according to the formula above.
I wanted to try using arrays but I don't think the cap 8000 would be big enough since I won't be able to figure out recycling the arrays which are already empty.