| 11-22-2006, 09:19 PM | #1 |
When I try to use the event "Unit's Mana becomes = 0" I can select a unit that's already placed in the Editor for the Unit value, but I can't make the value equal to a variable. Is there any particular reason for this or a way around it? |
| 11-22-2006, 09:23 PM | #2 |
The reason is because once an event is created, it is no longer influenced by anything. Thus, it cannot be variable. Also, it is a real, so will pretty much never be == 0. Mana < 0.5 might be better. Anyway, what are you trying to do? There might be a work around. |
| 11-22-2006, 09:49 PM | #3 |
JASS:set udg_YourUnitVar = GetLastCreatedUnit() call TriggerRegisterUnitManaEvent( gg_trg_YourTrigger, udg_YourUnitVar, LESS_THAN, 0.5 ) YourUnitVar is the variable of your unit, YourTrigger the trigger which activates if the mana goes under 0.5 |
| 11-22-2006, 10:05 PM | #4 |
The spell in question is in a post I made earlier about removing spellbooks when a unit turns off immolation. I can get the spellbooks to go away when the unit turns immolation off, but I can't get them to go away when the unit runs out of mana and, thus, turns off immolation. This is because when it is turned off automatically there is no issued order, and my trigger for removing the spellbook uses the "Issued order equal to (Order(unimmolation))" event. The other post can be found here. |
| 11-23-2006, 07:14 AM | #5 |
Ok, it took me a while to realize just what trigger I needed to put the scripts nooK posted in... but I finally got it. Thanks man! +Rep! |
