• 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.

Problem with a System of Two Triggers

Status
Not open for further replies.
Level 11
Joined
Jun 21, 2007
Messages
505
I have two triggers. The first trigger takes item and displays text, which is provided by the second trigger according to the item type of that item.
Here's example:
  • Events
    • Time - Elapsed game time becomes equal to 10.00 seconds
  • Conditions
    • (Number of items carried by Hero) Greater than 1
  • Actions
    • For each Integer A from 1 to 6 do (Actions)
      • Set ItemType = Item-Type of Item carried by Hero in slot (Integer A)
      • Trigger - Run Settings Setter <gen>
      • Game - display to (All player) text: The_Text
  • Settings Setter
  • Events
  • Conditions
  • Actions
    • If (ItemType = Ring of Protection +2) then (set The_Text = Tralala2)
    • If (ItemType = Ring of Protection +3) then (set The_Text = Tralala3)
    • If (ItemType = Ring of Protection +4) then (set The_Text = Tralala4)
The problem is that it always displays that text, which was the first to be displayed in the game when it was first time set by Settings Setter on its very first run.

If you need to examine the map, then I'll post it.
 
I have two triggers. The first trigger takes item and displays text, which is provided by the second trigger according to the item type of that item.
Here's example:
  • Events
    • Time - Elapsed game time becomes equal to 10.00 seconds
  • Conditions
    • (Number of items carried by Hero) Greater than 1
  • Actions
    • For each Integer A from 1 to 6 do (Actions)
      • Set ItemType = Item-Type of Item carried by Hero in slot (Integer A)
      • Trigger - Run Settings Setter <gen>
      • Game - display to (All player) text: The_Text
  • Settings Setter
  • Events
  • Conditions
  • Actions
    • If (ItemType = Ring of Protection +2) then (set The_Text = Tralala2)
    • If (ItemType = Ring of Protection +3) then (set The_Text = Tralala3)
    • If (ItemType = Ring of Protection +4) then (set The_Text = Tralala4)
The problem is that it always displays that text, which was the first to be displayed in the game when it was first time set by Settings Setter on its very first run.

If you need to examine the map, then I'll post it.
First trigger:
  • Actions - For each Integer A from 1 to 6 do (Actions)
  • Actions - Set ItemType = Item-Type of Item carried by Hero in slot (Integer A)
  • Actions - Trigger - Run Settings Setter<gen>
  • Actions - Game - display to (All player) text: The_Text
You need to change it to "Actions - Trigger - Run Settings Setter<gen>(ignoring conditions)"
But i could be wrong cuz i dont understand that what you want to create...
 
I have two triggers. The first trigger takes item and displays text, which is provided by the second trigger according to the item type of that item.
Here's example:
  • Events
    • Time - Elapsed game time becomes equal to 10.00 seconds
  • Conditions
    • (Number of items carried by Hero) Greater than 1
  • Actions
    • For each Integer A from 1 to 6 do (Actions)
      • Set ItemType = Item-Type of Item carried by Hero in slot (Integer A)
      • Trigger - Run Settings Setter <gen>
      • Game - display to (All player) text: The_Text
  • Settings Setter
  • Events
  • Conditions
  • Actions
    • If (ItemType = Ring of Protection +2) then (set The_Text = Tralala2)
    • If (ItemType = Ring of Protection +3) then (set The_Text = Tralala3)
    • If (ItemType = Ring of Protection +4) then (set The_Text = Tralala4)
The problem is that it always displays that text, which was the first to be displayed in the game when it was first time set by Settings Setter on its very first run.

If you need to examine the map, then I'll post it.

I think you should combine the two triggers... it will work better that way and I think it will remove the bug you encounter...

the last action of the first trigger won't wait until the 2nd trigger is finished....
 
Status
Not open for further replies.
Top