• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Duplicate item trigger

Status
Not open for further replies.
Level 2
Joined
Jul 27, 2004
Messages
6
How would I make it so a hero cannot have 2 of the same type of items, like 2 swords or 2 breastplates.
 
Level 2
Joined
Jul 27, 2004
Messages
17
I think maybe you should just fiddle with triggers. Now your starting to wish you could open angel of death!
 
Level 5
Joined
Jul 11, 2004
Messages
183
dylan140 said:
I think maybe you should just fiddle with triggers. Now your starting to wish you could open angel of death!

ehheeh Yep i could help him but, i promised to myself that i only helped once and i helped already, im makin a new map with cool triggers than FF open and my other map Angel Of Death, if you need help about those kind of triggers, you have to learn yourself, because its hard to explain and hard for you to understand on Forum, you even go ask UndeadBuggies that owns FF open, he never answered to anyone about triggers like angel of death and ff open, i know UndeadBuggie spended lots of time to figured out those triggers, and so did i ?, well i forgot the guy name i helped him with these triggers, but keep postin you get have someone else to help you :) sorry ..!
 
Level 8
Joined
Apr 3, 2004
Messages
507
If there's only one item of each type, then the basic concept that you want to have is: whenever a hero picks up an item, check to see if he already has one. If he does, drop the item he picked up.

However, if you have multiple "breastplate"-type items, you'll want to make sets of items, and whenever an item is picked up, see if he as any of the set of items in his inventory, intead of just the one.

Fairly basic idea. Now get implementing!
 
Level 5
Joined
Jul 11, 2004
Messages
183
Panto said:
If there's only one item of each type, then the basic concept that you want to have is: whenever a hero picks up an item, check to see if he already has one. If he does, drop the item he picked up.

However, if you have multiple "breastplate"-type items, you'll want to make sets of items, and whenever an item is picked up, see if he as any of the set of items in his inventory, intead of just the one.

Fairly basic idea. Now get implementing!

sets items, dublicated items, multiple items, multiple damage, its not that simple like you say bro, this will make you play wit world edit for awhile to make it work perpect,
 
Level 5
Joined
Jun 21, 2004
Messages
148
@ randym4a1: why would you post saying you cant help?
@ bloop: have a unit/item group if possible equal [blah] and maybe have a value for each armor piece equal 0, and if a unit picks up say helm of blah set p1helm = 1, then if p1helm equal 1 make [unit] unable to pick up an item from [blah]

sorry im not in depth and i dont know if you can have an item group, but if it helps at all im satisfied.

p.s. my editor is being screwey today so i cant check it out first hand
 
Level 7
Joined
Jul 30, 2004
Messages
451
give each 'class' of items a different level (u could differentiate a different way, its up to u)

Code:
Event - unit acquires item
Action -
for A = 1 to 6
    if (level of (item carried by (manipulating hero) in slot (A)) == level of (item being manipulated) then
        hero - drop (item being manipulated) from (manipulating hero)
    else
        do nothing

i mean thats the simplest way, u could use variables and 'item detection' functions to keep track of what the player is holding as well which would give u more control then just lumping everything with levels[/code]
 
Level 5
Joined
Jul 11, 2004
Messages
183
Raptor-- said:
give each 'class' of items a different level (u could differentiate a different way, its up to u)

Code:
Event - unit acquires item
Action -
for A = 1 to 6
    if (level of (item carried by (manipulating hero) in slot (A)) == level of (item being manipulated) then
        hero - drop (item being manipulated) from (manipulating hero)
    else
        do nothing
[/code]

i tried those and make variable too,, these code you just given will drop item from all units, and this code its not wat he want,, he said duplicating items not item allowen,.if it eazy as peoples said then there is no challengin to triggers editor.
 
Level 7
Joined
Jul 30, 2004
Messages
451
randym4a1 said:
Raptor-- said:
give each 'class' of items a different level (u could differentiate a different way, its up to u)

Code:
Event - unit acquires item
Action -
for A = 1 to 6
    if (level of (item carried by (manipulating hero) in slot (A)) == level of (item being manipulated) then
        hero - drop (item being manipulated) from (manipulating hero)
    else
        do nothing
[/code]

i tried those and make variable too,, these code you just given will drop item from all units, and this code its not wat he want,, he said duplicating items not item allowen,.

duplicating aka not carrying 2 of the same class is what i understood, in which case that trigger will work assuming u read the first part and assigned each class of items a different level, ok and sue me i made a minor mistake i didn't have the editor open at the time, u have an AND in the if, check if the item being manipulated is not equal to the item in slot int A

if it eazy as peoples said then there is no challengin to triggers editor

um, the challenge in triggers is the harder stuff, this is easy stuff, a very simple version of it at least

anyways i made it in the editor this time so theres absolutely no mistakes in it

Code:
Event - unit acquires item
Action -
for A = 1 to 6
    if ( (level of (item carried by (manipulating hero) in slot (A)) == level of (item being manipulated) ) and ( item being manipulated != item carried by manipulating hero in slot A ) then
        hero - drop (item being manipulated) from (manipulating hero)
    else
        do nothing
 
Status
Not open for further replies.
Top