| 05-23-2006, 11:20 PM | #1 |
Hello everybody I'm trying to make a spell called "Deadly Charge", with drukenhaze of base spell. The spell makes the casters twice his movespeed and order him to attack the target, when the caster attack the target (once only) deal a critical strike (2/2.75/3.5/4.25). So the spell is: Charge Code:
Events Unit - Units starts the effect of an ability Conditions Ability being cast equal to Deadly Charge Actions Unit Group - Add Casting unit to ChargersGroup Unit - Add Critical Strike (Dummy) to casting unit Unit - Set level of Critical Strike (Dumy) to level of Deadly Charge of Casting unit Unit - Add SpeedburstAbility(Dummy) to casting unit Unit - Add specialeffect(dummy) to casting unit Unit - Order casting unit to attack target unit being cast Trigger - Turn on ChargeChange <gen> Trigger - Turn on ChargeStop <gen> ChargeChange Code:
Events: Unit is issued order with target a object Conditions: Ordered unit is in ChargersGroup is true Issued order Not equal to Order(attack) or Issued order Not equal to Order(drunkenhaze) Actions Unit - Remove Critical Strike (Dummy) to casting unit Unit - Remove SpeedburstAbility(Dummy) to casting unit Unit - Remove specialeffect(dummy) to casting unit Unit Group - Remove Casting unit to ChargersGroup ChargeStop Code:
Events: Unit is attacked Conditions: Attacking unit is in ChargersGroup is true Actions Wait 1.50 seconds Unit - Remove Critical Strike (Dummy) to casting unit Unit - Remove SpeedburstAbility(Dummy) to casting unit Unit - Remove specialeffect(dummy) to casting unit Unit Group - Remove Casting unit to ChargersGroup Well the spell works the first time, but the next times only add SpeedburstAbility(Dummy). What happens? Somebody can help me?Thanks in advance. |
| 05-23-2006, 11:34 PM | #2 |
Why dont you just have the trigger ChargeChange with no events and just make it run it instead of that. I think that might work better, but I'm not sure. Other than that, I have no idea. |
| 05-24-2006, 12:21 AM | #4 |
Thanks!!! But i dont understand these part of the detect the damage of the hero (or unit, i want to make this MUI) with items and auras and so on. And... "Aloc" are my Speedburst and specialeffect abilities??? Hmmm and in JASS, how i can do this in JASS?? |
| 05-24-2006, 01:46 AM | #5 | |
Quote:
Assuming his triggers work, just convert it to custom text. |
| 05-24-2006, 02:31 AM | #6 |
My triggers would work, but I just threw in random variables, I didn't actually calculate anything. And do note that the way I wrote it was the way I see it being done (Which is identical to your method save the execution). 'Aloc' is the locust ability. I stuck that on there so you couldn't order the caster to do anything else while he's running to the target. There are other ways, sure, but I felt it would have a nice flow effect this way. Also, do note the way I did it I didn't even add critical strike to the caster hero. To add special effects you would just do... Special Effect - Add Special Effect <string> to unit <unit> Special Effect - Destroy (last created special effect) Also, I'm guessing MUI means Multi Instanceable, in which case I would do it in jass. Jass would look a lot different, would work better, but would require you to understand what's going on. If you'd like some help with the jass, try writing it and then I'll check it over for you. Personally, it does noone any good if someone writes the code for a spell for you and you don't understand what's going on in it. So yeah. |
| 05-24-2006, 01:48 PM | #7 |
You should know that you can't remove 'Aloc', so that would cause the hero to be unselectable, untargetable and invulnerable after the first use of the ability. Btw. You don't have to use Custom Script to add/remove 'Aloc', you can just take the ability 'Locust'. - Soultaker |
| 05-24-2006, 02:56 PM | #8 |
Aloc is removable by pausing and unpausing the unit that has the ability. Pausing and unpausing resets the unit, it will be exactly the same as it started of as EDIT: Please use trigger tags and not code tags for triggers GALLED |
| 05-25-2006, 04:11 AM | #9 |
Ok sorry. Mmmm how i can damage the target with the attack of the caster in "whateverdamage" to simulate the critical strike ability??? |
| 05-25-2006, 07:06 AM | #10 |
Trigger: Unit - Cause (Some Unit) to damage (Some Unit), dealing (Some Damage) of attack type Meele and damage type Normal |
| 05-25-2006, 10:24 PM | #11 |
Yep, but this damage is a valor that i will put? I want that the casters damages the target with this attack damage. |
| 05-26-2006, 08:02 AM | #12 | |
Quote:
Just to make a note on that... In GUI, you are not allowed to add 'Locust' with the... Unit - Add Ability ...function. For some reason it simply does not ever show up in the provided list when you attempt to add it. That's why I used jass to add it, since well... You can. And yes, with regards to what Tide posted, you can use a variable for that damage. |
