1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Ride into the sunset with the 32nd Modeling Contest.
    Dismiss Notice
  4. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  5. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  6. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Adding Inventory Slots

Discussion in 'Triggers & Scripts' started by Lee_Go, Feb 21, 2010.

  1. Lee_Go

    Lee_Go

    Joined:
    May 1, 2009
    Messages:
    156
    Resources:
    0
    Resources:
    0
    Hi, I'm trying to make it so when u pick up the item Backpack, you gain 3 more inventory slots.

    Problem: When you remove or add the new ability that has Unit Inventory [3 slots] to Unit Inventory[6 slots] it removes all the items ur holding...
    How do I make it so it checks if the unit is holding w/e items in the other 2 slots and recreate those items in the same slots they were in after the unit gains Unit Inventory [6 slots]

    (i could try and explain it better if someone doesnt understand)
     
  2. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,128
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
  3. Lee_Go

    Lee_Go

    Joined:
    May 1, 2009
    Messages:
    156
    Resources:
    0
    Resources:
    0
    Urg, I'll look at the 2 maps but I don't want new inventories, I just want to increase current inventory to more slots, maybe thats what you meant but wasn't sure, thank you though.

    EDIT: and I'm not sure how to get those template maps to work for me, they're in jass and so i can't copy and paste it cus its not what I want, being in jass i can't change it (i dont know jass).
     
  4. skamigo

    skamigo

    Joined:
    May 22, 2009
    Messages:
    265
    Resources:
    4
    Maps:
    4
    Resources:
    4
    is the adding/removing off slots triggered? If it is you just have to write in the beginning of the remove trigger set ItemType[1/2/3]=item type of item carried by triggering unit in slot 4/5/6, and create itemtype[1/2/3] for Hero
     
  5. overload119

    overload119

    Joined:
    May 28, 2007
    Messages:
    362
    Resources:
    3
    Skins:
    1
    Tools:
    1
    Maps:
    1
    Resources:
    3
    Before you add the ability, save all the items in variables. Then add the ability, then add items again.
     
  6. Lee_Go

    Lee_Go

    Joined:
    May 1, 2009
    Messages:
    156
    Resources:
    0
    Resources:
    0
    overload119, can you give me an idea on how to record the items in the slots to variables?

    (ty for responses)

    Addition..
    There are only 2 other items that are set to be held in item slot 1 and 2 and can be dropped but they go back to their respective slots when picked up again. I just simply have to have it so when the character picks up this 3rd item that is set for slot 3, it adds 3 slots as well as keeping the 1 or 2 other items he's holding, the other thing is if the unit is carrying only the item "Pistol" and its always in the second slot, when he gains the 3 more slots the item "Pistol" has to return to slot 2.
     
    Last edited: Feb 23, 2010