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

An Item Won't Disappear

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,602
Hello.

I have a system that combines flowers and a flask together to create a powerful potion. The system currently bugs and I can't find what's wrong. At the moment, always a flower is removed / charge goes 1 down. But the flask never loses a charge / won't disappear. I wonder what's wrong?

The one who can help will have some rep & credits.

  • Random Potion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to 5Random Item (Alchemist) (BOTH)
    • Actions
      • Set TempUnit = (Casting unit)
      • Set AlchemistUnit = (Casting unit)
      • Set ItemType[1] = Anglalor
      • Set ItemType[2] = Triangle Flask
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Charges remaining in (Item carried by TempUnit of type ItemType[1])) Greater than or equal to 1
          • (Charges remaining in (Item carried by TempUnit of type ItemType[2])) Greater than or equal to 1
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Charges remaining in (Item carried by TempUnit of type ItemType[1])) Greater than 1
            • Then - Actions
              • Item - Set charges remaining in (Item carried by TempUnit of type ItemType[1]) to ((Charges remaining in (Item carried by TempUnit of type ItemType[1])) - 1)
            • Else - Actions
              • Item - Remove (Item carried by TempUnit of type ItemType[1])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Charges remaining in (Item carried by TempUnit of type ItemType[2])) Greater than 1
            • Then - Actions
              • Item - Set charges remaining in (Item carried by TempUnit of type ItemType[2]) to ((Charges remaining in (Item carried by TempUnit of type ItemType[2])) - 1)
            • Else - Actions
              • Item - Remove (Item carried by TempUnit of type ItemType[2])
          • Special Effect - Create a special effect attached to the origin of TempUnit using Abilities\Spells\NightElf\MoonWell\MoonWellCasterArt.mdl
          • Special Effect - Destroy (Last created special effect)
          • Trigger - Run Random Potion 2 <gen> (checking conditions)
        • Else - Actions
          • Set ItemType[1] = Bahmn
          • Set ItemType[2] = Triangle Flask
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Charges remaining in (Item carried by TempUnit of type ItemType[1])) Greater than or equal to 1
              • (Charges remaining in (Item carried by TempUnit of type ItemType[2])) Greater than or equal to 1
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Charges remaining in (Item carried by TempUnit of type ItemType[1])) Greater than 1
                • Then - Actions
                  • Item - Set charges remaining in (Item carried by TempUnit of type ItemType[1]) to ((Charges remaining in (Item carried by TempUnit of type ItemType[1])) - 1)
                • Else - Actions
                  • Item - Remove (Item carried by TempUnit of type ItemType[1])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Charges remaining in (Item carried by TempUnit of type ItemType[2])) Greater than 1
                • Then - Actions
                  • Item - Set charges remaining in (Item carried by TempUnit of type ItemType[2]) to ((Charges remaining in (Item carried by TempUnit of type ItemType[2])) - 1)
                • Else - Actions
                  • Item - Remove (Item carried by TempUnit of type ItemType[2])
              • Special Effect - Create a special effect attached to the origin of TempUnit using Abilities\Spells\NightElf\MoonWell\MoonWellCasterArt.mdl
              • Special Effect - Destroy (Last created special effect)
              • Trigger - Run Random Potion 2 <gen> (checking conditions)
            • Else - Actions
              • Set ItemType[1] = Monthana
              • Set ItemType[2] = Triangle Flask
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Charges remaining in (Item carried by TempUnit of type ItemType[1])) Greater than or equal to 1
                  • (Charges remaining in (Item carried by TempUnit of type ItemType[2])) Greater than or equal to 1
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Charges remaining in (Item carried by TempUnit of type ItemType[1])) Greater than 1
                    • Then - Actions
                      • Item - Set charges remaining in (Item carried by TempUnit of type ItemType[1]) to ((Charges remaining in (Item carried by TempUnit of type ItemType[1])) - 1)
                    • Else - Actions
                      • Item - Remove (Item carried by TempUnit of type ItemType[1])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Charges remaining in (Item carried by TempUnit of type ItemType[2])) Greater than 1
                    • Then - Actions
                      • Item - Set charges remaining in (Item carried by TempUnit of type ItemType[2]) to ((Charges remaining in (Item carried by TempUnit of type ItemType[2])) - 1)
                    • Else - Actions
                      • Item - Remove (Item carried by TempUnit of type ItemType[2])
                  • Special Effect - Create a special effect attached to the origin of TempUnit using Abilities\Spells\NightElf\MoonWell\MoonWellCasterArt.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Trigger - Run Random Potion 2 <gen> (checking conditions)
                • Else - Actions
                  • Set ItemType[1] = Riflo
                  • Set ItemType[2] = Triangle Flask
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Charges remaining in (Item carried by TempUnit of type ItemType[1])) Greater than or equal to 1
                      • (Charges remaining in (Item carried by TempUnit of type ItemType[2])) Greater than or equal to 1
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Charges remaining in (Item carried by TempUnit of type ItemType[1])) Greater than 1
                        • Then - Actions
                          • Item - Set charges remaining in (Item carried by TempUnit of type ItemType[1]) to ((Charges remaining in (Item carried by TempUnit of type ItemType[1])) - 1)
                        • Else - Actions
                          • Item - Remove (Item carried by TempUnit of type ItemType[1])
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Charges remaining in (Item carried by TempUnit of type ItemType[2])) Greater than 1
                        • Then - Actions
                          • Item - Set charges remaining in (Item carried by TempUnit of type ItemType[2]) to ((Charges remaining in (Item carried by TempUnit of type ItemType[2])) - 1)
                        • Else - Actions
                          • Item - Remove (Item carried by TempUnit of type ItemType[2])
                      • Special Effect - Create a special effect attached to the origin of TempUnit using Abilities\Spells\NightElf\MoonWell\MoonWellCasterArt.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Trigger - Run Random Potion 2 <gen> (checking conditions)
                    • Else - Actions
                      • Set ItemType[1] = Lakhnos
                      • Set ItemType[2] = Triangle Flask
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Charges remaining in (Item carried by TempUnit of type ItemType[1])) Greater than or equal to 1
                          • (Charges remaining in (Item carried by TempUnit of type ItemType[2])) Greater than or equal to 1
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Charges remaining in (Item carried by TempUnit of type ItemType[1])) Greater than 1
                            • Then - Actions
                              • Item - Set charges remaining in (Item carried by TempUnit of type ItemType[1]) to ((Charges remaining in (Item carried by TempUnit of type ItemType[1])) - 1)
                            • Else - Actions
                              • Item - Remove (Item carried by TempUnit of type ItemType[1])
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Charges remaining in (Item carried by TempUnit of type ItemType[2])) Greater than 1
                            • Then - Actions
                              • Item - Set charges remaining in (Item carried by TempUnit of type ItemType[2]) to ((Charges remaining in (Item carried by TempUnit of type ItemType[2])) - 1)
                            • Else - Actions
                              • Item - Remove (Item carried by TempUnit of type ItemType[2])
                          • Special Effect - Create a special effect attached to the origin of TempUnit using Abilities\Spells\NightElf\MoonWell\MoonWellCasterArt.mdl
                          • Special Effect - Destroy (Last created special effect)
                          • Trigger - Run Random Potion 2 <gen> (checking conditions)
                        • Else - Actions
                          • Game - Display to (All players) for 6.00 seconds the text: |c00FF0303You don't...
Anglalor.jpg

TriangleFlask.jpg
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
OT:

Out of curiosity, how did you get that color scheme for your WE?

The pink annoys me.

Back on topic:

Now, I didn't look through more than a cursory glace at the trigger. This is going to sound silly, but, oftentimes it's the simple things that are the issue.

Is the flask being referred to correctly when trying to remove it?
Did you forget to set something and/or set something incorrectly?

We all make simple mistakes from time to time (Myself more than most!). Although, these probably won't help... After a second glance, it looks like the above questions are irrelevant, so I'm not sure. The only other thing I can think of is it's something with the OE...
 
Level 37
Joined
Aug 14, 2006
Messages
7,602
I couldn't figure out why you were having that problem but I can make a much simpler and more efficient system for you when I get home if you haven't solved the problem by then

Sure, but then you have to use exactly same variables.

OT:

Out of curiosity, how did you get that color scheme for your WE?

The pink annoys me.

Back on topic:

Now, I didn't look through more than a cursory glace at the trigger. This is going to sound silly, but, oftentimes it's the simple things that are the issue.

Is the flask being referred to correctly when trying to remove it?
Did you forget to set something and/or set something incorrectly?

We all make simple mistakes from time to time (Myself more than most!). Although, these probably won't help... After a second glance, it looks like the above questions are irrelevant, so I'm not sure. The only other thing I can think of is it's something with the OE...

I don't know how I have that color. Kitabatake added it one day when he was at my home and I never changed it back because I don't see it to be a problem.

I checked basic things many times but I can't find anything wrong...
 
I don't know how I have that color. Kitabatake added it one day when he was at my home and I never changed it back because I don't see it to be a problem.

No that's not one of the changes. I changed trigger editor colors to highlight debug messages and such. Blue is default color for custom campaign editor data, pink for regular custom map data.
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
Yeah, Aero, it would seem so. It's worth a shot, though.

Thanks, Kita. I guess when I touch the OE, I'd have figured it out eventually.
 
Level 37
Joined
Aug 14, 2006
Messages
7,602
No that's not one of the changes. I changed trigger editor colors to highlight debug messages and such. Blue is default color for custom campaign editor data, pink for regular custom map data.

Aha, well, whatever. I don't care about colors, I just want this problem to be fixed, it's the third last bug before next version of the campaign...
 
Level 37
Joined
Aug 14, 2006
Messages
7,602
No, vJASS is not alright, campaigns doesn't work with vJASS. Also it would be better to make it with GUI than JASS because I don't understand a thing about JASS. However, if you do it without any bugs then JASS is allowed... But I'll hunt you forever if I find bugs. :p

  • Random Potion 2
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of AlchemistUnit) Greater than or equal to 1
          • (Hero level of AlchemistUnit) Less than 10
        • Then - Actions
          • Set Random = (Random integer number between 1 and 2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random Equal to 1
            • Then - Actions
              • Hero - Create Small Heal Potion and give it to AlchemistUnit
            • Else - Actions
              • Hero - Create Small Mana Potion and give it to AlchemistUnit
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of AlchemistUnit) Greater than or equal to 10
          • (Hero level of AlchemistUnit) Less than 20
        • Then - Actions
          • Set Random = (Random integer number between 1 and 2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random Equal to 1
            • Then - Actions
              • Hero - Create Moderate Heal Potion and give it to AlchemistUnit
            • Else - Actions
              • Hero - Create Moderate Mana Potion and give it to AlchemistUnit
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of AlchemistUnit) Greater than or equal to 20
          • (Hero level of AlchemistUnit) Less than 30
        • Then - Actions
          • Set Random = (Random integer number between 1 and 3)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random Equal to 1
            • Then - Actions
              • Hero - Create Moderate Heal Potion and give it to AlchemistUnit
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Random Equal to 2
                • Then - Actions
                  • Hero - Create Moderate Mana Potion and give it to AlchemistUnit
                • Else - Actions
                  • Hero - Create Minor Restoration Potion and give it to AlchemistUnit
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of AlchemistUnit) Greater than or equal to 30
          • (Hero level of AlchemistUnit) Less than 40
        • Then - Actions
          • Set Random = (Random integer number between 1 and 3)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random Equal to 1
            • Then - Actions
              • Hero - Create Huge Heal Potion and give it to AlchemistUnit
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Random Equal to 2
                • Then - Actions
                  • Hero - Create Huge Mana Potion and give it to AlchemistUnit
                • Else - Actions
                  • Hero - Create Minor Restoration Potion and give it to AlchemistUnit
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of AlchemistUnit) Greater than or equal to 40
          • (Hero level of AlchemistUnit) Less than 50
        • Then - Actions
          • Set Random = (Random integer number between 1 and 2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random Equal to 1
            • Then - Actions
              • Hero - Create Moderate Restoration Potion and give it to AlchemistUnit
            • Else - Actions
              • Hero - Create Hero Drink and give it to AlchemistUnit
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of AlchemistUnit) Greater than or equal to 50
        • Then - Actions
          • Set Random = (Random integer number between 1 and 2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random Equal to 1
            • Then - Actions
              • Hero - Create Huge Restoration Potion and give it to AlchemistUnit
            • Else - Actions
              • Hero - Create Elixir and give it to AlchemistUnit
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AlchemistUnit Equal to AAAPhodom
        • Then - Actions
          • Set Resource__ALCLVL_P = (Resource__ALCLVL_P + 1)
        • Else - Actions
          • Set Resource__ALCLVL_G = (Resource__ALCLVL_G + 1)
      • Set TempUnit = No unit
      • Set AlchemistUnit = No unit
Actually I think you don't need this trigger, just run it from that other trigger...

EDIT: I just figured out it's not this system but it's other system that is bugging. Thanks for everyone who tried to help. +rep

Thread can be closed.
 
Last edited:
Status
Not open for further replies.
Top