• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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