I'm working on an ability where a barrage of small rockets is launched at a target unit or point. I have everything working, except that all of the missiles currently go to the exact same point. What I'd like to do is have each of them target a random point within a set radius (say, 2.5).
My thinking right now is that the answer lies somewhere in the "Impact Attachment Query" field of the Attack actor for the spell, but I haven't fully figured out how attach methods work (and how they are different from site ops.)
Anyone implemented anything like this and feel like saving me hours and hours of trial and error?
Do you want the rocket impacts to only visually spread out across a small area, or do you want the damage to be spread out as well?
If it's only visually then you need to look at actors, although if it's both, then there's not way it can be solved through actors only.
I already have the effects and actors created. There's a Create Persistent effect which periodically (every .1 second for 2 seconds) spawns a Launch Missile effect, and then there's a Damage effect triggered on the missile impact that does splash damage. All of that's working fine - the only problem is that all of the missiles travel directly to the target point.
I figure either the Impact Attachment Query, or the projectile unit's Mover, is what I need to look at.
I found the solution. Create Persistent effects have a "Random Offset" flag, this will cause each effect to randomly pick one of the offsets from the "periodic offset" field, so just add a bunch of different values spread out in a circle and presto, it works perfectly.
So, I was wondering if you could tell me how to do this?
I have no idea of how you make the missiles hit random spots within a target area. I have been experiementing but I cannot make it work.
Any help would be appreciated. (btw, I'm modding a weapon not an ability)
Use the SOp (Random Point In Circle) and atach that to the impack site Site actor if you want it to be purely visual. If you want it to be actual damage effects you are after a chain of about 4 different create persistent effects that choose one of the periodic effects at random that eventually leads to a periodic that does the launch missile effect at an offset.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
sorry, but i kinda need a more basic explanation than that. Btw i want it to be the damage, that the missiles are launched at offsets.
From what i read i have to make 4 different create persistent effects, that in turn link to 4 periodic effects at random?
So:
4 new
Thor - Anti Air (Persistent)
and 4 new
Thor - Anti Air (Launch Missile)
?
(working with the thor - javelin missile weapon)
How do i string this together?
Also should there not be a way of just linking one effect inbetween the persistent effect (channeling - making the missile launch 4 times)
and the actual launch missile? That way every time it runs it launches it at an offset?
Sorry, kinda newb on this data editing. If you could give a more detailed explanation taht would be lovely.
ok, i got it to bombard an area around the target.
but now i got a new problem. It seems it bombards the area where the unit was a sec ago, thereby nuking behind it when its moving.
Anyway i can get the missile hits to actually hit the target and around it? even tho its moving?
Since the random effect is not completely without bias you need to create a peristent effect with the Random Effect flag checked that has one of the Effect - Period Effects linking to a series of second periodic effects which do the same and so on. Eventually you get to the periodic effects that do the actual launch missile effects which are limited to 32 effects each. To ensure complete damage coverage you will have to order potential damage regions into a hexagonal mesh. Presuming you only had two layers of Create Persistent effects with the first leading to 4 random create persistent effects then you could order it that the haxagons of the region were taken up by repeated sequential order.
The end result would be that the missile would be randomly launched by one of the 4 create persistent effects that would then be randomly launched to one of the potential impact sites and since there are two sets of create persistent with random effects involved the random sampling error would be reduced to that of the square root of one create persistent effect.
If you want it to always hit the target then you are not wanting it to be random and I suggest my first suggestion of making it purely an actor thing to give the visual impression of being random.
I'm working on an ability where a barrage of small rockets is launched at a target unit or point. I have everything working, except that all of the missiles currently go to the exact same point. What I'd like to do is have each of them target a random point within a set radius (say, 2.5).
My thinking right now is that the answer lies somewhere in the "Impact Attachment Query" field of the Attack actor for the spell, but I haven't fully figured out how attach methods work (and how they are different from site ops.)
Anyone implemented anything like this and feel like saving me hours and hours of trial and error?
Do you want the rocket impacts to only visually spread out across a small area, or do you want the damage to be spread out as well?
If it's only visually then you need to look at actors, although if it's both, then there's not way it can be solved through actors only.
I already have the effects and actors created. There's a Create Persistent effect which periodically (every .1 second for 2 seconds) spawns a Launch Missile effect, and then there's a Damage effect triggered on the missile impact that does splash damage. All of that's working fine - the only problem is that all of the missiles travel directly to the target point.
I figure either the Impact Attachment Query, or the projectile unit's Mover, is what I need to look at.
I think it's the impact attachment query... if you shoot at a unit. There's an attach method that picks random points on the model.
It doesn't seem so easy if you target a point, but I'd look at the random scatter of 250mm cannons which is its own actor category (random point).
Again, do you want the damage effect to be spread out, or do you only want it to look like the effect is spread out?
I found the solution. Create Persistent effects have a "Random Offset" flag, this will cause each effect to randomly pick one of the offsets from the "periodic offset" field, so just add a bunch of different values spread out in a circle and presto, it works perfectly.
edit: Video of it in action:
I understand that this post is super ancient but thank you anyway, its not often that i find a solution so cleanly cut
So, I was wondering if you could tell me how to do this? I have no idea of how you make the missiles hit random spots within a target area. I have been experiementing but I cannot make it work. Any help would be appreciated. (btw, I'm modding a weapon not an ability)
Use the SOp (Random Point In Circle) and atach that to the impack site Site actor if you want it to be purely visual. If you want it to be actual damage effects you are after a chain of about 4 different create persistent effects that choose one of the periodic effects at random that eventually leads to a periodic that does the launch missile effect at an offset.
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
@DrSuperEvil: Go
sorry, but i kinda need a more basic explanation than that. Btw i want it to be the damage, that the missiles are launched at offsets. From what i read i have to make 4 different create persistent effects, that in turn link to 4 periodic effects at random? So: 4 new Thor - Anti Air (Persistent) and 4 new Thor - Anti Air (Launch Missile) ? (working with the thor - javelin missile weapon)
How do i string this together? Also should there not be a way of just linking one effect inbetween the persistent effect (channeling - making the missile launch 4 times) and the actual launch missile? That way every time it runs it launches it at an offset?
Sorry, kinda newb on this data editing. If you could give a more detailed explanation taht would be lovely.
ok, i got it to bombard an area around the target. but now i got a new problem. It seems it bombards the area where the unit was a sec ago, thereby nuking behind it when its moving. Anyway i can get the missile hits to actually hit the target and around it? even tho its moving?
Since the random effect is not completely without bias you need to create a peristent effect with the Random Effect flag checked that has one of the Effect - Period Effects linking to a series of second periodic effects which do the same and so on. Eventually you get to the periodic effects that do the actual launch missile effects which are limited to 32 effects each. To ensure complete damage coverage you will have to order potential damage regions into a hexagonal mesh. Presuming you only had two layers of Create Persistent effects with the first leading to 4 random create persistent effects then you could order it that the haxagons of the region were taken up by repeated sequential order.
The end result would be that the missile would be randomly launched by one of the 4 create persistent effects that would then be randomly launched to one of the potential impact sites and since there are two sets of create persistent with random effects involved the random sampling error would be reduced to that of the square root of one create persistent effect.
If you want it to always hit the target then you are not wanting it to be random and I suggest my first suggestion of making it purely an actor thing to give the visual impression of being random.
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