HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Ok, Replacing Items in a Hero's Inventory... How?!

02-29-2004, 01:31 AM#1
linkmaster23
This is taunting me like crazy!! How do you do it?? I have tried to remove the item(works) then how do I put it back in the slow originally was?? Also, this is for a RPG based systen, when you get enough kills, your spell upgrades, but that would take tons of triggers and if/then/elses, you someone out there please teach me a work around this pain?? Thanks for all your help.
02-29-2004, 03:39 AM#2
RaeVanMorlock
Some more details would be helpful....

If you're simply adding, removing items: use Hero - Create Item For Hero and Hero - Drop Item From Hero [then Remove it, if need be] (if you haven't the items set to variables, then use Item Carried by Hero of Type, which will select the first item of the specified item-type).

If you need to keep track of what slot the item is in then use a Foor loop from 1 to 6 and check the slot for the item, then remove it and add the new one into the same index.
02-29-2004, 03:49 AM#3
Transcendence
He means he wants to remove the item, and then for a new item to appear in the same slot as the old one was in.
02-29-2004, 04:11 AM#4
weaaddar
If you check out DT4a or my backpack demo you'll see I do this "trick". I'll give you a hint a timer of zero.
02-29-2004, 04:19 AM#5
Transcendence
...
02-29-2004, 04:23 AM#6
RaeVanMorlock
Okay, that last post was completely pointless. And since my suggestion doesn't seem to be enough, let me reiterate:

Code:
For Integer A from 1 to 6
  Loop - Actions
    If-Then-Else Thingy-ma-bobber
      Conditions:
        Item-Type of (Item in Inventory Slot (Integer A)) is equal to TypeOfItemToUpgrade
      Actions:
        Set OldItem = Item in Inventory Slot (Integer A)
         Drop OldItem
         Remove OldItem
         Create NewItem in Invetory Slot (Integer A) for UnitThatLeveled
          Skip Remaining Actions
02-29-2004, 04:55 AM#7
Transcendence
I know this wasnt my original post but it has to do with something for my game. What kind of trigger is the variable used in the trigger u last posted?
02-29-2004, 06:12 AM#8
RaeVanMorlock
Quote:
Originally posted by OperationFT
I know this wasnt my original post but it has to do with something for my game. What kind of trigger is the variable used in the trigger u last posted?


.... huh?

TypeOfItemToUpgrade is Item-Type
OldItem is Item
NewItem is Item
UnitThatLeveled is Unit
02-29-2004, 06:27 AM#9
Transcendence
Oh, ok thanks
02-29-2004, 01:53 PM#10
linkmaster23
Operation FT, Get rid of your avatar now. WHY CANT PEOPLE THINK OF THIER OWN AVATARS!!! First Legolas Archer... Lord Vexorian had to change his... now you?!?!?!?