Hey guys, just wondering if there's a way to create a button or ui event/effect only if damage is done at a specific point/in a specific region? IE: I press button 1, and if damage at point/region 1 occurs, a new button (button a) is created. If no damage occurs, button b could be created instead. Alternates to this would be creation of a UI event saying "Damage occured at point 1" or something.
I don't really get what you mean with the button pressing though. You want to press a button and in exactly this moment damage has to occur? Or you press a button and from that point on it checks whether damage occurs?
Ok, say for instance I have a button that does an attack at point 1, if that attack successfully does damage, UI Function A/Button A occurs/appears. If no damage is done by that attack, UI Function/Button B occurs/appears.
You'll put that check in the same trigger you use to cause damage, right?
So you can associate a trigger with a dialog button right? That's what I assume you use to create an effect/cause damage in said area. What you'll want to do is add something in to that trigger that's like:
if (# of units in unit group matching conditions: convert circle into region @ point 1 using radius of 3, enemy?, blah, blah > 0)
then destroy original button
create button A
else destroy original button
create button B
Does that make sense? The radius would be the radius of the effect you're using to cause damage.
Hey guys, just wondering if there's a way to create a button or ui event/effect only if damage is done at a specific point/in a specific region? IE: I press button 1, and if damage at point/region 1 occurs, a new button (button a) is created. If no damage occurs, button b could be created instead. Alternates to this would be creation of a UI event saying "Damage occured at point 1" or something.
Is there any way to do this? And if so, how?
Event:
- YourUnit takes any damage
Condition:
- YourRegion contains (Position of(Triggering Unit))
Action:
- Create Dialog Button
I don't really get what you mean with the button pressing though. You want to press a button and in exactly this moment damage has to occur? Or you press a button and from that point on it checks whether damage occurs?
Ok, say for instance I have a button that does an attack at point 1, if that attack successfully does damage, UI Function A/Button A occurs/appears. If no damage is done by that attack, UI Function/Button B occurs/appears.
@helixdnb: Go
You'll put that check in the same trigger you use to cause damage, right?
So you can associate a trigger with a dialog button right? That's what I assume you use to create an effect/cause damage in said area. What you'll want to do is add something in to that trigger that's like:
if (# of units in unit group matching conditions: convert circle into region @ point 1 using radius of 3, enemy?, blah, blah > 0)
then destroy original button
create button A
else destroy original button
create button B
Does that make sense? The radius would be the radius of the effect you're using to cause damage.
Yea, when I get outta work I'll have to try it out and see how it works. Right now I'm just able to edit stuff in the code editor while at work.
Thanks!