• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Un Detonador con 2 condiciones

Status
Not open for further replies.
Level 4
Joined
Sep 27, 2018
Messages
52
Buenas, necesito ayuda con un detonador que me falla al poner 2 condiciones así:

Sin título.jpg


Lo que quiero básicamente es que cuando un héroe no tome una espada los soldados no le den paso, pero si el héroe toma la espada le den paso y active los otros detonadores de cinemática y misiones.

Me va bien cuando la condición es que no tiene la espada. Pero cuando tiene la espada se me cierra el juego y la verdad no se el porque y que detonadores entran en conflicto.

Sin título.jpg
 
Last edited:
Thread posts are to be posted in English. This is found in the following section: Terms of Service and Rules | HIVE

From what I understand, your problem is with the conditions in the Actions tab, causing the trigger to not fire properly?

EDIT:

I suspect that the first trigger causes an infinite loop, thereby leading to your predicament with it in the first place. The flow of code goes like this:

Code:
a()
if (condition):
    b()
else:
endif

if (not condition):
    c()
else:
    a()

Resulting into:

Code:
a()
    true
    b()

    false
    a()
       true
       b()

       false
       a()
           ...

EDIT 2:

I have also noticed that, in the second trigger, a redundant conditional statement was found. It is located in the primary conditions tab. Other than that, I suppose the trigger should work as intended.
 
Last edited:
Level 4
Joined
Sep 27, 2018
Messages
52
Thread posts are to be posted in English. This is found in the following section: Terms of Service and Rules | HIVE

From what I understand, your problem is with the conditions in the Actions tab, causing the trigger to not fire properly?

EDIT:

I suspect that the first trigger causes an infinite loop, thereby leading to your predicament with it in the first place. The flow of code goes like this:

Code:
a()
if (condition):
    b()
else:
endif

if (not condition):
    c()
else:
    a()

Resulting into:

Code:
a()
    true
    b()

    false
    a()
       true
       b()

       false
       a()
           ...

EDIT 2:

I have also noticed that, in the second trigger, a redundant conditional statement was found. It is located in the primary conditions tab. Other than that, I suppose the trigger should work as intended.


Thanks you can fix the trigger I am learning to handle the triggers now I understand them better.
 
Status
Not open for further replies.
Top