Hi. I'm currently learning vJass. I want to make an ability called 'Bouncing Shot' but I don't know how to get started with the trigger. I want to make this ability using vJass. Here's a description of the ability :
Here's what I came up with so far :
1. I couldn't figure out how to use vJass to detect damage is taken by the attacked unit. So, please show me in vJass, how to detect damage is taken by the attacked unit.
2. Can the whole thing be made into just 1 trigger? If so, how to do it?
Help will be appreciated.
Bouncing ShotWhen auto-casting is enabled, every arrow she shoots bounces 3 times. Her arrows deal 2 x her agility to the first unit and the damage halves for every successive bounce.
This ability can be auto-cast by right clicking on the icon
Bouncing Shot*Trigger detects damage is taken by the attacked unit (a). This gives me a headache -.-
*Damages the attacked unit for 2 x Ranger's agility.
*A dummy unit is created at position of (a) to cast the dummy Bouncing Shot ability to a random enemy unit (b) within 400 AoE (If no enemy units are found within the area, arrow will not bounce).
*When the arrow hits (b), it deals 1/2 of 2 x Ranger's agility.
*Another dummy unit is created at position of (b) to cast the dummy Bouncing Shot ability to a random enemy unit (c) within 400 AoE.
*When the arrow hits (c), it deals 1/4 of 2 x Ranger's agility.
*This process continues for up to 3 bounces to make it look like as if it's bouncing.
The Dummy Bouncing Shot ability is used for showing the projectile (the arrow)
2. Can the whole thing be made into just 1 trigger? If so, how to do it?
Help will be appreciated.