HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Reducing a Hero's level?

01-10-2003, 11:58 AM#1
Hakujin
I am making a competitive team "hero's quest" style game. I want to penalty for death to be:

1) randomly drop an object from hero's inventory
2) reduce hero level by one
3) wait 25 seconds and respawn

It works except for the hero level part. Here is what I have:
-------------------------------------
EVENT
Unit owned by Player X dies

CONDITION
Triggering Type is a Hero = True

ACTION
Hero - Drop (Item carried by triggering unit) in Slot (rnd 1-6) from triggering unit
Hero - Set (triggering Unit Hero Level) to ((Hero level of (triggering unit -1))
Game - Display to (triggering unit's owner) "Your hero will revive in 25 seconds"
Wait 25 seconds
Hero - Instantly revive (Triggering Unit) at <gen> Revival Point
Camera - Pan position to (Reviving Hero) over 2 seconds
---------------------------------------

My dying heroes randomly drop an item and revive, but their level and XP doesn't change. Is it not possible to remove a hero's level? (and possible reduce the level of a random ability by 1?)

Thanks in advance!

Hakujin
01-10-2003, 01:50 PM#2
Kerry
Hmmm... now that i havent ever tried... Im not sure if you can take levels from a hero, i will try.
01-10-2003, 02:22 PM#3
Kerry
Nope i havent found a way to remove a hero level. One thing you could do is removing experience, that will at least make it harder to lvl up again. Just use Hero - Add experience and put a negative value in the box.
01-10-2003, 03:21 PM#4
Guest
I really have no clue, but have you tried lowering the level and the experience?
01-10-2003, 03:27 PM#5
Byelobog
The only way I can think of doing this is as follows:
1) Store hero strength, agility, intelligence as integers
2) Store all of the hero's items into an array
3) Replace hero with identical hero replicate, at the (level - 1) from where they were before
4) Replace the strength, agility, and intelligence of the new hero with the values you had previously stored before removing the old hero.

Kind of a workaround, but I believe that should work. The only problem is hit points, not sure how to store hit points of a unit, so if they used a hp tome the effect may be lost. All other attributes though (str, agi, int, and items) would be transferred to the new hero though.