[Trigger] Item Upgrade System

Status
Not open for further replies.
Level 3
Joined
Jan 22, 2008
Messages
39
I think i'm not skilled enough for that trigger so i ask you guys.

in my map, my Hero got a Sword on Inventory Slot 1 wich he cant drop or remove.
Now i want if my Hero finds an "Iron Ore" and bring it to the Forge in my Town that he can Upgrade his Sword with that Ore, easily said, the Hero brings an Iron Ore to town, the Ore will be removed from the Inventory and the Sword will be replaced with some stronge one.

some good Idea how to do that?
 
Level 3
Joined
Jan 22, 2008
Messages
39
i think i got the idea how the item upgrade system works basicly, but i dont get it how to set my items to the array first
so for example that "Ironsword lvl1" is set to Item Integer number 1 and "lvl2" to Integer number 2

i just cant find a tutorial how to do that basic thing ^^
 
Level 3
Joined
Jan 22, 2008
Messages
39
okay thw question now is to set my items to array numbers
is there a faster waythen to ceate an item then "set last created item to integer number1"
then create item number 2 and "set last created item to integer number2"

or to drop them on the map and choose it from there to the numbers

is there a directly way in the editor to choose the items from the editor?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
You mean like "Create a item of type X and set it to Item[whatever you want]" ?
I don't know of any way to do that.

Or setting in the object manager "Item X = Variable" ?
Can't.

You can change its level though, or its HP.
Those are 2 ways people a lot of time use to make this kind of systems.
 
Level 3
Joined
Jan 22, 2008
Messages
39
so the best way to set items to aray numbers is to drop them all on the map first and then
go to the trigger editor and pick the items by klicking it from the map
i klick my lvl 1 sword form the map and say its number 2
then i klick on my lvl 2 sword that i droped in a peacefull corner of my map and say its number 2 and so on

is that right?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
No you didn't get it.
Its not a Item variable, its a Item TYPE variable.

Basicly your systme needs to do this things:

If unit has ItemType[(Integer A)] and a Iron Ore then give him ItemType[(Integer A) + 1]

Now the plus 1 there can be changed.
I suggest you to make your system make "+YourItems/ItemLevels" so for example, if you have 10 item types and 3 levels for each (a total of 30 items), you'll give the unit the ItemType[(Integer A) + 30/3], and in this case its +10.
 
Level 3
Joined
Jan 22, 2008
Messages
39
HEURIKA i think i got te basic of my trigger working and i even didnt use ItemTypeInteger and Arrays
I think i didnt do the trigger as you guys would do it, but it works ^^ i was used to create Starcraft maps, that editor was more simple.

  • Testing Crafting Trigger
    • Ereignisse
      • Einheit - A unit enters Forge <gen>
    • Bedingungen
      • ((Triggering unit) is Ein Held) Gleich True
      • (Item-type of (Item carried by (Triggering unit) in slot 6)) Gleich Iron Ore
    • Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Item-type of (Item carried by (Triggering unit) in slot 1)) Gleich Iron Sword L0
        • 'THEN'-Aktionen
          • Gegenstand - Remove (Item carried by (Triggering unit) in slot 1)
          • Gegenstand - Remove (Item carried by (Triggering unit) in slot 6)
          • Held - Create Iron Sword L1 and give it to (Triggering unit)
        • 'ELSE'-Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Item-type of (Item carried by (Triggering unit) in slot 1)) Gleich Iron Sword L1
            • 'THEN'-Aktionen
              • Gegenstand - Remove (Item carried by (Triggering unit) in slot 1)
              • Gegenstand - Remove (Item carried by (Triggering unit) in slot 6)
              • Held - Create Iron Sword L2 and give it to (Triggering unit)
            • 'ELSE'-Aktionen
and so on, this are only 2 of my 440 upgradeable items i want to create and it works!
and dont wonder for words like "Einheit" i live in austria so my editor is in german ;)
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
This works ? then why the hell our "Create item and Give to" didn't work ? DAMD I HATE YOU BLIZZARD !

By the way, you do notice that you'll need to create a ... SUPERMEGAUBER length of code for this... right ?
And even then the players would only be able to work with slot 1 for weapon and 6 for ore.

If only my stupid code won't bug with that "create item" I could make this work for all your items with about 20-25 lines :/
 
Level 3
Joined
Jan 22, 2008
Messages
39
yeah my codes will be freaking long but work
simpliest way is always the best... but it takes much time to write those Trigers for 440 Items ^^

Until someone finds another way for item upgrade Systems i spend my time with writing *g*
 
Level 5
Joined
Jan 15, 2007
Messages
199
HEURIKA i think i got te basic of my trigger working and i even didnt use ItemTypeInteger and Arrays
I think i didnt do the trigger as you guys would do it, but it works ^^ i was used to create Starcraft maps, that editor was more simple.

  • Testing Crafting Trigger
    • Ereignisse
      • Einheit - A unit enters Forge <gen>
    • Bedingungen
      • ((Triggering unit) is Ein Held) Gleich True
      • (Item-type of (Item carried by (Triggering unit) in slot 6)) Gleich Iron Ore
    • Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Item-type of (Item carried by (Triggering unit) in slot 1)) Gleich Iron Sword L0
        • 'THEN'-Aktionen
          • Gegenstand - Remove (Item carried by (Triggering unit) in slot 1)
          • Gegenstand - Remove (Item carried by (Triggering unit) in slot 6)
          • Held - Create Iron Sword L1 and give it to (Triggering unit)
        • 'ELSE'-Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Item-type of (Item carried by (Triggering unit) in slot 1)) Gleich Iron Sword L1
            • 'THEN'-Aktionen
              • Gegenstand - Remove (Item carried by (Triggering unit) in slot 1)
              • Gegenstand - Remove (Item carried by (Triggering unit) in slot 6)
              • Held - Create Iron Sword L2 and give it to (Triggering unit)
            • 'ELSE'-Aktionen
and so on, this are only 2 of my 440 upgradeable items i want to create and it works!
and dont wonder for words like "Einheit" i live in austria so my editor is in german ;)

Sorry, but the rules state that the Hive is english only with the exception of Private Messages, and whispers in the chat.
 
Status
Not open for further replies.
Top