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

How can I find the Hero inventory slot?

Status
Not open for further replies.
Level 2
Joined
Jan 6, 2020
Messages
12
I want to craft an item and add it to the hero's 1st inventory slot only. Or similarly I want to add it to the 2nd inventory slot even if 1 is empty.

Is there a simple way to do this?
 
Level 2
Joined
Jan 6, 2020
Messages
12
I want to make 4 different items that can replace the 1st, 2nd, 3rd and 4th items in the Hero inventory. Each item will be placed in its own slot after the skill is used.
I think it wouldn't be a problem because it is a single player game. But I don't know if I'll have a problem.
 
Level 2
Joined
Jan 6, 2020
Messages
12
aaand... now ;
it doesn't work.

  • ST 02
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Silah Tak
      • (Triggering unit) Equal to SelectedHero
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by SelectedHero in slot (Integer A))) Equal to Silahı kullan
              • SilahTakiliMi Equal to False
            • Then - Actions
              • Set SilahTakiliMi = True
              • Item - Make (Item carried by SelectedHero of type Silah Slotu) Droppable
              • Item - Remove (Item carried by SelectedHero of type Silah Slotu)
              • Item - Remove (Item carried by SelectedHero of type Silahı kullan)
              • For each (Integer B) from 1 to 5, do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SilahSVY Equal to (Integer B)
                    • Then - Actions
                      • Hero - Create Silah[SilahSVY] and give it to (Triggering unit)
                      • Unit - Order SelectedHero to move (Last created item) to inventory slot 1
                      • Item - Make (Last created item) Undroppable
                    • Else - Actions
            • Else - Actions
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SilahTakiliMi Equal to True
              • (Item-type of (Item carried by SelectedHero in slot 1)) Equal to Silah[(Integer A)]
            • Then - Actions
              • Set SilahTakiliMi = False
              • Item - Remove (Item carried by SelectedHero of type Silah[(Integer A)])
              • Hero - Create Silah Slotu and give it to (Triggering unit)
              • Unit - Order SelectedHero to move (Last created item) to inventory slot 1
              • Item - Make (Last created item) Undroppable
              • Hero - Create Silahı kullan and give it to (Triggering unit)
            • Else - Actions
EDİT:


Ok, works fine now:D

  • ST 02
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Silah Tak
      • (Triggering unit) Equal to SelectedHero
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item carried by SelectedHero in slot 1)) Equal to Silah Slotu
          • SilahTakiliMi Equal to False
        • Then - Actions
          • Set SilahTakiliMi = True
          • Item - Make (Item carried by SelectedHero of type Silah Slotu) Droppable
          • Item - Remove (Item carried by SelectedHero of type Silah Slotu)
          • Item - Remove (Item carried by SelectedHero of type Silahı kullan)
          • For each (Integer A) from 1 to 10, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SilahSVY Equal to (Integer A)
                • Then - Actions
                  • Hero - Create Silah[SilahSVY] and give it to (Triggering unit)
                  • Unit - Order SelectedHero to move (Last created item) to inventory slot 1
                  • Item - Make (Last created item) Undroppable
                • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by SelectedHero in slot 1)) Equal to Silah[SilahSVY]
              • SilahTakiliMi Equal to True
            • Then - Actions
              • Set SilahTakiliMi = False
              • Item - Remove (Item carried by SelectedHero of type Silah[SilahSVY])
              • Hero - Create Silah Slotu and give it to (Triggering unit)
              • Unit - Order SelectedHero to move (Last created item) to inventory slot 1
              • Item - Make (Last created item) Undroppable
              • Hero - Create Silahı kullan and give it to (Triggering unit)
            • Else - Actions
 
Last edited:
Status
Not open for further replies.
Top