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

[Solved] Make unit drop items on morph?

Level 11
Joined
May 9, 2021
Messages
189
Lets say I have a Druid of the Claw who has a hero inventory in both Night Elf form and Bear form.

In NE Form, he can pick up a staff that gives him the ability to cast spells, and he cannot pick this up in Bear Form.

However, if he picks the staff up in NE form and then switches to Bear form he will still possess the staff and be able to cast spells in Bear Form, which I do not want.

How can I make a unit drop the item (or items) upon morphing (without removing the inventory from one of the forms, if possible)?
 
Level 11
Joined
May 9, 2021
Messages
189
You could create a new ability base on Inventory and there is an option to disable using items (while still being able to pick them up), and give this one to the bear form
I was never aware of this. Thank you for the assistance :thumbs_up:

Only problem is it disables the ability to use power-ups such as runes...

Edit: I think I can probably just remove the mana of one form and have the staff require mana to use, actually.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,552
Unfortunately I am still on V27, though the problem has been resolved.
It's two very simple triggers:
  • Bear Drop Old Items
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(bearform))
      • (Unit-type of (Triggering unit)) Equal to Druid of the Claw (Night Elf Form)
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Hero - Drop (Item carried by (Triggering unit) in slot (Integer A)) from (Triggering unit).
  • Bear Drop New Items
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Druid of the Claw (Bear Form)
      • (Item-class of (Item being manipulated)) Not equal to Powerup
    • Actions
      • Hero - Drop (Item being manipulated) from (Triggering unit).
This will work on any version.

This is assuming that you're using the Bear Form ability to morph since it uses the "bearform" order. Also, switch the Unit-Types to use your units.
 

Attachments

  • Bear Form Drop Items.w3m
    17.6 KB · Views: 2
Last edited:
Level 11
Joined
May 9, 2021
Messages
189
It's two very simple triggers:
  • Bear Drop Old Items
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(bearform))
      • (Unit-type of (Triggering unit)) Equal to Druid of the Claw (Night Elf Form)
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Hero - Drop (Item carried by (Triggering unit) in slot (Integer A)) from (Triggering unit).
  • Bear Drop New Items
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Druid of the Claw (Bear Form)
      • (Item-class of (Item being manipulated)) Not equal to Powerup
    • Actions
      • Hero - Drop (Item being manipulated) from (Triggering unit).
This will work on any version.

This is assuming that you're using the Bear Form ability to morph since it uses the "bearform" order.
I may use this at a later date if my current method is no longer viable, thank you :thumbs_up:
 
Top