• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Bouncing Spell

Status
Not open for further replies.
Level 6
Joined
Aug 1, 2009
Messages
159
Hi, can someone tell me how do I make a bouncing spell.

Basically, when the caster casts the spell, it will create a fireball to the targeted point of the ability being casted. It has an arc or Acid Bomb type. After it hits the ground, it should bounce to the next target position, but it creates 2 fireballs instead of one. Any idea how to do this?
 
Level 11
Joined
Feb 11, 2010
Messages
199
Hi, can someone tell me how do I make a bouncing spell.

Basically, when the caster casts the spell, it will create a fireball to the targeted point of the ability being casted. It has an arc or Acid Bomb type. After it hits the ground, it should bounce to the next target position, but it creates 2 fireballs instead of one. Any idea how to do this?

There are quite a few ways you could go about this. For example:

1) Trigger the movement of the missile yourself, using a loop and moving a dummy unit or special effect, use "change unit flying height" to a parabola formula, and have a dummy unit cast the AoE spell each time it reaches a targeted point.

2) Have a targeted dummy spell with a buff and missile arc target a dummy unit, detect when the dummy unit has the buff, and then have it cast the dummy spell on a second and third dummy unit (the bounce points for the other two fireballs), and have dummy units cast the AoE effect on units with the required buff.

Easy peasy :)
 
Level 6
Joined
Aug 1, 2009
Messages
159
Code:
1) Trigger the movement of the missile yourself, using a loop and moving a dummy unit or special effect, use "change unit flying height" to a parabola formula, and have a dummy unit cast the AoE spell each time it reaches a targeted point.

First, "Trigger the movement of the missile yourself" I know how to do this, also can you show me the formula? I think I created a Jump Stomp kind of spell ages ago which using parabolas.

Code:
2) Have a targeted dummy spell with a buff and missile arc target a dummy unit, detect when the dummy unit has the buff, and then have it cast the dummy spell on a second and third dummy unit (the bounce points for the other two fireballs), and have dummy units cast the AoE effect on units with the required buff.

I dont get the buff part, are you saying that this works like a condition? I did think that, using the dummy to use a spell.
 
Level 11
Joined
Feb 11, 2010
Messages
199
Code:
1) Trigger the movement of the missile yourself, using a loop and moving a dummy unit or special effect, use "change unit flying height" to a parabola formula, and have a dummy unit cast the AoE spell each time it reaches a targeted point.
First, "Trigger the movement of the missile yourself" I know how to do this, also can you show me the formula? I think I created a Jump Stomp kind of spell ages ago which using parabolas.

This is an example of a parabola formula:
  • Set Parabola = (((3.00 x Height) / MaxDistance) x ((MaxDistance - Distance) x (Distance / MaxDistance)))
Height is the the current flying height of the unit. Max Distance is the starting distance between points. Distance is the distance remaining to the target point.

Code:
2) Have a targeted dummy spell with a buff and missile arc target a dummy unit, detect when the dummy unit has the buff, and then have it cast the dummy spell on a second and third dummy unit (the bounce points for the other two fireballs), and have dummy units cast the AoE effect on units with the required buff.
I dont get the buff part, are you saying that this works like a condition? I did think that, using the dummy to use a spell.
Yes, you can use the boolean condition "Unit has specific buff."
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
By the way, use the
tags not the
Code:
 tags for quoting people.

[quote]After it hits the ground, it should bounce to the next target position[/quote]

What do you mean, the "next target position"? There is only one target gathered by any [B]single[/B] ability, so please explain how you are going about this.

Also, I would recommend you to my [B][url=http://www.hiveworkshop.com/forums/jass-functions-413/custom-projectiles-162121/]Projectile[/url][/B] library but I doubt you use vJass.
 
Status
Not open for further replies.
Top