I am working on a hero that has various abilities that place down creep in differant formations, including generating creep at the heros feet wherever it walks...
I need to make an ability that, upon use, sends a "Wave" through the creep, dealing damage to enemies on the creep, with the center of the wave starting at the location of the hero... to better illustrate exactly how i need this to happin here are some poorly drawn paint documents
Key:
Purple-Creep
Pentagon-Hero (Source of Shockwave)
Arrows-Path the creep shockwave will take
Here is a standard case, where there is just a circle of creep
This one is a bit more trickey
How could i go about creating somthing like this with data? i could bring triggers in to the mix if need be.
You can use validators to check whether a unit is on creep. Actually travelling like your second picture suggests is next to impossible, as you can't work with a static number of "wavefronts". The problem mainly arises if the creep is arranged in a "net" structure, as you can't simply send along dummy units that are bound to the creep (they would have to identify and multiply at each fork)
What you can do is create a search that expands radially outwards from the hero, this would hit the left side of the bottom-right blob before it reaches the top-right bend in your picture though. It would also work with disconnected creep patches, for example in your picture if you remove the rectangular path the right blob would still get hit. You can add a radial check in the form of a projectile launched from the hero that dies when off creep, this would then require the straight line between the hero and the intended target to be completely filled with creep. (except collision-detecting projectiles are limited in their speed and accuracy)
well i def dont want to do a simple outward expanding search effect,..
I have given it some more thought and i came up with a way to do it in triggers, although i would have to put a cap on the max distance the wave can travel, basically i would lay down a full filled in circle of dummy units, (points) and then remove the ones not on creep, and detonate the "center" one and that would detonate the surrrounding ones, etc... depending on the max radius of the ability this could get extremely inefficient though...
DrSuperEvil, could you expand on what you were suggesting?
What he suggested is basically what I explained. Persistent offsets can only set a static pattern.
Your trigger method could be done in data too, using persistent offsets to set the spawn locations. The problem is that the amount of units needed scales with the square of the radius. If you made it range 7 with radius 1 sub-AoEs you're looking at 36+ dummy units. If you use radius 0.5 sub-AoEs (about the size of a basic unit) you need about 150-200.
So, basically, how much is going on in your map? Is it a "hero arena" with only 20 or so units for all players combined or is it a MOBA/Footmen style map where each player/team can easily have 100 units? I also don't know how much of the CPU load with units comes from the graphics (which you don't need) and how much from handling the gameplay entities themselves.
Then I would do it like this. I would have a set effect that applies a counter buff to the caster and a set effect that uses one of 3+ create persistent effects with different offsets that use a switch are validated if the target location is creep. If the location is creep the switch uses the first set but if not it then it uses the second set effect at the location of the previous first set. When the counter buffs are maxed then it stops.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
The problem with that is, I think they want an omnidirectional attack and not a single snaking blast.
From the OP I assume a real-life analogy would be several adjacent ponds, each with islands: If you throw in a (large) stone the ripples will spread outward from the impact point and curve around the islands, but will not reach any part of an adjacent pond even if it's closer to the original impact site. Travel time to any point is based on the distance through the water and not direct distance from the impact point.
To replicate that you'd need to spawn dummies around the caster, then attempt to spawn more dummies around each existing one, iterating until a preset maximum of some sort. The main problem I see is that you need a very small AoE around the dummy to get decent accuracy, which results in a massive amount of spawns when used on solid creep. So the main question is how many units exist in this map and how much CPU load graphics-less units cause.
In singleplayer on an empty map with a good computer you could probably iterate up to 15 range using Zergling-size AoEs within a second or two, but in a MOBA map that should crash the game quite effectively.
That could also be achieved with what I said with the persistents except it uses a multiplying persistent that has a 180 degree arc or an arc that does not include the caster + so many degrees.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Giving my though how i would try, maybe its totaly useless, maybe it will opens to new ideas.
Idea 1: I woud use trigger. When the ability is activated, create an invisible unit that would folow a specefic path described with offsets in the trigger. That unit would spawn creep under its feet same as the hero. For bigger creep circle during its path it could be in the same trigger when the unit has traveled x distance or wait that many secs, and put creep on x radius.
Idea 2: Use missile movers on an invisible unit that spawn creep and the mover has multiple state that would folow a specefic path.
You could replace the invisible units with a visual effect as well.
There is actually a really simple way to do this.
Just create an invisible dummy unit every x seconds, say every 1 seconds a dummy unit is created at the position of the hero, then calculate how long it takes for the creep to recede.
Say it takes 5 seconds for it to recede. So give the dummy unit a timed life that expires in 5 seconds.
Then any other ability you have that generates creep will also have to create a dummy unit as well at that location.
Then when you activate your "wave" ability, simply have an area search that finds the closest dummy unit to the hero, it then kills the dummy unit, triggers whatever effect you want, and then loops back to the area search to find the next closest dummy unit to the one that just died. (You can look up the chain lightning tutorial for a similar idea of how to get things to chain like this)
If the creep can only spread out to a radius of say 5, then you can assume that any adjoining creep will have a dummy unit within 5 radius of the last one.
If you want an omnidirectional expansion, you could trigger all dummy units within 5 radius of the hero, then all dummy units within 5 radius of the previous ones, ect..
As far as the effect goes, it would take a bit of calculation, for instance, you might have to change the radius based on how much timed life the unit has left. So if it only has 2 seconds left of it's 5 second life, the creep is most likely only 2 radius away from it. Or as previously mentioned, you could just at that point validate if the unit getting hit by the chain effect is on creep or not.
Creep is created by not only where the hero walks, but also by certain abilities in differant patterns...
Basically i want there to be a wave of damage that is bound to the creep, and it must be like a chain reaction that is bound on the creep starting from the hero, and moving outwards, that way if the creep bound "Path" to a unit from the hero to the unit was longer, the unit would have more time to step off the creep...
Maybe it would help if i explained some of the heros abilities
1-similar to psistorm - just deals damage and generates creep at the target area
2-Deals damage in a line, and also creates a path of creep along that line
So the hero could potentially create a patch of creep with ability 1 on a unit, then connect that patch of creep with the path of creep on the hero's feet using ability 2, so that it could use this "Wave" ability to shoot a shockwave of damage through the creep... i suppose i could just do what photoloss initially proposed, if i could make sure that the creep in the area was joined at some point...
hope that clears up exactly what i wanted it to have happin...
i appreciate all the help, i think i can use this information to put this ability together.
So you got spells that creates creep, and one spell that uses that creep to shoot a wave (and probably remove the creep?).
And you're looking to make the wave. If you place alot of creep around and wait to use the 3th spell, when you will use it, you want it to move accros all the creep in all the directions I bet.
If that's right, I see what you want to do but I don't have any idea lol. It's like imaginating that the creep is paper and you spread paper all around and then you decide to light it in fire. The paper will burn from your hero and spread around and damage any enemy that is in the fire.
I am working on a hero that has various abilities that place down creep in differant formations, including generating creep at the heros feet wherever it walks...
I need to make an ability that, upon use, sends a "Wave" through the creep, dealing damage to enemies on the creep, with the center of the wave starting at the location of the hero... to better illustrate exactly how i need this to happin here are some poorly drawn paint documents
Key:
Purple-Creep
Pentagon-Hero (Source of Shockwave)
Arrows-Path the creep shockwave will take
Here is a standard case, where there is just a circle of creep
This one is a bit more trickey
How could i go about creating somthing like this with data? i could bring triggers in to the mix if need be.
You can use validators to check whether a unit is on creep. Actually travelling like your second picture suggests is next to impossible, as you can't work with a static number of "wavefronts". The problem mainly arises if the creep is arranged in a "net" structure, as you can't simply send along dummy units that are bound to the creep (they would have to identify and multiply at each fork)
What you can do is create a search that expands radially outwards from the hero, this would hit the left side of the bottom-right blob before it reaches the top-right bend in your picture though. It would also work with disconnected creep patches, for example in your picture if you remove the rectangular path the right blob would still get hit. You can add a radial check in the form of a projectile launched from the hero that dies when off creep, this would then require the straight line between the hero and the intended target to be completely filled with creep. (except collision-detecting projectiles are limited in their speed and accuracy)
I would use Create Persistent that does a colossus weapon like search and validate for on creep.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
well i def dont want to do a simple outward expanding search effect,..
I have given it some more thought and i came up with a way to do it in triggers, although i would have to put a cap on the max distance the wave can travel, basically i would lay down a full filled in circle of dummy units, (points) and then remove the ones not on creep, and detonate the "center" one and that would detonate the surrrounding ones, etc... depending on the max radius of the ability this could get extremely inefficient though...
DrSuperEvil, could you expand on what you were suggesting?
What he suggested is basically what I explained. Persistent offsets can only set a static pattern.
Your trigger method could be done in data too, using persistent offsets to set the spawn locations. The problem is that the amount of units needed scales with the square of the radius. If you made it range 7 with radius 1 sub-AoEs you're looking at 36+ dummy units. If you use radius 0.5 sub-AoEs (about the size of a basic unit) you need about 150-200.
So, basically, how much is going on in your map? Is it a "hero arena" with only 20 or so units for all players combined or is it a MOBA/Footmen style map where each player/team can easily have 100 units? I also don't know how much of the CPU load with units comes from the graphics (which you don't need) and how much from handling the gameplay entities themselves.
Thought he wanted a static pattern?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
He wants a travelling wave that's bound to existing creep and spreads for a certain distance along it.
Then I would do it like this. I would have a set effect that applies a counter buff to the caster and a set effect that uses one of 3+ create persistent effects with different offsets that use a switch are validated if the target location is creep. If the location is creep the switch uses the first set but if not it then it uses the second set effect at the location of the previous first set. When the counter buffs are maxed then it stops.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
The problem with that is, I think they want an omnidirectional attack and not a single snaking blast.
From the OP I assume a real-life analogy would be several adjacent ponds, each with islands: If you throw in a (large) stone the ripples will spread outward from the impact point and curve around the islands, but will not reach any part of an adjacent pond even if it's closer to the original impact site. Travel time to any point is based on the distance through the water and not direct distance from the impact point.
To replicate that you'd need to spawn dummies around the caster, then attempt to spawn more dummies around each existing one, iterating until a preset maximum of some sort. The main problem I see is that you need a very small AoE around the dummy to get decent accuracy, which results in a massive amount of spawns when used on solid creep. So the main question is how many units exist in this map and how much CPU load graphics-less units cause.
In singleplayer on an empty map with a good computer you could probably iterate up to 15 range using Zergling-size AoEs within a second or two, but in a MOBA map that should crash the game quite effectively.
That could also be achieved with what I said with the persistents except it uses a multiplying persistent that has a 180 degree arc or an arc that does not include the caster + so many degrees.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Giving my though how i would try, maybe its totaly useless, maybe it will opens to new ideas.
Idea 1: I woud use trigger. When the ability is activated, create an invisible unit that would folow a specefic path described with offsets in the trigger. That unit would spawn creep under its feet same as the hero. For bigger creep circle during its path it could be in the same trigger when the unit has traveled x distance or wait that many secs, and put creep on x radius.
Idea 2: Use missile movers on an invisible unit that spawn creep and the mover has multiple state that would folow a specefic path.
You could replace the invisible units with a visual effect as well.
Working on projects:
There is actually a really simple way to do this. Just create an invisible dummy unit every x seconds, say every 1 seconds a dummy unit is created at the position of the hero, then calculate how long it takes for the creep to recede. Say it takes 5 seconds for it to recede. So give the dummy unit a timed life that expires in 5 seconds. Then any other ability you have that generates creep will also have to create a dummy unit as well at that location.
Then when you activate your "wave" ability, simply have an area search that finds the closest dummy unit to the hero, it then kills the dummy unit, triggers whatever effect you want, and then loops back to the area search to find the next closest dummy unit to the one that just died. (You can look up the chain lightning tutorial for a similar idea of how to get things to chain like this)
If the creep can only spread out to a radius of say 5, then you can assume that any adjoining creep will have a dummy unit within 5 radius of the last one.
If you want an omnidirectional expansion, you could trigger all dummy units within 5 radius of the hero, then all dummy units within 5 radius of the previous ones, ect..
As far as the effect goes, it would take a bit of calculation, for instance, you might have to change the radius based on how much timed life the unit has left. So if it only has 2 seconds left of it's 5 second life, the creep is most likely only 2 radius away from it. Or as previously mentioned, you could just at that point validate if the unit getting hit by the chain effect is on creep or not.
Problem is the thread creator was vague with what he wants it to do.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Creep is created by not only where the hero walks, but also by certain abilities in differant patterns...
Basically i want there to be a wave of damage that is bound to the creep, and it must be like a chain reaction that is bound on the creep starting from the hero, and moving outwards, that way if the creep bound "Path" to a unit from the hero to the unit was longer, the unit would have more time to step off the creep...
Maybe it would help if i explained some of the heros abilities 1-similar to psistorm - just deals damage and generates creep at the target area 2-Deals damage in a line, and also creates a path of creep along that line
So the hero could potentially create a patch of creep with ability 1 on a unit, then connect that patch of creep with the path of creep on the hero's feet using ability 2, so that it could use this "Wave" ability to shoot a shockwave of damage through the creep... i suppose i could just do what photoloss initially proposed, if i could make sure that the creep in the area was joined at some point...
hope that clears up exactly what i wanted it to have happin...
i appreciate all the help, i think i can use this information to put this ability together.
So you got spells that creates creep, and one spell that uses that creep to shoot a wave (and probably remove the creep?).
And you're looking to make the wave. If you place alot of creep around and wait to use the 3th spell, when you will use it, you want it to move accros all the creep in all the directions I bet.
If that's right, I see what you want to do but I don't have any idea lol. It's like imaginating that the creep is paper and you spread paper all around and then you decide to light it in fire. The paper will burn from your hero and spread around and damage any enemy that is in the fire.
Working on projects: