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

Questions on Items (2)

Status
Not open for further replies.
Level 7
Joined
May 21, 2009
Messages
289
Ok so I have two things I need done...
1st one...How do you make it so the items you have can only be acessed by you (as a player) in the game, and noone else can use or take them (like an ownership thing)

2nd one...Is it possible to put Item Sets that units drop on death to units in general, like to give an item set to every unit of that type on the map, even if it is created during the game?

Thanks! 2nd one is most important....
 
Level 9
Joined
Oct 22, 2006
Messages
599
2. Item Sets for units created during the game cannot be created with object editor, so I'm using Triggers.
  • Item Drop Set
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Satyr
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 3) Equal to 1
            • Then - Actions
              • Set tmpPoint = (Center of (Playable map area))
              • Item - Create Tome of Experience at tmpPoint
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 3) Equal to 2
                • Then - Actions
                  • Set tmpPoint = (Center of (Playable map area))
                  • Item - Create Manual of Health at tmpPoint
                • Else - Actions
                  • Set tmpPoint = (Center of (Playable map area))
                  • Item - Create Tome of Power at tmpPoint
        • Else - Actions
      • Custom script: call RemoveLocation(udg_tmpPoint)
PS: I'll answer 1. too

EDIT: The trigger I posted is for a few items. If you need a lot of items this should work better:

  • Item Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set ItemDrop[1] = Potion of Mana
      • Set ItemDrop[2] = Potion of Healing
      • Set ItemDrop[3] = Potion of Lesser Invulnerability
      • Set ItemDrop[4] = Scroll of Healing
      • Set ItemDrop[5] = Scroll of Mana
      • Set ItemDrop[6] = Scroll of Protection
      • Set ItemDrop[7] = Scroll of Regeneration
      • Set ItemDrop[8] = Wand of Negation
      • Set ItemDrop[9] = Potion of Greater Healing
      • Set ItemDrop[10] = Potion of Greater Mana
      • Set ItemDrop[11] = Potion of Invulnerability
      • Set ItemDrop[12] = Potion of Restoration
      • Set ItemDrop[13] = Red Drake Egg
      • Set ItemDrop[14] = Scroll of Restoration
      • Set ItemDrop[15] = Scroll of the Beast
      • Set ItemDrop[16] = Spiked Collar
      • Set ItemDrop[17] = Stone Token
      • Set ItemDrop[18] = Talisman of the Wild
      • Set ItemDrop[19] = Wand of Illusion
      • Set ItemDrop[20] = Wand of Lightning Shield
      • Set ItemDrop[21] = Wand of the Wind
      • Set ItemDrop[22] = Clarity Potion
      • Set ItemDrop[23] = Healing Salve
      • Set ItemDrop[24] = Lesser Clarity Potion
      • Set ItemDrop[25] = Ankh of Reincarnation

  • Item Drop
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
    • Actions
      • Set Point = (Position of (Dying unit))
      • Item - Create ItemDrop[(Random integer number between 1 and 25)] at Point
      • Custom script: call RemoveLocation(udg_Point)
- Make an "Item-type" variable, make it an array and set the number to how many items you want to have a chance to drop. Also a "point" variable is needed.



EDIT2: Answered to 1.

These triggers are not tested, so I'm waiting for your comment.
  • Item Own
    • Events
      • Unit - A unit Loses an item
    • Conditions
    • Actions
      • Item - Set the custom value of (Item being manipulated) to (Player number of (Owner of (Triggering unit)))
  • Pick Up Not Owned
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Custom value of (Item being manipulated)) Not equal to 0
          • (Custom value of (Item being manipulated)) Not equal to (Player number of (Owner of (Triggering unit)))
    • Actions
      • Hero - Drop (Item being manipulated) from (Triggering unit)
 
Last edited:
Level 7
Joined
May 21, 2009
Messages
289
---------------------------------->0.0<-----------------------------------------
WOW WOW WOW WOW WOW WOW WOW WOW WOW WOW WOW WOW WOW WOW

Okay sooo thats alot of triggers and varibles and triggering crap and testing lol

In order for me to do the item drop system you decribed (which seems as if it will work) I need explaination on what kind of variables those are and what there values should be I AM A HUGE noob at variables...lol
 
Level 7
Joined
May 21, 2009
Messages
289
okay so if I wanted to change this for the level of the creep would I have to create seperate triggers and seperate variables? So when a low level creep is attacked it doesnt drop super powerful items- also can this trigger be modified to make it so there is a chance of no item dropping? Thanks!
 
Level 7
Joined
May 21, 2009
Messages
289
okay

1ST- I need to know if I need to make a seperate trigger system like this for every item group set i need to make

2ND-Can the system be modified so that the system has a chance to drop no items

3RD-Can the system be modified so that after a period of time the item that was dropped disapears/ or is removed from game?

I cant really start copying your trigger until I know how these fit ^
 
Level 9
Joined
Oct 22, 2006
Messages
599
okay

1ST- I need to know if I need to make a seperate trigger system like this for every item group set i need to make
- Yes, If you use "trigger 1" [HIGHLY NOT RECOMMENDED] and No, if you use the "trigger 2". If you choose "trigger 2" you will need to set up the items from the start and add If/Then/Else for each unit you want the item to drop (Not as hard as it sounds anyway).

- I believe that's why many RPG's have a drop-system for standard items and for standard units.

2ND-Can the system be modified so that the system has a chance to drop no items
- Yes, easily. But the modifications should be carefull. If you need any help on that PM me or reach me through MSN (Check my profile).

3RD-Can the system be modified so that after a period of time the item that was dropped disapears/ or is removed from game?

I cant really start copying your trigger until I know how these fit ^

- That would require a new trigger, it's not included in the system, but Yes it can be done.

- Awaiting for your reply:wink:.
 
Level 7
Joined
May 21, 2009
Messages
289
okay so I put your trigger in my map; works good but my idea doesnt work, it glitches, I need the items to be removed after a set period-So far I have made 4 modified versions of your item drop system

Oh and the item ownership thing doesnt work, when I pick up the item it drops automaticly
 
Status
Not open for further replies.
Top