HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero Respawn Trigger question

03-04-2005, 11:17 PM#1
GellingFellan
I need a trigger that, when a hero dies:

-Automatically revives the hero in Region001 after time (Level of Hero * 2) seconds.
-Subtracts (25 + (Level of Hero * 25)) gold from the player that owns that hero.

Im a noob, so the more specific you can be, the better.

Thanks a lot ;)
03-04-2005, 11:23 PM#2
johnfn
Well, you have almost written it out yourself :)

Basically what you gotta do is translate your words to triggers, which isnt too hard.


Code:
Hero Death
    Events
        Unit - A unit Dies
                  When a hero dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
                  First make sure its a hero
    Actions
        Player - Add (0 - (25 + ((Hero level of (Dying unit)) x 25))) to Player 1 (Red) Current gold
                  Add a negitive amount of gold (technically subtracting), the exact amount you wanna get rid of
        Wait ((Real((Hero level of (Dying unit)))) x 2.00) seconds
                  Wait how long you want before he revives
        Hero - Instantly revive (Dying unit) at (Revival Region), Show revival graphics
                  Change this to whereve he should revive
03-04-2005, 11:27 PM#3
Guest
Code:
Events
    Unit - A unit Dies
Conditions
    ((Dying unit) is A Hero) Equal to True
Actions
    Hero - Instantly revive (Dying unit) at (Center of (Playable map area)), Show revival graphics
    Player - Add (25 + ((Hero level of (Dying unit)) x 25)) to (Owner of (Dying unit)) Current gold


Replace the (Center of (Playable map area) with region001.
(Owner of (Dying unit)) i meant to put (Owner of (Killing unit))
03-05-2005, 04:33 AM#4
GellingFellan
johnfn, thanks a lot for making it so clear

but im having some trouble making this part of the trigger:

Code:
        Wait ((Real((Hero level of (Dying unit)))) x 2.00) seconds
                  Wait how long you want before he revives

how do i make this part of the trigger?

Thanks
03-05-2005, 06:50 AM#5
Guest
to do that go to the wait action like normal except when it says 2.00 seconds click on that and use the dropdown menu to select arithmetic, then on the left number scroll down to find Hero - Hero Level Of Unit which you will change to dying unit, in the middle sign put the X, and on the right number put in 2.00.

Im at a friends right now but im fairly sure this is how to do it.
03-05-2005, 08:31 AM#6
GellingFellan
Hmm, when I try to scroll down to find "Hero - Hero Level Of Unit", I can't seem to find it, or any other choices that seem like they would do the same job.

So I'm still stuck :(
03-05-2005, 09:23 AM#7
Guest
yes my mistake, its under conversion - convert integer to real, then replace the point-value of footman with the hero - hero level of dying unit