HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Ok, I need help with a trigger.

11-03-2003, 07:22 AM#1
AllPainful
Ok, I have an ability called "Infusion" that can target another unit of the player.

The target unit has an inventory that is 1 slot.

I would like that if the targets 1 slot inventory is empty then it will place an Item in the slot, but if the slot is not empty (meaning infusion has already been cast on the unit) then it sends a message to the player that the unit already had an infusion cast on it.

Heres the thing:

1. I know how to compair slots of inventories, thats easy, but what do I use to get the unit that was targeted by the spell?

2. The ability has no casting time, so "Begins Casting Ability" is valid event for the trigger. So is "Finishes casting ability". So if you know of a way to get the target that way, just tell me.

3. I tried using "Unit is issued an order targeting a unit" but there are a couple prolbems with that, number 1 the ability would not be cast before the trigger fired and therefore players could cheat if I used it, and 2 I can't figure out how to make the condition "issued order equal to Infusion"

So if anyone could help with this trigger it would be appreciated.


EDIT: I found a method to do this.. but.... The method I found was the 2 trigger method. Problem with that is there is upto 8 players and it is possible for more than one of them to cast it at the same time, as well as the same player might cast the ability at the same time by 2 different "Infusers"... Soo... I use WEU and if anyone knows how I could do the above without the 2 trigger method it would be appreciated..



Completely disregard. I had tried the "Advanced - get target of units last order" and it had crashed WEU. But I tried it again and it worked fine. So nevermind.