• 🏆 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!

Simulation of Key of the Three Moons

Status
Not open for further replies.
Level 3
Joined
Jul 19, 2014
Messages
38
Hello everyone, I have been trying to simulate a progressive fusion of items, just like the Key of the Three Moons from the campaings of warcraft 3 reign of chaos. I know how to combinate different items to get 1, but my problem is to combinate 5 of the SAME item to create 1. Here is my trigger:
  • Anillo 1
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Hero manipulating item) has an item of type Anillo Purificado) Equal to True
    • Actions
      • Set Heroitem = (Hero manipulating item)
      • Set Numeroanillo = 1
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Anillo Purificado
        • Then - Actions
          • Set Numeroanillo = (Numeroanillo + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Numeroanillo Equal to 2
            • Then - Actions
              • Item - Remove (Item being manipulated)
              • Item - Remove (Item carried by Heroitem of type Anillo Purificado)
              • Hero - Create Anillo Maestro and give it to Heroitem
            • Else - Actions
        • Else - Actions
This trigger is supposed to create a single ring lvl 2 from 2 rings lvl 1. But it creates the lvl 2 ring when the hero picks just 1 ring lvl 1. I think the problem is that it doesnt recognize the condition of the hero that needs to have at least 1 ring. Like I said before, it should work like the Key of the Three moon, when you take 1 key, you get a key lvl 1, when you take 2 keys, you get 1 key lvl 2, and when you take the 3 keys, you get the Key of the Three Moons. Sorry for the long text, I tried to explain everything, if you need more information, i will give it, please help me to deal with this problem!!
 
Level 12
Joined
Jan 2, 2016
Messages
973
It's because you set the Numeroaillo to 1 in the begining of the trigger and later you add +1 to it, thus making it 2, and causing the 2-nd condition to be true.
If you remove the "Set Numeroanillo = 1" from the begining of your trigger it will work.
But it will work for one player only, and only once. You need to make it an array, if you want multiple players to be able to make this item, and you need to set Numeroanillo[PlayerNumber] to 0 after creating the Anillo item, if you want each player to be able to create it more than 1-ce.
 
Status
Not open for further replies.
Top