I have a request pretty hard to formulate so if I'm not clear let me know.
I want to do an attack that replace the standart attack that is automatic to do so that you need to aim and pray that it touches the ennemy but without changing the animation the projectile or anything. Because I have to do it for many unit I need it to be simple and still looking good.
And last how do you change the place a projectile is coming out
Hi, I think with the way you worded this post probably no one will be able to help you so im going to clarify some things in order for you make your problem request understandable.
First, in starcraft 2 no attack will be "aimed" (in a way where you use the mouse to select a target point and attack) attack are simply performed at a target unit, if you want to aim any effect you'll have to use an ability target effect that uses an effect at a target location which can be a launch missile effect, an effect AoE area effect that affect units in a circle, a cone, or a rectangle to apply another effect to units within the area of effect. That been said you can make the effect of a unit's weapon attack to launch an specific effect at a random point or several random points near the attacked unit giving it a random chance of hitting or no hitting the target. or if its a weapon that targets ground units, you can make an effects that launches a missile in straigth line to a fixed distance that explodes after colliding with a ground unit or reaching its final destination or pierces all enemies in a straight line like the lurker attack, that will also grants the posibility for the missile to fail hitting it's target if the target moves out of the way before the missile reaches it. So you have a possibility of doing this changing the effect of a weapon to give it a random chance of striking its target, but yo could also take a unit remove its weapon and attack abilities and add an effect target ability that uses one of the effects I described before, make the ability autocastable, and make the ability be able to target the ground or nearby units, so that the taget ability works like an attack that can be performed at a target point or unit and if you leave the autocast active it will use the ability in the same way it would use a weapon while there are available targets.
Regarding your question about where to change the place where a projectile comes out of unit when performing a launch missile effect, that is determined by the action actor that is linked to a launch missile effect (if you are duplicating all the components or modifying an existing launch missile effect), within the action actor in question you will find a field named "Launch Attachment Query", there you can choose the name of an attachment point that the model a given has to launch the missile from that point, the most common attachment points are origin (model's feet), center (center of a model), weapon (the unit's model weapon attachment point) and there are many others but is important to keep in mind that not all unit model have the same named attachment points.
Finally, to receive helpful feedback when posting a question or a request, you should decompose the problem in simple and concrete problems to solve, in order for people to be able help you. Your post clearly shows to me that you don't have clarity about how weapons or launch missile effects work in fine detail, so first you should study those subjects on your own, as well as action actors, damage effects, randon point effects and search area effects.
My other recommendation would be to join the sc2mapster discord (you can find the link, by clicking in the "forums" tab of this site. The link is located in the square box that is right below). If you join the discord there is a section called data where you can post any data question and there are many active sc2 modders that may reply with an answer way faster than here. I tell you this because most sc2 modders are not very active in the forums of this website, and sometimes you won't get any reply for days or even months and I don't always have the time to make replies in this forum.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have a request pretty hard to formulate so if I'm not clear let me know.
I want to do an attack that replace the standart attack that is automatic to do so that you need to aim and pray that it touches the ennemy but without changing the animation the projectile or anything. Because I have to do it for many unit I need it to be simple and still looking good.
And last how do you change the place a projectile is coming out
Hi, I think with the way you worded this post probably no one will be able to help you so im going to clarify some things in order for you make your problem request understandable.
First, in starcraft 2 no attack will be "aimed" (in a way where you use the mouse to select a target point and attack) attack are simply performed at a target unit, if you want to aim any effect you'll have to use an ability target effect that uses an effect at a target location which can be a launch missile effect, an effect AoE area effect that affect units in a circle, a cone, or a rectangle to apply another effect to units within the area of effect. That been said you can make the effect of a unit's weapon attack to launch an specific effect at a random point or several random points near the attacked unit giving it a random chance of hitting or no hitting the target. or if its a weapon that targets ground units, you can make an effects that launches a missile in straigth line to a fixed distance that explodes after colliding with a ground unit or reaching its final destination or pierces all enemies in a straight line like the lurker attack, that will also grants the posibility for the missile to fail hitting it's target if the target moves out of the way before the missile reaches it. So you have a possibility of doing this changing the effect of a weapon to give it a random chance of striking its target, but yo could also take a unit remove its weapon and attack abilities and add an effect target ability that uses one of the effects I described before, make the ability autocastable, and make the ability be able to target the ground or nearby units, so that the taget ability works like an attack that can be performed at a target point or unit and if you leave the autocast active it will use the ability in the same way it would use a weapon while there are available targets.
Regarding your question about where to change the place where a projectile comes out of unit when performing a launch missile effect, that is determined by the action actor that is linked to a launch missile effect (if you are duplicating all the components or modifying an existing launch missile effect), within the action actor in question you will find a field named "Launch Attachment Query", there you can choose the name of an attachment point that the model a given has to launch the missile from that point, the most common attachment points are origin (model's feet), center (center of a model), weapon (the unit's model weapon attachment point) and there are many others but is important to keep in mind that not all unit model have the same named attachment points.
Finally, to receive helpful feedback when posting a question or a request, you should decompose the problem in simple and concrete problems to solve, in order for people to be able help you. Your post clearly shows to me that you don't have clarity about how weapons or launch missile effects work in fine detail, so first you should study those subjects on your own, as well as action actors, damage effects, randon point effects and search area effects.
Here I leave you a video to make skilllshot effects that may come handy to make non homing attacks: https://www.youtube.com/watch?v=xradjsdTlfg&t=147s&ab_channel=LazZ'sMapmaking
My other recommendation would be to join the sc2mapster discord (you can find the link, by clicking in the "forums" tab of this site. The link is located in the square box that is right below). If you join the discord there is a section called data where you can post any data question and there are many active sc2 modders that may reply with an answer way faster than here. I tell you this because most sc2 modders are not very active in the forums of this website, and sometimes you won't get any reply for days or even months and I don't always have the time to make replies in this forum.