• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] Need ideas for a visual effect on an ability

Status
Not open for further replies.
Level 3
Joined
Feb 25, 2019
Messages
35
Hello! I've been using carrion swarm when I need to send missiles, but I really want a way to send a missile a variable distance. With carrion swarm I have to fix the distance in the ability data. Basically what I want would be identical to a ground target attack (like mortar team) but from a dummy unit. Is this a thing? Anyone have any good ways of doing this?
 
Level 7
Joined
Apr 17, 2017
Messages
316
What you said is possible to do however it's better to code your own missile rather than using dummy units because of new natives. New natives eliminated the need of using dummy units for each spell.

All you need is: defining a start point and an endpoint. Then you constantly move the projectile. When it reaches the endpoint, deal damage to enemies.
 
Level 3
Joined
Feb 25, 2019
Messages
35
What you said is possible to do however it's better to code your own missile rather than using dummy units because of new natives. New natives eliminated the need of using dummy units for each spell.

All you need is: defining a start point and an endpoint. Then you constantly move the projectile. When it reaches the endpoint, deal damage to enemies.
Yikes I was worried I'd have to do that. So, the missile would be a unit that I'd move by changing x&y?

Also, just started working on it using this as an idea - if that is how I am doing this, how do I arc the projectile? Wouldn't it just stay in on orientation even though I need it to go in an arc? That would look so silly, it'd just be pointing in one direction through the whole thing xD
 
Last edited:
Level 7
Joined
Apr 17, 2017
Messages
316
you can either use dummy unit or special effect for the projectile that part doesn't matter. I am assuming you are using gui. I believe what you want is parabola. But if you don't wanna deal with formulas, you can simply increase the height of your special effect or dummy by a tick, then you divide the maximum distance by 2, that should give you the middle point. So if your tick is equal to distance/2 decrease the value of your tick rather than increasing it. But that is not a good approach anyways.

You can also check some jump or parabola tutorials like these [GUI] Parabola equations 1.1 (+Examples)
Jump System [Paladon]
 
Level 39
Joined
Feb 27, 2007
Messages
5,013
Mortar team attack only hits the AoE you choose with ground target. Carrion swarm hits everything in a line from start to finish. If you're just using it for visuals then the difference is that carrion swarm doesn't arc like a unit projectile does.

It sounds to me like you need some sort of a missile system. There should be some in the resources section here or on wc3c.net, failing that you can google things like "missile system hiveworkshop" and see what threads show up. If you don't need a whole BUNCH of different missiles and they're just visual (nothing 'happens' when the missiles hit the ground) you can actually use dummy units being ordered to attack ground. Just change their projectile art, speed, and arc to match what you want and give them max attack range. If you remove their movement (set it to 'none') I believe they'll turn and fire the missile instantly so there's no delay.

But really probably use a missile system, even if it's written in JASS and you have to launch missiles with a custom script line. It's old but I don't mind xe: xe0.9 - Wc3C.net
Also, just started working on it using this as an idea - if that is how I am doing this, how do I arc the projectile? Wouldn't it just stay in on orientation even though I need it to go in an arc? That would look so silly, it'd just be pointing in one direction through the whole thing xD
Yes, that is one of the challenges here.
 
Level 23
Joined
Oct 18, 2008
Messages
937
you can make a dummy unit attack another dummy unit to make the projectile do most anything you want. you need to make the attacked dummy invulnerable and allow 'invulnerable' as an attack target for the one doing the attack. it won't work for manually trying to attack stuff but will allow attacks when ordered by triggers, and also bypasses the usual unattackability of locust.
 
Level 3
Joined
Feb 25, 2019
Messages
35
I got it to work! I made a dummy unit with 0.1s dmg point & backswing, set the atk CD to 2s, set both the targets allowed and the AoE targets allowed to 'None,' made the type Artillery, made the missile my desired missile, and then turned the missile arc, speed, etc. as needed. When I need one sent, I trigger to create one at the start point and issue to attack ground the end point. I give it a 0.5s expiration timer and some things like "turn off collision," etc. And it works like a charm!
 
Level 3
Joined
Feb 25, 2019
Messages
35
you can either use dummy unit or special effect for the projectile that part doesn't matter. I am assuming you are using gui. I believe what you want is parabola. But if you don't wanna deal with formulas, you can simply increase the height of your special effect or dummy by a tick, then you divide the maximum distance by 2, that should give you the middle point. So if your tick is equal to distance/2 decrease the value of your tick rather than increasing it. But that is not a good approach anyways.

You can also check some jump or parabola tutorials like these [GUI] Parabola equations 1.1 (+Examples)
Jump System [Paladon]
Actually funny thing about you bringing up the parabola idea - I'm actually completely new to map development and coding.. but in college I was a nanophysical chemist and spent a ton of time with calculus and just math in general.. so that's become one of my favorite parts of this whole process. A few days ago, I created a fight sequence for a dungeon boss fight in my game where I made a fancy equation for parabolic movement. It's a gladiator arena, and the fight breaks out after the main boss claims to be bored with mounted units leaping from out of vision into the arena. Then, I had a great idea... I'd been planning on having the boss send in prisoners to fight against the players because it fits with the storyline at that point, but I was just trying to figure out how best to do it. I decided to make a scene similar to the mounted unit scene, but instead of mounted units, I made it catapaulted cages that shatter on impact with the ground, releasing one of the combatants as a result. I'm having a lot of fun with parabolas hahaha
 
Level 39
Joined
Feb 27, 2007
Messages
5,013
I got it to work! I made a dummy unit with 0.1s dmg point & backswing, set the atk CD to 2s, set both the targets allowed and the AoE targets allowed to 'None,' made the type Artillery, made the missile my desired missile, and then turned the missile arc, speed, etc. as needed. When I need one sent, I trigger to create one at the start point and issue to attack ground the end point. I give it a 0.5s expiration timer and some things like "turn off collision," etc. And it works like a charm!
You should be able to make the attack and cast points 0 for instant casts and attacks, try shift + double click if it won't let you put in below 0.1. Instead of having to turn off collision you can give the unit the 'Aloc' ability (locust) which disables collision and makes the unit unselectable by players. Also make sure your dummy units have "minimap display" set to "off".
 
Level 3
Joined
Feb 25, 2019
Messages
35
You should be able to make the attack and cast points 0 for instant casts and attacks, try shift + double click if it won't let you put in below 0.1. Instead of having to turn off collision you can give the unit the 'Aloc' ability (locust) which disables collision and makes the unit unselectable by players. Also make sure your dummy units have "minimap display" set to "off".
Okay very interesting point to make about locust; I've had locust on all my dummy units for a while now but I've tested time and time again (after noticing an issue with collision).. turning collision off still has affects dummy units with locust (at least from what I've tested). I have an ability that performs a sequence through flying dummy units of various pitch angles and heights (simulated a flip in the air kinda) and they all have locust. If I don't turn collision off, a couple of them get pushed out of their intended spot in the sequence.
 
Level 39
Joined
Feb 27, 2007
Messages
5,013
Honestly I've never seen that behavior before but it could be new or I'm blind. Do the units have locust in the OE or are you adding it with triggers? The GUI 'move unit to point' action does take unit collision/ground pathability into account, so it might be drawing from the collision size the OE says the unit has even though it has locust. The JASS natives SetUnitX and SetUnitY specifically don't take pathing/collision into account so you can use them in cases like that.

Could you upload a map with this locust behavior?
 
Level 3
Joined
Feb 25, 2019
Messages
35
Honestly I've never seen that behavior before but it could be new or I'm blind. Do the units have locust in the OE or are you adding it with triggers? The GUI 'move unit to point' action does take unit collision/ground pathability into account, so it might be drawing from the collision size the OE says the unit has even though it has locust. The JASS natives SetUnitX and SetUnitY specifically don't take pathing/collision into account so you can use them in cases like that.

Could you upload a map with this locust behavior?
You got it spot on, the units have 0 collision radius in OE but have locust via OE and are never moved. This is a matter of creating units. The units are created in quick succession and it appears as movement (the real unit is made invisible and size 1% til the end of the ability). It doesn't surprise me now that it worked that way.
 
Status
Not open for further replies.
Top