straight to the point: i am using colliding projectiles -> caster fires missile - missile hits target - target takes dmg, missile destroyed
so far so good, the problem is if a unit is infront of the caster the missile just passes by (fast missile, collision check set to 0.06). if i increase the range of the collision i also hit targets behind (!) the caster and now the clue of the problem, i could have solved it with an angle ( <= 180 degress for collision) but those damn missiles are spawned with default facing (facing 270°) and then target towards the target point (shooting towards the player works fine, because the missile already faces in that direction).
so any ideas how to create a missile with the right facing, not facing target after creation
Use a weapon with a 180 degree arc instead of a persistent check. It lags less when a lot of missiles are involved (not that effects cause much lag), it's instant, and it'll only hit things infront of you!
its better to fake very fast colliding missiles, and use just lots of tiny search area effects within create persistent, just like hellion attack. And visualy just launch missile in unit that collide with search area effect.
@TyaArcade: Go
i am not using a weapon, it's an ability with a target point (not a unit).
no lag so far, even with full house (everyone spamming)
@abvdzh: Go
i have a behaviour on the missile that periodically searches for close units. i cannot use the caster as reference (the missile is fast but not that fast), the missile might be still around while the caster is facing somewhere different.
ah i was reading your post too fast. now i get it. any way to exclude the caster from the weapon search? (team killing is part of the game)
will try out now, either close or bump this thread then.
It has a field called "scan filters". Enable "player" and "ally" on this. This will basically let your weapon "auto-attack" allied units.
Uncheck "Self" too, which will prevent this weapon from ever attacking the source unit.
Lastly, you want to give your weapon itself a very small scan range. Say, 0.5, or whatever works for you. This will stop the missile from chasing anything, though given your setup I don't think that this will be a problem!
because you doing it wrong. Don't use behaviours in effect chains ever, because you will lost the source unit. You need to execute persistent as effect: launch when missile is fired. By loosing source unit i mean you will not be able to reference it in your effect chain anymore, so the caster of damage effect will be missile instead of caster. The missile will get kill credit and experience + you wont be able to increase damage by applying damage buff to the source unit (at least not with the proper approach, you still will be able to do this with damage modifier source field but that will be a mess)
If you will set up everything properly you dont need even this weapon on missile workaround cuz you will be able to properly reference your missile unit for angle validation and your source unit to exclude it from search
Use behaviours only for buffs, to inflict damage use only persistents cuz otherwise you wont be able to buff spell damage or get a proper kill credit on caster unit.
if the buff is applied by the caster the caster reference is not lost, kill count also works
update:
couldn't make it work with weapons but ..
i am using an additional search effect on the behaviour init with target point AND source point set to caster unit. this will use the facing of the caster unit once. all other combinations do not work and will always hit 270°
Self only excludes the source unit, which is the missile itself, not the caster unit.
You're right, I'd have to check but I think a "Not Caster" validator on the first effect in the weapon chain would work instead. Still, it seems like you have a solution anyway!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
hello there,
straight to the point: i am using colliding projectiles -> caster fires missile - missile hits target - target takes dmg, missile destroyed
so far so good, the problem is if a unit is infront of the caster the missile just passes by (fast missile, collision check set to 0.06). if i increase the range of the collision i also hit targets behind (!) the caster and now the clue of the problem, i could have solved it with an angle ( <= 180 degress for collision) but those damn missiles are spawned with default facing (facing 270°) and then target towards the target point (shooting towards the player works fine, because the missile already faces in that direction).
so any ideas how to create a missile with the right facing, not facing target after creation
Use a weapon with a 180 degree arc instead of a persistent check. It lags less when a lot of missiles are involved (not that effects cause much lag), it's instant, and it'll only hit things infront of you!
its better to fake very fast colliding missiles, and use just lots of tiny search area effects within create persistent, just like hellion attack. And visualy just launch missile in unit that collide with search area effect.
@TyaArcade: Go i am not using a weapon, it's an ability with a target point (not a unit). no lag so far, even with full house (everyone spamming)
@abvdzh: Go i have a behaviour on the missile that periodically searches for close units. i cannot use the caster as reference (the missile is fast but not that fast), the missile might be still around while the caster is facing somewhere different.
This doesn't matter. You can still put a weapon onto a missile! It just needs the usual assortment of supporting assets attached to it.
@TyaArcade: Go
ah i was reading your post too fast. now i get it. any way to exclude the caster from the weapon search? (team killing is part of the game)
will try out now, either close or bump this thread then.
Go to the "attack" ability and duplicate it.
It has a field called "scan filters". Enable "player" and "ally" on this. This will basically let your weapon "auto-attack" allied units.
Uncheck "Self" too, which will prevent this weapon from ever attacking the source unit.
Lastly, you want to give your weapon itself a very small scan range. Say, 0.5, or whatever works for you. This will stop the missile from chasing anything, though given your setup I don't think that this will be a problem!
Self only excludes the source unit, which is the missile itself, not the caster unit.
because you doing it wrong. Don't use behaviours in effect chains ever, because you will lost the source unit. You need to execute persistent as effect: launch when missile is fired. By loosing source unit i mean you will not be able to reference it in your effect chain anymore, so the caster of damage effect will be missile instead of caster. The missile will get kill credit and experience + you wont be able to increase damage by applying damage buff to the source unit (at least not with the proper approach, you still will be able to do this with damage modifier source field but that will be a mess)
If you will set up everything properly you dont need even this weapon on missile workaround cuz you will be able to properly reference your missile unit for angle validation and your source unit to exclude it from search
Use behaviours only for buffs, to inflict damage use only persistents cuz otherwise you wont be able to buff spell damage or get a proper kill credit on caster unit.
if the buff is applied by the caster the caster reference is not lost, kill count also works
update:
couldn't make it work with weapons but ..
i am using an additional search effect on the behaviour init with target point AND source point set to caster unit. this will use the facing of the caster unit once. all other combinations do not work and will always hit 270°
You're right, I'd have to check but I think a "Not Caster" validator on the first effect in the weapon chain would work instead. Still, it seems like you have a solution anyway!