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 on Discord.
Riney on Steam (Steam)
@RineyCat on Twitter

Sure I didn't pop off on SCBW like I wanted to, but I won VRChat. Map maker for life.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:30 am]
NudeRaider -- I would like 3000 minerals, please
[07:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
[2026-4-13. : 10:07 pm]
NudeRaider -- ya why phone people when you can just write letters
[2026-4-13. : 9:37 pm]
IskatuMesk -- I have never and will never own a phone
Please log in to shout.


Members Online: Roy