| 02-13-2004, 11:02 PM | #1 |
Ok i know that theres an "units mana reaches" event but the annoying thing is you have to do this with a specfic unit, it won't even let you use a variable. My question is, is there anyway to do this with a generic unit type event? Plz help if you can, I'm screwed if i can't figure this out :( |
| 02-14-2004, 12:08 AM | #2 |
in english would help |
| 02-14-2004, 12:28 AM | #3 |
Ok srry i'll try to make this a little easier to understand. You know theres an event trigger thats something like "unit mana changes" or something like that. The problem is the only "unit" it will accept has to be picked through that "pick a unit" (the unit has to exist on the map in the editor somewhere) function. The problem is that i need it to work for a wide range of units, such as you would use a "generic unit action" event for, but theres no way to cross between these events that i've found, i was hoping someone here would have an answer. I basically need a trigger that will kill (for men) or pause (for buildings) a unit when it reaches 0 mana. If theres an ability that has an effect when a unit reaches a certain amount of mana that would work too. Theres no way around the need for this as far as i can see so plz don't say "find a different way for this to work". |
| 02-14-2004, 11:38 AM | #4 |
if i understood you right, then i would speculate that you overlooked the obvious. If i understood you wrong...well... ignore this message :ggani: periodic event - every 5 seconds Unit Group - pick every unit in (units in(playable map area)) and do if ((integer((Mana of (picked unit))))) equal to 0 then (remove(picked unit) from the game) else (do nothing) Now all you have to do is modify this so it doesnt kill buildings, shouldnt be hard. the part in bold, the thing i think you missed, is a conversion from real to integer. |
| 02-14-2004, 12:42 PM | #5 |
Why do i continue to miss the simple stuff :( Thanks a lot i really needed this for my map. |
| 02-15-2004, 10:02 PM | #6 |
Actually the best way to do it would be to use the UMSWE actions so that everytime a unit is created have it add an event into a specific trigger. That way you can dodge having ot use another periodic event as those can lag your map. |
