• 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.

Item triggers- Bugs/Leaks

Status
Not open for further replies.
Level 7
Joined
Feb 4, 2005
Messages
289
Ahh how can there be so stupid triggers like 'Item carried by Hero in slot 1) and no trigger without slot.

Im making a morh to 1 of several units ability using the hide/unhider hero, summon coming from the ability, remove summoned, uhide hero.

I made items preserve even with the hide of hero and entrance of the summon unit using:

6 variables eacg of 1 : Set Item1 = (Item carried by ET1castingUnit in slot 1)
Set Item2 = (Item carried by ET1castingUnit in slot 2)
etc. up to 6

, another 2 for the casting unit of the moorrh ability and the entering unit.

It works but tehre are 2 main problems. When i cr8 an ability i use as many triggers as needed for all cases to prevent all bugs that may occur.

so 1) If the hero has some items,by using these variavles and

If ((Item1 Not equal to (Item carried by ET1castingUnit of type Transformator)) and (Item1 Equal to (Item carried by ET1castingUnit in slot 1))) then do (Hero - Give Item1 to ET1enteringUnit) else do (Do nothing)
Respectively for all 6 slots changing ofc item6, slot 6 etc. The ability belongs to an item yes.

add them in the morph ability where the unit enters,

In 'Morph back' ability of another item, where i remove the summoned and unhide the hero but BEFORE i do these actions i have:

If ((Item1 Not equal to (Item carried by ET1enteringUnit of type Transformator (Transform Back))) and (Item1 Equal to (Item carried by ET1enteringUnit in slot 1))) then do (Hero - Give Item1 to ET1castingUnit) else do (Do nothing)

respectuvely up to 6th slot.

PROblem 1: As i said IT WORKS in the 1st part, when the heroi 1st casts the ability and the summioned appears. If the Transformator is moved to/appears in another slot with the summoned , e.g you want to arrange your items in the slot, when you use the ability , when you cast the morph back to hero ability , the items disappear in the hero back.

or else: The items may not disappear but if i change the slot of the Transformator, abilities of that item may not show on other slots, only on its 1st slot. WTF ?? Im sure its all the stupid slot number in the triggers. How can i fix it ?

Problem 2: If the summoned unit doesnt change the item slots as in problem 1 to disappear from the hero, ok but if that unit acquires an item from the ground, there is nowway i can 'give' the item picked from the ground by this summoned back to the hero. How do i fix these ?
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
make a new trigger that saves the items when you transform back to normal like the one that saves the items when you transform to whatever.
 
Level 7
Joined
Feb 4, 2005
Messages
289
You didnt read carefully, i used triggers to give the same variabled-items back to the hero. I even tried with another 6 variables referring mostly to the unit owning the items. No effect.
 
Level 7
Joined
Feb 4, 2005
Messages
289
You didnt read carefully, i used triggers to give the same variabled-items back to the hero. I even tried with another 6 variables referring mostly to the unit owning the items. No effect.
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
edit the trigger to reset the variables to the new items before u change back. or take the items that the hero has away when it is removed/hidden/whatever. make the hero drop them and the summoned unit pick them up. do the same for the transformation back.
 
Status
Not open for further replies.
Top