Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
So i was inspired by Dota 2's Snapfire Scatterblast...And i was planning to add a similar ability to my maps of custom heroes and i did succeed...however, whenever the caster casts the ability on the very x axis, the projectiles seem to be cramped together instead of spreading....I already tried setting coordinates for x and y...however whenever the caster casts on the z axis, it would cramp up just like that with the x axis
Expected outcome of the ability: (projectiles spread as expected)
Ability doesn't spread as much when targeted on the z-axis
Ability Doesn't spread at all when casted on the x axis:
here is what i encoded:
I tried giving the order string y-axis coordinates but the spell would not spread when casting at the z-axis:
Sound - Play CatapultAttack1 <gen> at 100.00% volume, attached to (Triggering unit)
Some problems with your trigger:
1) You generally want to use "A unit starts the effect of an ability" instead of "A unit begins casting an ability". Begins casting an ability will run the trigger even if the ability didn't actually "go off". For example, if you issue a "Stop" order on your Hero immediately after casting an ability the ability will be cancelled, however, the Event "begins casting an ability" will still go off and the trigger will execute.
"Starts the effect of an ability" fires when the ability goes on cooldown so it doesn't have this issue.
2) You're leaking Points with your use of "Position of triggering unit". Position of unit, center of region, etc... these all create Points that will leak if you don't set them as Variables yourself and Remove them yourself.
3) You're using an unnecessary amount of Dummy units. You only need 1 Dummy in most cases like these. You can also use an Expiration Timer to destroy your Dummy. Also, set your Dummy's Movement Type to None and Speed Base to 0 in the Object Editor and make sure it's Art - Cast Point and Art - Cast Backswing are set to 0.00. (Or copy the Dummy unit from my map and use that one)
4) You don't need the "TempEffect1" variable, you can use "Destroy last created Special Effect" instead.
5) The Variables "TempUnit1-5" and "TempPos2" are referenced AFTER the use of Waits. This can cause problems if you use those Variables in other Triggers or if you cast this ability additional times in quick succession.
^However, if the ability has a long enough cooldown (longer than the sum of your Waits) and these variables are used ONLY for this Trigger then it's not a problem. But if you do use these Variables in other triggers then you might end up replacing what those Variables are "pointing" to and that will cause some problems.
Here's an example of what I'm talking about:
Ex 1
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
Unit - Create 5 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
Ex 2
Events
Unit - A unit enters (Entire map)
Conditions
Actions
Set TempUnit = (Triggering unit)
Wait 2.00 seconds
Unit - Kill TempUnit
See the problem? Only 1 of those 5 Footman will die even though they have all "Entered the map". That's because i'm setting TempUnit to the most recent unit that has entered the map. Meaning only the very last of those 5 Footman will be considered TempUnit. The other 4 will no longer be TempUnit therefore they won't die. So in your Trigger's case you might accidentally change TempUnit or TempPos2 to something else during that 0.50 second Wait.
Everything Uncle said is important. The problem is the way you’re doing the ‘point with offset’s. You’re using XY offsets instead of polar offsets. Polar allows you to use an angle.
is usually not correct. To produce consistent results no matter which angle the caster is facing, you have to use trigonometric functions to move dummy units. For example:
set TempPos = position of the dummy
set NextPos = TempPos offset by (50*Sin(Facing of dummy),50*Cos(Facing of dummy))
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.