Staredit Network > Forums > SC2 Assistance > Topic: How to make a revival system similar to W3
How to make a revival system similar to W3
Feb 19 2011, 4:38 pm
By: thegameplayer  

Feb 19 2011, 4:38 pm thegameplayer Post #1



When a hero dies, you would have to pay to revive him at a special building.

In my game, there would be an ability in a building that allows my hero to revive at any cost, but the cost is determined by hero level.

When the hero gets revived, it keeps the same stats and level.

The hero revives at the player start location.

If the hero is alive, then the ability will be grayed out.



None.

Feb 19 2011, 7:17 pm Roy Post #2

An artist's depiction of an Extended Unit Death

Alright, let me just say that this would be much, much better handled in the Data Editor (especially enabling/disabling the ability). However, my experience in the Data Editor is limited.

Here is how you would implement the revive system using triggers only:

Trigger Revive System


As you can see, it's a little hacked together and it's possible for some of it to become out-of-sync from other triggers or game events. There is no way (that I know) to change the cost of an ability through triggers.

The ability's enable/disable would be much better handled using a requirement through the Data Editor. I discuss how to create a requirement for an upgrade in this thread.

Making Requirement, Applying it to an Ability


Your requirement would want to have a use condition to check if the player owns 0 of his hero unit. It would look like this:

My_Custom_Requirement
    Use
        And
            Count Unit Hero_Unit In Progress or Better
            Constant 0
    Show

That would handle the graying out for you, and you wouldn't have to trigger it.

The cost could probably be handled better in the Data Editor as well. Maybe instead of basing the revive on an ability, you should base it off of constructing a unit. Hopefully Cardinal or one of the other Data Editor gurus will provide more information as to how to implement this entire system through the Data Editor, because my personal knowledge is insufficient.

Post has been edited 1 time(s), last time on Feb 20 2011, 6:47 pm by Roy.




Feb 20 2011, 5:03 pm Riney Post #3

Thigh high affectionado

Quote from Roy
My_Custom_Requirement
    Use
        And
            Count Unit Hero_Unit In Progress or Better
            Constant 0
    Show

That would handle the graying out for you, and you wouldn't have to trigger it.

The cost could probably be handled better in the Data Editor as well. Maybe instead of basing the revive on an ability, you should base it off of constructing a unit. Hopefully Cardinal or one of the other Data Editor gurus will provide more information as to how to implement this entire system through the Data Editor, because my personal knowledge is insufficient.

One trigger to detect that the unit exists and turn it back into the dead hero, reapply buffs it should have, and items it had collected (Annoying to detect unless you used the already used revive system in the game and set it to some absurd amount like 2 hours and just brought it back to life that instant or something)

Yea wait for one of those data editor people to come around :hurr:



Riney#6948 on Discord.
Riney on Steam (Steam)
@RineyCat on Twitter

-- Updated as of December 2021 --

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:18 am]
Sylph-Of-Space -- No complaints here, i'm just curious!
[11:05 pm]
Ultraviolet -- :wob:
[03:55 pm]
Zoan -- :wob:
[10:34 am]
NudeRaider -- SEN doesn't rely on spammers initiate its sleep cycle. It hat fully automated rest and clean-up phases. Please understand that this is necessary for the smooth operation of the site. Thank you.
[2024-5-18. : 3:45 am]
Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
[2024-5-17. : 6:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[2024-5-17. : 5:41 am]
Ultraviolet -- 🤔 so inf is in you?
[2024-5-17. : 4:57 am]
O)FaRTy1billion[MM] -- my name is mud
[2024-5-17. : 4:35 am]
Ultraviolet -- mud, meet my friend, the stick
[2024-5-16. : 10:07 pm]
lil-Inferno -- nah
Please log in to shout.


Members Online: dextereaustin, Roy