| 01-21-2010, 12:19 PM | #1 |
A hero has got an owl-form spell and can fly about. The problem is, he can fly around and pick up gold-powerups while being airborne. This is unintentional, so is there a way to restrict this? |
| 01-21-2010, 12:24 PM | #2 |
Simple way: Make sure the owl ain't a hero (for instance you could use Pandaren Brewmaster's ultimate). Tricky way: Detect the "smart" order (all right-clicks are "smart"-orders) for the owl unit-type, and interrupt it if it targets a coin. |
| 01-21-2010, 12:41 PM | #3 |
Thanks! The simple solution sounds elegant, but how do I make sure the owl isn't a hero? The owl unit does not have attributes-per-level and such in the field values, so must therefore be a normal unit already as far as I can see. Must I base the owl form on a particular ability as you said, for example Pandaren ultimate? |
| 01-21-2010, 12:52 PM | #4 |
The owl form must not have an inventory (or at least a hero inventory) if you don't want it to pick up items. Best way to preserve the original hero's invenotry is to use StormEarthAndFire to summon the inventory-less owl. |
| 01-21-2010, 01:07 PM | #5 |
I see. But the Storm, Earth and Fire does not have morphing flags and Altitude Adjustment Duration and things like that that I think is handy when dealing with flying morphs. Besides I went through a lot of hassle making it work properly, so I'm tempted trying Themerion 2nd proposal and trigger it, but I can't seem to find a reference to these smart actions using the GUI... |
| 01-21-2010, 05:05 PM | #6 |
You could, I suppose, just have a trigger that fires when a hero picks up an item, and then if the hero = the flying owl you can just have an Action to drop the picked up item. That way if you right click an item it will go to that spot and just not be able to put it in its inventory. You might have a problem if another hero drops an item into your inventory.... not sure. |
| 01-22-2010, 08:50 AM | #7 |
but, the gold-powerup is instant effect, it doesn't actually go into his inventory... |
| 01-22-2010, 09:20 AM | #8 | |
Quote:
|
| 01-22-2010, 10:10 AM | #9 |
Thanks a lot, perhaps for a later patch. I went for this solution for now: Trigger: owlformgoldrestrict
The gold coin will then be placed back, and no net change will occur with the players gold value. |
| 01-22-2010, 10:19 AM | #10 |
Thats kinda bad. I would rather check its order target as to replace the item everytime. JASS:local unit u = GetTriggerUnit() if GetOrderTargetItem() != null and IsUnitType(u, UNIT_TYPE_FLYING) then call IssueImmediateOrder(u, "stop") endif |
| 01-22-2010, 03:24 PM | #11 |
That would be much better. I use the GUI though, so I'll see if I can get a similar thing working! |
| 01-22-2010, 06:08 PM | #12 |
In case you need a middle ground :P Trigger: |
| 01-25-2010, 05:47 AM | #13 |
Thanks, that's wonderful. |
