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

Item System

Status
Not open for further replies.
Level 9
Joined
Aug 1, 2008
Messages
453
Im am trying to make a system that follows these rules. Can anyone help me?

- You can turn a disabled item to a enabled item. (Only disabled items have a usable ability)
- You can only have 1 enabled item at a time.
- (kinda same as last one) When you enable a disabled weapon it disables all enabled weapons.
- Enabled and Disabled weapons are set to variables. EX) Weapon "A's" Enable form is set to "EnabledWeapon[1]" and the disabled form is set to "DisabledWeapon[1]"
- Has to be able to work for multiple items.

Would +rep if anyone can help me. This is my current trigger that doesn't work... :(

  • Only 1 Enabled
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Itt_Weapon_Disabled[1]
          • (Item-type of (Item being manipulated)) Equal to Itt_Weapon_Disabled[2]
          • (Item-type of (Item being manipulated)) Equal to Itt_Weapon_Disabled[3]
          • (Item-type of (Item being manipulated)) Equal to Itt_Weapon_Disabled[4]
          • (Item-type of (Item being manipulated)) Equal to Itt_Weapon_Disabled[5]
          • (Item-type of (Item being manipulated)) Equal to Itt_Weapon_Disabled[6]
          • (Item-type of (Item being manipulated)) Equal to Itt_Weapon_Disabled[7]
          • (Item-type of (Item being manipulated)) Equal to Itt_Weapon_Disabled[8]
          • (Item-type of (Item being manipulated)) Equal to Itt_Weapon_Disabled[9]
          • (Item-type of (Item being manipulated)) Equal to Itt_Weapon_Disabled[10]
    • Actions
      • -------- Disabled all weapons --------
      • For each (Integer A) from 1 to Int_Weapontypes, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Hero manipulating item) has an item of type Itt_Weapon[(Integer A)]) Equal to True
            • Then - Actions
              • Item - Remove (Item carried by (Hero manipulating item) of type Itt_Weapon[(Integer A)])
              • Set Poi_Temp[5] = (Position of (Hero manipulating item))
              • Item - Create Itt_Weapon_Disabled[(Integer A)] at Poi_Temp[5]
              • Hero - Give (Last created item) to (Hero manipulating item)
            • Else - Actions
      • -------- Changes the used weapon into a enabled one --------
      • For each (Integer A) from 1 to Int_Weapontypes, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to Itt_Weapon_Disabled[(Integer A)]
            • Then - Actions
              • Item - Remove (Item being manipulated)
              • Set Poi_Temp[3] = (Center of (Playable map area))
              • Item - Create Itt_Weapon[(Integer A)] at Poi_Temp[6]
              • Hero - Give (Last created item) to (Hero manipulating item)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_Poi_Temp[5])
      • Custom script: call RemoveLocation(udg_Poi_Temp[6])
Thanks for all your help and time
 
Level 9
Joined
Dec 17, 2008
Messages
312
Can you explain how it doesn't work a bit more?

Like ; does one side of the system work where you can disable an item but can't enable it?

I'm trying to locate the source of the issue for it not working at all, and all I can identify so far is that you only have conditions checking for the use of a Disabled Weapon, in which if a player uses an Enabled weapon to disable it nothing would happen. I assume you have another trigger for this? If not, this could be a problem.

- This was just from a quick glance. :grin:
 
Level 9
Joined
Aug 1, 2008
Messages
453
Um ok. Basically in this system you can only use the "disabled" items. When you use them they become enabled, and to disable the "enabled" item you must enabled a different item. Ill try to explain using a example. A=Enabled, B=Disabled, and current Enabled item =c. Lets say in your inventory you have 3 "disabled items" and 1 "enabled item" If you use 1 of your B items it would disable A,C

Does that make sense? lol
 
Level 9
Joined
Dec 17, 2008
Messages
312
Um ok. Basically in this system you can only use the "disabled" items. When you use them they become enabled, and to disable the "enabled" item you must enabled a different item. Ill try to explain using a example. A=Enabled, B=Disabled, and current Enabled item =c. Lets say in your inventory you have 3 "disabled items" and 1 "enabled item" If you use 1 of your B items it would disable A,C

Does that make sense? lol

That's now quite what I was asking - I meant, does the trigger you currently have work at all, even in the slightest way?
 
Status
Not open for further replies.
Top