• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] 2 Units connected in life. [Problem Solved]

Status
Not open for further replies.
Level 2
Joined
Apr 18, 2017
Messages
12
If I may ask for a request that I am in need of help, I tried to make a trigger that if UnitA dies, so does UnitB and vice versa, After doing it several times. For unknown reason if a random unit dies so does UnitA or UnitB. And if UnitB dies UnitA will declined death. If do so does anyone know If there are another possible solutions on fixing or making this function properly?[/COLOR]


Ps; Is this the right place to post this kind of thread? if no, then you can have my deepest apology.
 
Level 30
Joined
Mar 14, 2014
Messages
1,213
If I may ask for a request that I am in need of help, I tried to make a trigger that if UnitA dies, so does UnitB and vice versa, After doing it several times. For unknown reason if a random unit dies so does UnitA or UnitB. And if UnitB dies UnitA will declined death. If do so does anyone know If there are another possible solutions on fixing or making this function properly?[/COLOR]


Ps; Is this the right place to post this kind of thread? if no, then you can have my deepest apology.

Firstly yes this is the right place and secondly could i have a snippet (picture) of your trigger? Like this i can see what is wrong with this trigger.
 
Level 2
Joined
Apr 18, 2017
Messages
12
Firstly yes this is the right place and secondly could i have a snippet (picture) of your trigger? Like this i can see what is wrong with this trigger.

To be honest, I do not know how to send a picture of the trigger.. T^T But I can rewrite it in a format way

[trigger 1]
Event
a unit dies
Condition
(Random unit from (Units of type Chandler))is alive) Equal to False
Actions
Unit - Kill (Random unit from (Units of type Chandler's Core))

[trigger 2]
Event
a unit dies
Condition
(Random unit from (Units of type Chandler's Core))is alive) Equal to False
Actions
Unit -Kill (Random unit from (Units of type Chandler))
 
Level 30
Joined
Mar 14, 2014
Messages
1,213
1.You can make this one trigger that acts for both.

2.I presume that you have only one unit type on the map?

For 2:If this is the case than i advice to do the following along with showing you how to combine these:

-----------------------------------------------------------

Event

- A Unit dies

Condition
- Or - Any (Conditions) are true
-Condition
-(Unit-type of (Dying Unit)) equals Chandler)
-(Unit-type of (Dying Unit)) equals Chandler's core)
Actions
-If (All Conditions) are true then do (Then Actions) else do (else actions)
-'If'-Conditions
-(Unit-type of (Dying Unit)) equals Chandler)
-'Then'-Actions
-Unit - Kill (Random unit from (Units of type Chandler's Core))
-'Else'-Actions
-If (All Conditions) are true then do (Then Actions) else do (else actions)
-'If'-Conditions
-(Unit-type of (Dying Unit)) equals Chandler's Core)
-'Then'-Actions
-Unit - Kill (Random unit from (Units of type Chandler))
-'Else'-Actions
-do nothing

-----------------------------------------------------------
At least i think it should work if there is only one Chandler and one Chandler's Core
 
Level 2
Joined
Apr 18, 2017
Messages
12
Yes, It works just fine but there is one problem though, After both of them died via one dying. The next time Chandler was revive (If chandler is revive The core will be created to where Chandler was revive).

The problem now was that If the Core dies again, Chandler won't die.
 
Level 2
Joined
Apr 18, 2017
Messages
12
How To Post Your Trigger

---

Other than some minor leaks, Mister_Haudrauf's trigger looks right. Are you sure you copied it right? Post your triggers following the link I posted it.


Ooh, Thanks. and this is what it looks like.
  • Chandler and the Core
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Dying unit)) Equal to Chandler's Core
          • (Unit-type of (Dying unit)) Equal to Chandler
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to Chandler
        • Then - Actions
          • Unit - Kill (Random unit from (Units of type Chandler's Core))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Dying unit)) Equal to Chandler's Core
            • Then - Actions
              • Unit - Kill (Random unit from (Units of type Chandler))
            • Else - Actions
 
Status
Not open for further replies.
Top