Please help with triger for spell

Fuin

New Member
Reaction score
0
Hi all
I am bad at writing triggers, and need your help, I need trigger for spell which will do following thing:
Player has hero and this hero has learned skill "Spirit of redemption", when this hero dies trigger should spawn unit for player who was owner of hero. unit spawned by this trigger should last for 30 seconds (for example), and after that time hero which died should be reincarnated with lets say 500 hp and 100 mana (amount may be set as a percent of heroes max life, for example 20% of mana and health).
And one more thing, is it possible to make Healing wave autocast? If yes how?
Thx in advance for help
 

Ph[o]bia

New Member
Reaction score
7
bah the first spell shouldn't be hard but you want it Mui or no?

Edit: for auto cast, it's possible and i could make it to
 

Fuin

New Member
Reaction score
0
I would be thankufull, but what does Mui mean? Ah and one thing there can be multiple heroes using this skill (spirit of redemption) even at the same time so... remember about that
 

Ph[o]bia

New Member
Reaction score
7
I would be thankufull, but what does Mui mean? Ah and one thing there can be multiple heroes using this skill even at the same time so... remember about that

Bah I don't realy know what MUI is but i think its related whit more then 1 unit can cast the spell at same time.

I currently Doing the Spell

Edit: Finished Auto Cast healing Wave.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Multilingual user interface. Meaning multiple units can cast the same spell/ use the same system together.

Edit: Ooooops. Typed the post out and forgot to post. Went to do something else.
 

Fuin

New Member
Reaction score
0
So if Mui means multiple units using skill at the same time, yes, it has to be mui ^^. Thx for help Ph[o]bia +rep for you !
 

jomik

New Member
Reaction score
17
I'm pretty sure MUI is Multi Unit Instance(able) :O Cuz Multilingual User Interface refers to a user interface, and that has nothing to do with having more instances at the same time :p MUI = Multi Unit Instance(able)
MPI = Multi Player Instance(able)
 

jomik

New Member
Reaction score
17
I'll create your first spell in a sec :D

EDIT: What will happen if the replacement unit is skilled before the 30 seconds is up?
 

Fuin

New Member
Reaction score
0
Unit spawned after hero death will be invulnerable, so it won't be killed unitl 30 sec ;P
 

jomik

New Member
Reaction score
17
Here is what you need. You should be able to figure what is what. There should be no leaks, and no reason it's not MPI :D EDIT: If a player has more than 1 hero both will be revive... So it's MPI
Trigger:
  • Replacement
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of Spirit of Redemption for (Triggering unit)) Greater than 0
    • Actions
      • Set tempPoint = (Position of (Triggering unit))
      • Unit - Create 1 ReplacementUnit for (Owner of (Triggering unit)) at tempPoint facing Default building facing degrees
      • Unit - Make (Last created unit) Invulnerable
      • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
      • Unit - Set the custom value of (Last created unit) to (Player number of (Owner of (Triggering unit)))
      • Custom script: call RemoveLocation(udg_tempPoint)


Trigger:
  • Revive
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Killing unit) Equal to No unit
      • (Unit-type of (Triggering unit)) Equal to ReplacementUnit
    • Actions
      • Set tempPoint = (Position of (Triggering unit))
      • Set tempGroup = (Units owned by (Player((Custom value of (Triggering unit)))) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in tempGroup and do (Actions)
        • Loop - Actions
          • Hero - Instantly revive (Picked unit) at tempPoint, Show revival graphics
      • Custom script: call DestroyGroup(udg_tempGroup)
      • Custom script: call RemoveLocation(udg_tempPoint)


ReplacementUnit is a Unit-type variable with an initial / set value of your replacement.

EDIT: It wont be useable if the player has more than 1 hero. Then both heroes will revive if dead.
 

jomik

New Member
Reaction score
17
Btw, I'm setting a custom value on the replacement units, so you can't use that.
EDIT: Can't figure a MUI version in GUI >.<
 

Fuin

New Member
Reaction score
0
Also I'm concerned about "Unit - Add a 10.00 second Generic expiration timer to (Last created unit)" in my map there is A LOT triggers(well about 20 different units for every player [10 players on map]) that spawn units won't this action accidentaly add this expiration timer to one of these units spawned by other triggers? I don't know how will look correct mui version, just letting you know about this issue
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
The triggers won't cut into each other in a split second.

Create unit
Add expiration timer to last created unit

The time between these 2 actions, or anything in between, like making it invulnerable, is instantly. And if I'm not wrong, triggers won't conflict each other. I think I heard that somewhere, but I don't really know if its true. Anyway, the time is really short. So it should be no problem.
 

Fuin

New Member
Reaction score
0
Good to hear that, i'll test spell for a moment will se what happens :D
How do i do that in editor ?
Code:
Set tempGroup = (Units owned by (Player((Custom value of (Triggering unit)))) matching (((Matching unit) is A Hero) Equal to True))
I've made "matching (((Matching unit) is A Hero) Equal to True))" that part but can't figure out how to set this "(Units owned by (Player((Custom value of (Triggering unit))))"
i'm dumb i guess ;f
 

jomik

New Member
Reaction score
17
search for AND, it's in the bottom part, then you can make 2 conditions which both have to be true :D
 

Fuin

New Member
Reaction score
0
Edit: NVM i messed up condition it works now
Big thx to all who helped me ^^
 

sLsIDK

New Member
Reaction score
13
What was the point of the custom value? The unit created is created for the same player, so when it dies you can just pick every unit in the map matching owner of dieing unit equal to owner of matching unit...
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top