Im pretty sure this is possible, but i dont know how nor do dont know how i would put it into words through web searching. So im asking here: Is it possible to have a doodad(or pathing fooprint) break the line between a attacking unit, and the target unit. For example, lets say i have two units outside a room made of doodads that are supposed to be walls, and inside that room is a enemy unit i want to kill. Normally i could simply send a single unit in to gain sight of the unit, and then attack with both units and it wouldnt matter if i that unit outside of the room was inside because normal starcraft physics allows units to shoot through doodads. So is there a way to make these doodads(walls) not allow units to shoot through them? This is mainly for realism.
Only would work for doodads with footprints. Otherwise just read the tutorial on colliding projectiles.
Either way you would need a Launch Missile effect on all attacks so beams would still be an issue unless they are just visually attached the the missile.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Aw, thats a shame because just about all of my weapons in the map DONT use missiles... There is no other alternative? Because thie shooting through walls thing really bugs me and a launch missile effect for every weapon would just suck. The wall doodads DO use a 1x1 footprint.
EDIT: if i have no choice but to add a launch missile effect for every weapon, is it possible to avoid the trouble of adding missile actors, ammo units, and setting the stats for these would-be newly added effects/units? And just have the "invisible missile" travel instantly to simulate non-missile attacks but to have this realism added to it.
All could share the same ammo unit what uses the invisible model.
You would need a launch missile effect for each one but would just ened to determine the impact effect and ammo unit (copy and paste). Just give the ammo unit a dang fast mover although the faster it moves the harder it is to validate for.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I test tested to se eif my weapon that do use missiles couldnt shoot past these walls, and they do shoot through them... so would making these weapon launch missiles even help? Or is it possible that the footprint the doodad is using is allowing missiles to pass it?
I test tested to se eif my weapon that do use missiles couldnt shoot past these walls, and they do shoot through them... so would making these weapon launch missiles even help? Or is it possible that the footprint the doodad is using is allowing missiles to pass it?
These are the kind of missiles DrSuperEvil was talking about, you have to set them up in a way that they check periodically whether or not they are colliding with a unit that is in their path.
How would i do that? Also, they wouldnt check for a unit, they would check for a doodad since i use many wall segments and converting all of them to units could cause lag. I can assume the missiles that are launched need a special mover and also while this is a nice substitute for what i wanted i was planning on units not even targeting a unit through a wall, because then in a situation with a choke point, unit might prioritize targeting a unit tha tis behind the wall, while other units are getting through the choke. I will see if i can accomplish what i want frmo this tutorial.
Before i read the tutorial, i downloaded the map that came from the tutorial, just to see if my doodads would block the missiles from these abilities, and they dont... so i dont think this is what im looking for otherwise it should work as i desire, this tutorial is for missiles colliding with UNITS, not doodads.
Also, they wouldnt check for a unit, they would check for a doodad since i use many wall segments and converting all of them to units could cause lag
You can preplace a lot of units without causing lag. But even if you want to do it without units you can validate your ability so it doesn't shoot through an area if that area is not pathable, so giving your doodads footprints would make them both unpathable as well as not allowing to shoot through.
also while this is a nice substitute for what i wanted i was planning on units not even targeting a unit through a wall, because then in a situation with a choke point, unit might prioritize targeting a unit tha tis behind the wall, while other units are getting through the choke. I will see if i can accomplish what i want frmo this tutorial.
I don't know any way to do that kind of stuff in the data editor, I have doubts that it's possible. Doing this via triggers is definitely possible though.
You have to realize that Doodads themselves aren't even part of the game for units, the only interaction between units and doodads from an engine standpoint is that Doodads can have Footprints which prevent Units from walking there. Other than that, Doodads don't even exist for Units as far as I'm aware.
Before i read the tutorial, i downloaded the map that came from the tutorial, just to see if my doodads would block the missiles from these abilities, and they dont... so i dont think this is what im looking for otherwise it should work as i desire, this tutorial is for missiles colliding with UNITS, not doodads.
That's because the projectiles in the tutorials don't have validators that validate whether an area is pathable or not. You can easily add them after you understand the ability though, which makes your weapons unable to shoot through FOOTPRINTS. Doodads aren't even a thing that you can validate via Data, Doodads are just a visual thing.
I understand that doodads are just visual, i was mainly focusing on the footprint of the doodad, not the model of it. I guess i have no choice but to add a missile for all weapons which is a huge inconvenience. I put the validator for the weapon in the launch missle effect?
I understand that doodads are just visual, i was mainly focusing on the footprint of the doodad, not the model of it. I guess i have no choice but to add a missile for all weapons which is a huge inconvenience. I put the validator for the weapon in the launch missle effect?
No, you have to set up a Persistent effect that periodically checks if the missile is colliding with something in its way (that method is described in the tutorial that I linked and that DrSuperEvil was talking about) and in that periodic check you have to validate whether or not the missile is still on pathable terrain.
That still doesn't prevent the unit from trying to fire through the wall though, so even if there is a unit in a choke or something like you described the unit will still try to fire through the wall if there is an enemy that is closer.
If you need a more realistic system with smarter units I would strongly recommend to use triggers for that.
This video shows a pretty early version of my map, but you can see how the enemy unit tries to avoid my damage by taking cover behind the doodad and notices (well, at least sometimes) when his line of sight prevents him from shooting me so he also tries to move somewhere else. That's similar to what you want, right? Just without the visible projectiles, but that's only the missile model that you have to change.
I don't know of any other way to do this kind of stuff. If you find a way, let me know. :)
Hmm, i just added a validator that at first seemed to work better than you said, it wouldnt let me shoot through walls or even target units through walls, this could be bad because it causes units to just simply not attack even if thye could go around the wall... but this will do for now. however, there are many doodads that use similar footprints, there are walls(the difference is that these ones block line of sight), and scenery such as crates(which just block unit movement and building). So now both of these doodad(footprint) types cannot have missiles passing them while this validator is in effect. So is the solution youre giving me fix this, or would it still come up with the same issue?
AFTER VIEWING SECOND POST: Youre map is very unique, that is not quite how i my attacks to work(they work exactly as regular Starcraft 2 attacking does), yes i want them to be blocked by doodads(footprints) but not ALL doodads.
EDIT: sigh... as it turns out my validator doesnt work, it still thinks that a target cant be reached when it can be, i couldve swore that i checked that and it worked but i just checked again to be sure and it doesnt...
Hmm, i just added a validator that at first seemed to work better than you said, it wouldnt let me shoot through walls or even target units through walls, this could be bad because it causes units to just simply not attack even if thye could go around the wall... but this will do for now. however, there are many doodads that use similar footprints, there are walls(the difference is that these ones block line of sight), and scenery such as crates(which just block unit movement and building). So now both of these doodad(footprint) types cannot have missiles passing them while this validator is in effect. So is the solution youre giving me fix this, or would it still come up with the same issue?
AFTER VIEW SECOND POST: Youre map is very unique, that is not quite how i my attacks to work(they work exactly as regular Starcraft 2 attacking does), yes i want them to be blocked by doodads(footprints) but not ALL doodads. A
Yes, but if you think of the units you see like normal units instead of that WASD-controlled style and of the projectiles of normal attacks instead of that rapid fire then it is similar to the thing that you want? I don't see much of a difference, you don't want to be able to shoot through walls and I don't want to be able to shoot through walls.
The solution I gave (with Doodads) has exactly the issue that you are talking about that Footprints aren't very specific and you can't shoot through a lot of stuff that you want to be able to shoot through. That's why we recommended to use Units, because that way you can decide yourself which parts of the scenery you want to be able to shoot through (these are the Doodads with or without pathing) and which you don't want to be able to shoot through (these are Units).
So, overall i need to have a launch effect with a persistent effect that checks for units? Does that mean that the attack missile will activate its impact effect if it collides with a unit? Which means i will have to convert my walls into units..which means reworking the entire terrain. Is it possible that a mover checks to see if it collides with a unit, and at the collision is actiavtes the impact effect? Also, how exactly do i create a validator that checks for pathing? Because validators and movers are the things i know the least in the data module.
So, overall i need to have a launch effect with a persistent effect that checks for units? Does that mean that the attack missile will activate its impact effect if it collides with a unit? Which means i will have to convert my walls into units..which means reworking the entire terrain. Is it possible that a mover checks to see if it collides with a unit, and at the collision is actiavtes the impact effect?
Movers can't fire effects and they also can't see if they collide with a unit. Movers just determine the flight path of a missile (or a unit/jumper).
I also wouldn't rework the entire terrain with units, not only would that be a lot of unnecessary work of converting Doodads into Units, you also already put a lot of work into making the terrain look good. I would make one type of unit that you use for that stuff, give it an invisible model and just put it everywhere where you want it to be. Make sure to make the Editor Model for it something easily visible (I would use the Cylinder Shape model and scale it into the right radius of the unit and give it a large Z scale so you can easily place them and see it later on).
It's also easier to make the hitboxes look right with that method, because units can only have circular radiuses (radii?), while your walls and other obstacles probably have other shapes, so it's hard to realistically convert them into units without running into a lot of trouble.
Okay, well i still have to add every 1x1 invisible unit to every segment of wall(and i probably have about 500 wall segments set up around the map). Other than that, will the tutorial shown above help me with this, and i mean every single aspect of this would be covered by that tutorial. If not then what else would i need to do?
First problem you will run into is that you have to edit every single type of weapon/ability that is in your map and not supposed to shoot through walls into the Launch Missile/Persistent combination that is described in the tutorial, while making the Missile invisible. You don't need additional Validators if you use Units. It will still be a lot of work, so unless it is really an important and core mechanic of your map I'd just scrap the whole idea right now.
Another problem is that the projectiles described in the tutorial are set up in a way that they fly straight in front of the unit and don't always connect with the target, while you want your projectiles to always hit the target (like a normal attack). You can fix that problem by modifying the Target: Location and Impact: Location fields in the Initial and Launch Missile Effects described in the tutorial.
Another problem is that even when you did all that it will still not do exactly what you want, because this method doesn't prevent units from trying to shoot through walls, they will still always target the closest unit. That problem isn't solvable in Data as far as I'm concerned.
Another problem might be that your projectiles aren't traveling fast enough so there is a delay until they impact on your target, unlike normal attacks which connect immediately. You can't make your movers as fast as you want with the standard method described in the tutorial, because the periods in which they check if a target is near them can not be lowered less than 0.0625 seconds, so if the missile is too fast it might fly past the whole target in these 0.0625 seconds. There are ways to circumvent that problem and you can make your projectiles still collide on their path even if they are much faster, but it needs some adaptions.
There will probably be other problems that I can't think of right now.
Well the main reason i wanted the disallow units to attack through walls is for realism and that shooting through walls might give a EXTREMELY unfair defensive advantage, as when you have sight you can attack, so any enemy units that have to go around the entier wall to get to the entrance will be getting attacked on their way. Im obbessive complusive about making things realistic, and shooting through walls qualifies as a proposterous capability. I could solve defensive imbalance but not realism, except through this method. If only the editor was capable of a footprint that "Broke Attack Beams". If something like this existed then all of this wouldnt be nessecary... I guess ill have to live with ridiculous physics until i can muster the willpower to change everything manually...
Well the main reason i wanted the disallow units to attack through walls is for realism and that shooting through walls might give a EXTREMELY unfair defensive advantage, as when you have sight you can attack, so any enemy units that have to go around the entier wall to get to the entrance will be getting attacked on their way. Im obbessive complusive about making things realistic, and shooting through walls qualifies as a proposterous capability. I could solve defensive imbalance but not realism, except through this method. If only the editor was capable of a footprint that "Broke Attack Beams". If something like this existed then all of this wouldnt be nessecary... I guess ill have to live with ridiculous physics until i can muster the willpower to change everything manually...
If such Footprints existed you'd still have to do the Launch Missile/Persistent part though, because there is no other way to validate the whole attack path of your attacks.
I agree that it would be nice to have something like this in the Editor, but you have to see that Starcraft 2 is designed in a way that there should be 200-300 units in a battle at the same time without lag. If you implement a built in way to calculate the attack path for every of their weapons it gets laggy really, really fast. And as it's not a requirement for standard strategy SC2 play it is understandable that it is not a part of the Data Editor.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Im pretty sure this is possible, but i dont know how nor do dont know how i would put it into words through web searching. So im asking here: Is it possible to have a doodad(or pathing fooprint) break the line between a attacking unit, and the target unit. For example, lets say i have two units outside a room made of doodads that are supposed to be walls, and inside that room is a enemy unit i want to kill. Normally i could simply send a single unit in to gain sight of the unit, and then attack with both units and it wouldnt matter if i that unit outside of the room was inside because normal starcraft physics allows units to shoot through doodads. So is there a way to make these doodads(walls) not allow units to shoot through them? This is mainly for realism.
Only would work for doodads with footprints. Otherwise just read the tutorial on colliding projectiles.
Either way you would need a Launch Missile effect on all attacks so beams would still be an issue unless they are just visually attached the the missile.
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
Aw, thats a shame because just about all of my weapons in the map DONT use missiles... There is no other alternative? Because thie shooting through walls thing really bugs me and a launch missile effect for every weapon would just suck. The wall doodads DO use a 1x1 footprint.
EDIT: if i have no choice but to add a launch missile effect for every weapon, is it possible to avoid the trouble of adding missile actors, ammo units, and setting the stats for these would-be newly added effects/units? And just have the "invisible missile" travel instantly to simulate non-missile attacks but to have this realism added to it.
All could share the same ammo unit what uses the invisible model.
You would need a launch missile effect for each one but would just ened to determine the impact effect and ammo unit (copy and paste). Just give the ammo unit a dang fast mover although the faster it moves the harder it is to validate for.
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
I test tested to se eif my weapon that do use missiles couldnt shoot past these walls, and they do shoot through them... so would making these weapon launch missiles even help? Or is it possible that the footprint the doodad is using is allowing missiles to pass it?
http:www.sc2mapster.com/forums/resources/tutorials/17154-data-colliding-projectiles/
These are the kind of missiles DrSuperEvil was talking about, you have to set them up in a way that they check periodically whether or not they are colliding with a unit that is in their path.
How would i do that? Also, they wouldnt check for a unit, they would check for a doodad since i use many wall segments and converting all of them to units could cause lag. I can assume the missiles that are launched need a special mover and also while this is a nice substitute for what i wanted i was planning on units not even targeting a unit through a wall, because then in a situation with a choke point, unit might prioritize targeting a unit tha tis behind the wall, while other units are getting through the choke. I will see if i can accomplish what i want frmo this tutorial.
Before i read the tutorial, i downloaded the map that came from the tutorial, just to see if my doodads would block the missiles from these abilities, and they dont... so i dont think this is what im looking for otherwise it should work as i desire, this tutorial is for missiles colliding with UNITS, not doodads.
Just replicate the abilities in the tutorial and try to understand how they work.
You can preplace a lot of units without causing lag. But even if you want to do it without units you can validate your ability so it doesn't shoot through an area if that area is not pathable, so giving your doodads footprints would make them both unpathable as well as not allowing to shoot through.
For this tutorial they don't need any special movers. A simple Guidance Mover is completely fine, you can use whatever Mover you want though.
I don't know any way to do that kind of stuff in the data editor, I have doubts that it's possible. Doing this via triggers is definitely possible though.
You have to realize that Doodads themselves aren't even part of the game for units, the only interaction between units and doodads from an engine standpoint is that Doodads can have Footprints which prevent Units from walking there. Other than that, Doodads don't even exist for Units as far as I'm aware.
edit:
That's because the projectiles in the tutorials don't have validators that validate whether an area is pathable or not. You can easily add them after you understand the ability though, which makes your weapons unable to shoot through FOOTPRINTS. Doodads aren't even a thing that you can validate via Data, Doodads are just a visual thing.
I understand that doodads are just visual, i was mainly focusing on the footprint of the doodad, not the model of it. I guess i have no choice but to add a missile for all weapons which is a huge inconvenience. I put the validator for the weapon in the launch missle effect?
No, you have to set up a Persistent effect that periodically checks if the missile is colliding with something in its way (that method is described in the tutorial that I linked and that DrSuperEvil was talking about) and in that periodic check you have to validate whether or not the missile is still on pathable terrain.
That still doesn't prevent the unit from trying to fire through the wall though, so even if there is a unit in a choke or something like you described the unit will still try to fire through the wall if there is an enemy that is closer.
If you need a more realistic system with smarter units I would strongly recommend to use triggers for that.
To elaborate on that:
This video shows a pretty early version of my map, but you can see how the enemy unit tries to avoid my damage by taking cover behind the doodad and notices (well, at least sometimes) when his line of sight prevents him from shooting me so he also tries to move somewhere else. That's similar to what you want, right? Just without the visible projectiles, but that's only the missile model that you have to change.
I don't know of any other way to do this kind of stuff. If you find a way, let me know. :)
Hmm, i just added a validator that at first seemed to work better than you said, it wouldnt let me shoot through walls or even target units through walls, this could be bad because it causes units to just simply not attack even if thye could go around the wall... but this will do for now. however, there are many doodads that use similar footprints, there are walls(the difference is that these ones block line of sight), and scenery such as crates(which just block unit movement and building). So now both of these doodad(footprint) types cannot have missiles passing them while this validator is in effect. So is the solution youre giving me fix this, or would it still come up with the same issue?
AFTER VIEWING SECOND POST: Youre map is very unique, that is not quite how i my attacks to work(they work exactly as regular Starcraft 2 attacking does), yes i want them to be blocked by doodads(footprints) but not ALL doodads.
EDIT: sigh... as it turns out my validator doesnt work, it still thinks that a target cant be reached when it can be, i couldve swore that i checked that and it worked but i just checked again to be sure and it doesnt...
Yes, but if you think of the units you see like normal units instead of that WASD-controlled style and of the projectiles of normal attacks instead of that rapid fire then it is similar to the thing that you want? I don't see much of a difference, you don't want to be able to shoot through walls and I don't want to be able to shoot through walls.
The solution I gave (with Doodads) has exactly the issue that you are talking about that Footprints aren't very specific and you can't shoot through a lot of stuff that you want to be able to shoot through. That's why we recommended to use Units, because that way you can decide yourself which parts of the scenery you want to be able to shoot through (these are the Doodads with or without pathing) and which you don't want to be able to shoot through (these are Units).
So, overall i need to have a launch effect with a persistent effect that checks for units? Does that mean that the attack missile will activate its impact effect if it collides with a unit? Which means i will have to convert my walls into units..which means reworking the entire terrain. Is it possible that a mover checks to see if it collides with a unit, and at the collision is actiavtes the impact effect? Also, how exactly do i create a validator that checks for pathing? Because validators and movers are the things i know the least in the data module.
Movers can't fire effects and they also can't see if they collide with a unit. Movers just determine the flight path of a missile (or a unit/jumper).
I also wouldn't rework the entire terrain with units, not only would that be a lot of unnecessary work of converting Doodads into Units, you also already put a lot of work into making the terrain look good. I would make one type of unit that you use for that stuff, give it an invisible model and just put it everywhere where you want it to be. Make sure to make the Editor Model for it something easily visible (I would use the Cylinder Shape model and scale it into the right radius of the unit and give it a large Z scale so you can easily place them and see it later on).
It's also easier to make the hitboxes look right with that method, because units can only have circular radiuses (radii?), while your walls and other obstacles probably have other shapes, so it's hard to realistically convert them into units without running into a lot of trouble.
Okay, well i still have to add every 1x1 invisible unit to every segment of wall(and i probably have about 500 wall segments set up around the map). Other than that, will the tutorial shown above help me with this, and i mean every single aspect of this would be covered by that tutorial. If not then what else would i need to do?
Hmm, hard to say in advance. I'll try.
First problem you will run into is that you have to edit every single type of weapon/ability that is in your map and not supposed to shoot through walls into the Launch Missile/Persistent combination that is described in the tutorial, while making the Missile invisible. You don't need additional Validators if you use Units. It will still be a lot of work, so unless it is really an important and core mechanic of your map I'd just scrap the whole idea right now.
Another problem is that the projectiles described in the tutorial are set up in a way that they fly straight in front of the unit and don't always connect with the target, while you want your projectiles to always hit the target (like a normal attack). You can fix that problem by modifying the Target: Location and Impact: Location fields in the Initial and Launch Missile Effects described in the tutorial.
Another problem is that even when you did all that it will still not do exactly what you want, because this method doesn't prevent units from trying to shoot through walls, they will still always target the closest unit. That problem isn't solvable in Data as far as I'm concerned.
Another problem might be that your projectiles aren't traveling fast enough so there is a delay until they impact on your target, unlike normal attacks which connect immediately. You can't make your movers as fast as you want with the standard method described in the tutorial, because the periods in which they check if a target is near them can not be lowered less than 0.0625 seconds, so if the missile is too fast it might fly past the whole target in these 0.0625 seconds. There are ways to circumvent that problem and you can make your projectiles still collide on their path even if they are much faster, but it needs some adaptions.
There will probably be other problems that I can't think of right now.
Well the main reason i wanted the disallow units to attack through walls is for realism and that shooting through walls might give a EXTREMELY unfair defensive advantage, as when you have sight you can attack, so any enemy units that have to go around the entier wall to get to the entrance will be getting attacked on their way. Im obbessive complusive about making things realistic, and shooting through walls qualifies as a proposterous capability. I could solve defensive imbalance but not realism, except through this method. If only the editor was capable of a footprint that "Broke Attack Beams". If something like this existed then all of this wouldnt be nessecary... I guess ill have to live with ridiculous physics until i can muster the willpower to change everything manually...
If such Footprints existed you'd still have to do the Launch Missile/Persistent part though, because there is no other way to validate the whole attack path of your attacks.
I agree that it would be nice to have something like this in the Editor, but you have to see that Starcraft 2 is designed in a way that there should be 200-300 units in a battle at the same time without lag. If you implement a built in way to calculate the attack path for every of their weapons it gets laggy really, really fast. And as it's not a requirement for standard strategy SC2 play it is understandable that it is not a part of the Data Editor.