I already posted a topic for this, but I was unable to find a solution for my problem.
Everything is going great but I've a big big problem: The shield system making. Basically I've to make a missile to hit the shield when this is up and the real target when it is down. The best solution would be to make the missile hit the first encountered target, shield included. There is a rappresentation of what I've to do:
Any solution would be great, even if done by triggers, thanks :)
What exactly is this "shield"? If it's a unit just use a SearchArea effect or LocationRange/EnumerateArea validator to check for proximity, but that only works for objects that "exist" in the gameplay representation, not for Actors.
But not a huge interaction radius, right? The basic problem is that in gameplay terms units are simply points, and if enabled a circle around that point counts too. I don't know which of the radius fields is actually used, and how much that one will mess up collision interactions if you make it as large as the shield radius.
Have you tried Redirect Missile effects? Or the "hacky" version of Unit pathing+Issue Order effects? If your shield is spherical check the distance missile-shield gen first, and only if it is greater than the shield radius do the subsequent "shield up" check. That gives you a "Gungan bubble" effect, i.e. units inside the shield are free to shoot eachother and any "warp missile" that makes it inside without crossing the "edge" will also be unaffected (depending on the range of the external redirect)
Of course this is a specific version of a colliding missile, so you're fundamentally limited by search aoe vs. missile speed*check tick rate, make the outer redirect zone too small and missiles might fly straight through before the next distance check is done. The same delay also applies between the shield regaining power and the first successful redirect unless you force an update on all missiles currently in flight.
For a sphere the shield regen isn't a problem, you just check whether the missile is inside the protection radius first, or even launch a unique effect chain on reboot. You need an overkill handler anyway, so obviously invoke that too.
Oval is a problem, since that shape only exists in the actor attachment data. The best I can think of is to approximate it via several circular searches, which you can host on Persistent offsets. Essentially the shield generator would check for missiles in a predefined area around it, then check if they are already "inside" the shield, and if not redirect them at itself.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi guys, I'm making an FTL like mod for SC2. Here is the project page: http://www.sc2mapster.com/maps/my-nightmare-stars/
I already posted a topic for this, but I was unable to find a solution for my problem.
Everything is going great but I've a big big problem: The shield system making. Basically I've to make a missile to hit the shield when this is up and the real target when it is down. The best solution would be to make the missile hit the first encountered target, shield included. There is a rappresentation of what I've to do:
Any solution would be great, even if done by triggers, thanks :)
What exactly is this "shield"? If it's a unit just use a SearchArea effect or LocationRange/EnumerateArea validator to check for proximity, but that only works for objects that "exist" in the gameplay representation, not for Actors.
@Photoloss: Go
The shield is an unit with an huge shield radius.
But not a huge interaction radius, right? The basic problem is that in gameplay terms units are simply points, and if enabled a circle around that point counts too. I don't know which of the radius fields is actually used, and how much that one will mess up collision interactions if you make it as large as the shield radius.
Have you tried Redirect Missile effects? Or the "hacky" version of Unit pathing+Issue Order effects? If your shield is spherical check the distance missile-shield gen first, and only if it is greater than the shield radius do the subsequent "shield up" check. That gives you a "Gungan bubble" effect, i.e. units inside the shield are free to shoot eachother and any "warp missile" that makes it inside without crossing the "edge" will also be unaffected (depending on the range of the external redirect)
Of course this is a specific version of a colliding missile, so you're fundamentally limited by search aoe vs. missile speed*check tick rate, make the outer redirect zone too small and missiles might fly straight through before the next distance check is done. The same delay also applies between the shield regaining power and the first successful redirect unless you force an update on all missiles currently in flight.
@Photoloss: Go
These are the problems:
- The shield is oval
- Redirect isn't good, since the shield could be restored when the missile is about to hit the ship, so it goes back.
For the rest, I'm not sure how to do that, I have poor experience with missiles.
For a sphere the shield regen isn't a problem, you just check whether the missile is inside the protection radius first, or even launch a unique effect chain on reboot. You need an overkill handler anyway, so obviously invoke that too.
Oval is a problem, since that shape only exists in the actor attachment data. The best I can think of is to approximate it via several circular searches, which you can host on Persistent offsets. Essentially the shield generator would check for missiles in a predefined area around it, then check if they are already "inside" the shield, and if not redirect them at itself.