Revive Normal Unit Problem

CuteCumber

Member
Reaction score
4
Well. I've got a problem on how to revive normal unit and solved it by using some trigger I've seen on older posts. But I got another problem. My unit will revive properly, but when its corpse decay and bones are gone, the items are created again at his dying spot. I used Peasant for that unit.
Trigger:
  • Revive P2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to (==) Peasant (Human)
      • ((Triggering unit) is owned by Player 2 (Blue)) Equal to (==) True
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set P2Item[(Integer A)] = (Item carried by (Triggering unit) in slot (Integer A))
      • Wait 10.00 game-time seconds
      • Unit - Create 1 Peasant (Human) for Player 2 (Blue) at HumanRevivePoint facing Default building facing (270.0) degrees
        • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
          • Loop - Actions
            • Hero - Give (Last created item) to (Last created unit)
            • Item - Create (Item-type of P2Item[(Integer A)]) at HumanRevivePoint
      • Camera - Pan camera for (Owner of (Last created unit)) to HumanRevivePoint over 0.00 seconds
      • Selection - Select (Last created unit) for (Owner of (Last created unit))
 

Setharoth114

New Member
Reaction score
5
I think all you need to do is add in:

Removing ((dying unit)) from the game.

before the 10 seconds. Try that and see if it works.


Edit: The other thing you could try to do is to make sure none of your items drop upon death.
 

Tawnttoo

New Member
Reaction score
36
Is it supposed to be this way:
Trigger:
  • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
    • Loop - Actions
      • Hero - Give (Last created item) to (Last created unit)
      • Item - Create (Item-type of P2Item[(Integer A)]) at HumanRevivePoint
Try swapping the 2 actions, because now it is trying to give the created unit other items than the ones that the dying unit had.
 

CuteCumber

Member
Reaction score
4
It's fixed. Thank you for your solution. But instead adding the removing dying unit before the wait, I add it after it.
Trigger:
  • Revive P2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to (==) Peasant (Human)
      • ((Triggering unit) is owned by Player 2 (Blue)) Equal to (==) True
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set P2Item[(Integer A)] = (Item carried by (Triggering unit) in slot (Integer A))
      • Wait 10.00 game-time seconds
      • Unit - Create 1 Peasant (Human) for Player 2 (Blue) at HumanRevivePoint facing Default building facing (270.0) degrees
        • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
          • Loop - Actions
            • Hero - Give (Last created item) to (Last created unit)
            • Item - Create (Item-type of P2Item[(Integer A)]) at HumanRevivePoint
      • Unit - Remove (Triggering unit) from the game
      • Camera - Pan camera for (Owner of (Last created unit)) to HumanRevivePoint over 0.00 seconds
      • Selection - Select (Last created unit) for (Owner of (Last created unit))
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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