Reincarnation, Unit Casts War Stomp When He Revives

Why dont u just make a dummy unit, cast War Stomp at the place of where the Unit reincarnates? Do u want the reincarnated unit to display the spell or something? :/
 
@Running_dap

If you read the thread, the problem is detecting the reincarnation.

It is possible, but complicated. wraithseeker's link above is the best option.
 
There is a easier way.


1) Base of in reincarnation

2) Trigger to create a dummy unit when the unit with reincarnation dies (check mana and cooldown is also nice to do, to avoid bugs)

3) add expiration timer to dummy unit

4) add war stomp to dummy unit

5) Wait x seconds (time for reincarnation, you need to test to get the right one)

6) order the dummy unit to cast the war stomp
 
Did you even read the thread Justice-BR :confused: ?
That's exactly what my trigger does, however, it doesn't work.

Couldn't I just modify wraithseeker's JASS script to when the hero gets to 1HP?
 
How about something like this:

Event:
A unit dies

Condition:
Unit has (your ability)

Actions:
Wait (time until revives) seconds.
<create dummy blah blah blah>
 
Trigger:
  • Untitled Trigger 002
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to (==) Tauren Chieftain 0017 &lt;gen&gt;
    • Actions
      • Wait 3.00 seconds
      • Set tempPoint = (Position of (Triggering unit))
      • Unit - Create 1 DummyCaster for (Owner of (Triggering unit)) at tempPoint facing Default building facing (270.0) degrees
      • Unit - Add Frost Stomp to (Last created unit)
      • Unit - Order (Last created unit) to (Order((Name of Frost Stomp )))
      • Unit - Remove Frost Stomp from (Last created unit)
      • Custom script: call RemoveLocation(udg_tempPoint)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)

Nope.
 
> Unit - Remove Frost Stomp from (Last created unit)

Still not a good idea...


> Unit - A unit Dies

A unit on Reincarnation doesn't die...
If its health drops to less than 0.4 without dying, it's reincarnating.
 
Yes a saw the whole thing, you were using "casting reincarnation"

anyway, i see, th trigger with "a unit dies" doenst work because (duh) the unit doesnt really dies.


edit: damn ace beat me

anyway

Unit - Life is a specified unit event
so you need a periodic trigger or set a variable with "reincarnation user"
 
Code:
Untitled Trigger 002
    Events
        Unit - A unit Is attacked
    Conditions
        (Integer((Life of (Triggering unit)))) Less than or equal to (<=) 1
        (Triggering unit) Equal to (==) Tauren Chieftain 0017 <gen>
    Actions
        Wait 3.00 seconds
        Set tempPoint = (Position of (Triggering unit))
        Unit - Create 1 DummyCaster for (Owner of (Triggering unit)) at tempPoint facing Default building facing (270.0) degrees
        Unit - Add Frost Stomp  to (Last created unit)
        Unit - Order (Last created unit) to (Order((Name of Frost Stomp )))
        Unit - Remove Frost Stomp  from (Last created unit)
        Custom script:   call RemoveLocation(udg_tempPoint)
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Didn't work either.
 
try it

make a global variable/array called "toReincarnate"
when the unit learn Reincarnation make a trigger

Event (hero learn a ability)
Condition (ability learned is Reincarnation)
toReincarnate == triggering unit

then


event Unit - "toReincarnate"'s life become less than 0.4

condition (check cooldown and mana? dunno)

action (your actins here)
 
When the unit is attacked, it didn't take any damage yet.
And, if its health is too low, it won't be attacked anymore.

The dummy still needs the spell to actually cast it... though it obviously doesn't help to keep repeating that...
 
Here, I vJASSED it up for you. I tested it thoroughly, and it definitely works.
JASS:
scope StompOnRez initializer Init

  globals
    private integer UNIT_TYPE = &#039;H000&#039;  //Rawcode of reincarnating unit-type
    private integer DUMMY_ID = &#039;h000&#039;  //Rawcode of dummy unit
    private integer ABILITY_ID = &#039;A000&#039;  //Rawcode of stomp ability
    private string STOMP_ORDER_STRING = &quot;stomp&quot; //Order string of base ability
    private boolean USE_DUMMY = true //Have dummy cast or hero cast
                                     //Recommended true
  endglobals
  
  private function Conditions takes nothing returns boolean
    return GetUnitTypeId(GetTriggerUnit()) == UNIT_TYPE
  endfunction
  
  private function AltActions takes nothing returns nothing
    local unit rez = GetReincarnatingUnit()
    call TriggerSleepAction(0.0) //Required
    call IssueImmediateOrder(rez, STOMP_ORDER_STRING)
    set rez = null
  endfunction
  
  private function Actions takes nothing returns nothing
    local unit rez = GetReincarnatingUnit()
    local unit u = CreateUnit(GetOwningPlayer(rez), DUMMY_ID, GetUnitX(rez), GetUnitY(rez), 0)
    call UnitAddAbility(u, ABILITY_ID)
    call IssueImmediateOrder(u, STOMP_ORDER_STRING)
    call UnitApplyTimedLife(u, &#039;BTLF&#039;, 3)
    call DestroyEffect(AddSpecialEffectTarget(&quot;Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdx&quot;, rez, &quot;origin&quot;))
    set rez = null
    set u = null
  endfunction
  
  private function Init takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterReincarnationEvent(t, true)
    call TriggerAddCondition(t, Condition(function Conditions))
    if USE_DUMMY then
      call TriggerAddAction(t, function Actions)
    else
      call TriggerAddAction(t, function AltActions)
    endif
  endfunction
  
endscope


That requires two libraries, RemovalDetection and TimerUtils. Both are included in the testmap.
 

Attachments

  • StompOnReincarnate.w3x
    34.4 KB · Views: 99
It frustrates me greatly when things don't work, so I feel compelled to make them work.

It really wasn't much work, seeing as the event handling had already been taken care of.
 
It worked!
JASS:
scope StompOnRez initializer Init

  globals
    private integer UNIT_TYPE = &#039;Otch&#039;  //Rawcode of reincarnating unit-type
    private integer DUMMY_ID = &#039;n000&#039;  //Rawcode of dummy unit
    private integer ABILITY_ID = &#039;A001&#039;  //Rawcode of stomp ability
    private string STOMP_ORDER_STRING = &quot;stomp&quot; //Order string of base ability
    private boolean USE_DUMMY = true //Have dummy cast or hero cast
                                     //Recommended true
  endglobals
  
  private function Conditions takes nothing returns boolean
    return GetUnitTypeId(GetTriggerUnit()) == UNIT_TYPE
  endfunction
  
  private function AltActions takes nothing returns nothing
    local unit rez = GetReincarnatingUnit()
    call TriggerSleepAction(0.0) //Required
    call IssueImmediateOrder(rez, STOMP_ORDER_STRING)
    set rez = null
  endfunction
  
  private function Actions takes nothing returns nothing
    local unit rez = GetReincarnatingUnit()
    local unit u = CreateUnit(GetOwningPlayer(rez), DUMMY_ID, GetUnitX(rez), GetUnitY(rez), 0)
    call UnitAddAbility(u, ABILITY_ID)
    call IssueImmediateOrder(u, STOMP_ORDER_STRING)
    call UnitApplyTimedLife(u, &#039;BTLF&#039;, 3)
    call DestroyEffect(AddSpecialEffectTarget(&quot;war3mapImported\\FrostStomp.mdx&quot;, rez, &quot;origin&quot;))
    set rez = null
    set u = null
  endfunction
  
  private function Init takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterReincarnationEvent(t, true)
    call TriggerAddCondition(t, Condition(function Conditions))
    if USE_DUMMY then
      call TriggerAddAction(t, function Actions)
    else
      call TriggerAddAction(t, function AltActions)
    endif
  endfunction
  
endscope

Thanks so much saw792!
+rep for life ;) .
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top