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 havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. 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.

Item System

Discussion in 'World Editor Help Zone' started by Shendoo2, Oct 7, 2009.

  1. Shendoo2

    Shendoo2

    Joined:
    Aug 1, 2008
    Messages:
    464
    Resources:
    0
    Resources:
    0
    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
     
  2. XenoStalker

    XenoStalker

    Joined:
    Dec 17, 2008
    Messages:
    294
    Resources:
    3
    Icons:
    1
    Maps:
    2
    Resources:
    3
    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:
     
  3. Shendoo2

    Shendoo2

    Joined:
    Aug 1, 2008
    Messages:
    464
    Resources:
    0
    Resources:
    0
    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
     
  4. XenoStalker

    XenoStalker

    Joined:
    Dec 17, 2008
    Messages:
    294
    Resources:
    3
    Icons:
    1
    Maps:
    2
    Resources:
    3
    That's now quite what I was asking - I meant, does the trigger you currently have work at all, even in the slightest way?
     
  5. Shendoo2

    Shendoo2

    Joined:
    Aug 1, 2008
    Messages:
    464
    Resources:
    0
    Resources:
    0
    I fixed the problem. I had to set the variables before i did the loop. I dunno why that wouldn't make it work but it does now :)

    +rep for trying to help =D