[Trigger] Need Help With Revive Trigger.

Level 5
Joined
Nov 13, 2007
Messages
99
I'm making a game called lions vs panthers and I need a revive trigger for them. Therefore, like everytime a unit gets killed they will come back. Please help. I need a revive trigger. The one i have now doesnt work.

My map is attached. Please help me do it or teach me.
*Also I want to attach certain items to my units but I can't i need serious help. Please help me. Thanks.*
 

Attachments

  • Lion Vs Panthers.w3x
    876.6 KB · Views: 52
Level 4
Joined
Dec 16, 2007
Messages
134
I'm making a game called lions vs panthers and I need a revive trigger for them. Therefore, like everytime a unit gets killed they will come back. Please help. I need a revive trigger. The one i have now doesnt work.

My map is attached. Please help me do it or teach me.
*Also I want to attach certain items to my units but I can't i need serious help. Please help me. Thanks.*

Here add this trigger in your Trigger Editor :

  • Untitled Trigger 003
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
Take note that the Lion must be a Hero and the Panther must also be a hero.
Just change the region if you want the unit to revive randomly in the map.
 
Level 4
Joined
Dec 16, 2007
Messages
134
errr but for my map, if the lion king or blah blah dies more than 10 times they lose. so how i stop the revivng till 10 deaths?

I suggest just to give the Unit a 10 Ankh of Reincarnation and then make a trigger that when a unit dies, the player gets defeated. This is the Easiest Way.

Or you could simply do this things.

First create a Custom Unit and make at as small as an Ant so Players can't see them and then put a boundary that surrounds it so no units could go Inside. It should look like this...
Stones.jpg
(Mine is big so you can see it lol.. hahaha.)As you can see in the picture there are 20 Stones. 10 For Lich King (or Lion in your map) and another 10 for Archmage (or Panther in your map) then put a Region Inside them.

Then make a Trigger that looks like this :


  • Archmage
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Number of units in (Units in Archmage <gen>)) Greater than or equal to 1) and ((Unit-type of (Dying unit)) Equal to Archmage)
    • Actions
      • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
      • Unit - Remove (Random unit from (Units in Archmage <gen>)) from the game
      • -------- Archmage <Gen> Is a Region where in there are 10 units of the same type --------
  • Archmage 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Number of units in (Units in Archmage <gen>)) Equal to 0) and ((Unit-type of (Dying unit)) Equal to Archmage)
    • Actions
      • Game - Defeat (Owner of (Dying unit)) with the message: Defeat!
      • -------- Archmage <Gen> Is a Region where in there are 10 units of the same type --------
Make also the same for Lich King (Lion) but change the Trigger.

  • Lich King
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Number of units in (Units in Lich King <gen>)) Greater than or equal to 1) and ((Unit-type of (Dying unit)) Equal to Lich)
    • Actions
      • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
      • Unit - Remove (Random unit from (Units in Lich King <gen>)) from the game
      • -------- Lich King<Gen> Is a Region where in there are 10 units of the same type --------
  • Lich King 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Number of units in (Units in Lich King <gen>)) Equal to 0) and ((Unit-type of (Dying unit)) Equal to Lich)
    • Actions
      • Game - Defeat (Owner of (Dying unit)) with the message: Defeat!
      • -------- Lich King<Gen> Is a Region where in there are 10 units of the same type --------
And there you have it. If the Stones Run Out then the owner of dying unit gets DEFEATED!:infl_thumbs_up:
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Untitled Trigger 26.17
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Integer_Lives[(Player number of (Owner of (Triggering unit)))] = (Integer_Lives[(Player number of (Owner of (Triggering unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer_Lives[(Player number of (Owner of (Triggering unit)))] Less than 10
        • Then - Actions
          • Wait X seconds
          • Hero - Instantly revive (Triggering unit) at someWhere, Hide revival graphics
        • Else - Actions
 
Level 5
Joined
Nov 13, 2007
Messages
99
ummm guys did you check the victory trigger of mine? I don't know is it right tho >.< please help me check and in the JASS script , I just put it in the rectangle box andsave it right? o.o
also i got a question on attachments lol. IF ANYONE GOT AIM PLEASE ADD ME I NEED HELP. MINE IS LAYZAB0NE
 
Level 2
Joined
Jan 22, 2008
Messages
10
Ok i nid help in the area where the hero revives... I got 2 teams so how do i let each team hero revive on the base they are suppose to be at?
 
Level 11
Joined
Dec 11, 2007
Messages
890
  • Untitled Trigger 26.17
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Integer_Lives[(Player number of (Owner of (Triggering unit)))] = (Integer_Lives[(Player number of (Owner of (Triggering unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer_Lives[(Player number of (Owner of (Triggering unit)))] Less than 10
        • Then - Actions
          • Wait X seconds
          • Hero - Instantly revive (Triggering unit) at someWhere, Hide revival graphics
        • Else - Actions

i think it will work if you change triggering unit with dying unit
 
Top