• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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