• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

Disable an Ability for a Morphed Unit?

Status
Not open for further replies.
Level 6
Joined
May 27, 2007
Messages
162
So, simply:

Unit Acquires Item X, then Player (owner of unit) gets Ability X.
Let's call Ability X - Equip Weapon
So 'Equip Weapon' is based off Night Elf - Bear Form.
When the unit has the weapon, he can 'equip' it and bearform into a new unit, armed with the weapon (obviously :))...

My problem is, he acquires the ability okay, on picking up the item. But, the item is undroppable, and can only be 'dropped' by 'unEquipping' (or casting Night Elf Form). This basically creates the item at unit's location, and removes the one he is carrying. But, then what happens is: The 'Unarmed Unit' can still 'Equip Weapon' since it did not disable...

  • Weapon Dropped Shotgun
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Equip Weapon Shotgun
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Casting unit)) Equal to Marine [Shotgun]
        • Then - Actions
          • Item - Remove (Item carried by (Casting unit) in slot 1)
          • Item - Create Shotgun at (Position of (Casting unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-class of (Item carried by (Casting unit) in slot 2)) Equal to Powerup
            • Then - Actions
              • Item - Create Conventional Ammo at (Position of (Casting unit))
              • Item - Set charges remaining in (Last created item) to (Charges remaining in (Item carried by (Casting unit) in slot 2))
              • Item - Remove (Item carried by (Casting unit) in slot 2)
            • Else - Actions
              • Do nothing
          • Player - Disable Equip Weapon Shotgun for (Owner of (Hero manipulating item))
        • Else - Actions
          • Do nothing
I think I've got it... is it because I've "removed" the item... So, therefore (Owner of (Hero manipulating item)) becomes invalid? Since the item no longer exists?

Also, I'm encountering an annoying bug (in the forums), but I'll post elsewhere about that (well try to).
 
Level 6
Joined
May 27, 2007
Messages
162
haha... okay so Pharaoh_, how much of your +rep is from stating the obvious to noobs like myself? Thanks man, I guess I need to start really looking at my triggers
 
Status
Not open for further replies.
Top