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

Request!

Status
Not open for further replies.
Level 3
Joined
Dec 23, 2011
Messages
40
I am wondering if anyone is kind enough to create this system for me because I do not even know to start it. It is a item system. Before you start telling there are many item systems on this site, let me tell what the item system is like. I want it to be like other systems, except for one characteristic. I want items of certain class-type to replace items of the same class, carried by the unit/hero, when the hero/unit picks up the items.

I will give credits and rep! Thanks for reading this post here.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
something like this?
  • bla bla
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set Temp_class = (Item-class of (Item being manipulated))
      • Set unit_variable = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_class Equal to (Item-class of (Item carried by unit_variable in slot 1))
        • Then - Actions
          • Hero - Drop the item from slot 1 of unit_variable
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_class Equal to (Item-class of (Item carried by unit_variable in slot 2))
        • Then - Actions
          • Hero - Drop the item from slot 2 of unit_variable
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_class Equal to (Item-class of (Item carried by unit_variable in slot 3))
        • Then - Actions
          • Hero - Drop the item from slot 3 of unit_variable
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_class Equal to (Item-class of (Item carried by unit_variable in slot 4))
        • Then - Actions
          • Hero - Drop the item from slot 4 of unit_variable
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_class Equal to (Item-class of (Item carried by unit_variable in slot 5))
        • Then - Actions
          • Hero - Drop the item from slot 5 of unit_variable
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_class Equal to (Item-class of (Item carried by unit_variable in slot 6))
        • Then - Actions
          • Hero - Drop the item from slot 6 of unit_variable
        • Else - Actions
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
I think i found a shorter version of the trigger but dont change it if that other one work
  • Untitled Trigger 001
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set temp_class = (Item-class of (Item being manipulated))
      • Set unit_variable = (Triggering unit)
      • 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
              • temp_class Equal to (Item-class of (Item carried by unit_variable in slot (Integer A)))
            • Then - Actions
              • Hero - Drop (Item carried by unit_variable in slot (Integer A)) from unit_variable
            • Else - Actions
 
Level 13
Joined
Sep 13, 2010
Messages
550
I am wondering if anyone is kind enough to create this system for me because I do not even know to start it. It is a item system. Before you start telling there are many item systems on this site, let me tell what the item system is like. I want it to be like other systems, except for one characteristic. I want items of certain class-type to replace items of the same class, carried by the unit/hero, when the hero/unit picks up the items.

I will give credits and rep! Thanks for reading this post here.

Don't you want it to stack up items and not just drop the previous one?
 
Level 11
Joined
Aug 11, 2009
Messages
594
Darkgrom, the problem with that trigger is that you do not check if it is the item you just picked up that is in the specific slot. Make a variable like "PickedUpItem" and set it to the Last Picked Item. Then with every slot check if the item in that slot is the "PickedUpItem", if it isnt, then check if it has the same item-class as "PickedUpItem" and if it does, then drop it :) that should fix it
 
Level 11
Joined
Aug 11, 2009
Messages
594
First make a variable, for example "pickeditem", which you set to "item being manipulated. Then use the loop trigger posted by darkgrom and in the if function add in à new condition together with the item class check. This new condition should check if "picked item equal to item in slot integer A equal to false".

This should fix it. Hopefully you understand because i cant post triggers at the moment. If not i can help you tomorrow :)
 
Status
Not open for further replies.
Top