First Question: How do you create a wave of units that attacks in the general vicinity of a unit for each player?
Example: Each player's "King" is the target of the attack waves, but intervening units and buildings are attacked as well.
2nd Question: SOLVED.
Third Question: I have a Warp Prism with Attack (Redirect) replacing the normal attack, so it acts like a bunker. Why the hell is it a "missing model" dome?
Last Question: I need a periodic event timer giving X Minerals every 5 seconds, where X is supposed to be the number of Supply Depots built by the player. I would like this to work for each player if possible. If not, I'll just duplicate it for each player.
First Question: How do you create a wave of units that attacks in the general vicinity of a unit for each player?
Example: A hero unit in Base Survival Revisited is the target of all the attack waves, but the enemy will attack intervening units as well.
"Issue Order", then change one of the parameters to "Ability targetting point" or something along that line. This, however, will not automatically follow the hero unit, so you'd have to issue new orders regularly so that they attack the correct point in case the hero moves far.
Second Question: How do you restrict the placement of a specific building (let's say a supply depot) to a specific type of terrain?
Example: WC3 Had "Lumber Mills" In Custom Castle Defense. You could only build them in predetermined areas.
Look at either using creep (You can change the creep texture), or if you are not using the "resource" footprint (The thing that prevents nexi/CCs/hatcheries from being built near minerals and gas) you can try using that in reverse (i.e. instead of a structure having "resource" marked as not allowed, you mark it as required. Then create invisible dummy units with a resource footprint and place them as you wish)
Third Question: Here's the tough one...I need to modify the Warp prism to be a transport/bunker. Searching the forum didn't bring up this particular problem.
Warp Prism (Transport) just loads up units and moves around. No problems there.
Warp Prism (Phasing) Is supposed to allow those units to attack from inside.
Bonus: If the Prism could visually "Land" that would be amazing. Not a priority though.
The bunker has the ability "attack redirect" I believe. Add it to the warp prism and a button for it, and it *should* work. Just compare the warp prism to the bunker if it doesn't work and mess around. Shouldn't be too hard to get it right.
Having it land... I can't remember where, but all air units are "flying" because of a field that determines their height. Its either under actors or units, the former being more likely. Find their height field and lower it.
Last Question: I have a periodic event timer giving X Minerals every 5 seconds, where X is supposed to be the number of Supply Depots built by the player.
Trigger to count the depots:
General - Pick each integer from 1 to 10, and do (Actions)
Variable - Set GoldIncome = (Supply Depot count for player (Picked integer), counting Complete)
Trigger to give the Minerals:
General - Pick each integer from 1 to 10, and do (Actions)
Player - Modify player (Picked integer) Minerals: Add GoldIncome
I don't see a question?
EDIT: If you want me to clarify some of my suggestions, I'll try and check this thread again and do so.
Hi. I've only ever created 1 map and never published one, but maybe I can help with a few things.
1st: Having units attack the hero while still attacking units on their path:
Never tried it, but you should be able to give units an attack move command to a point near the unit in question.
2nd: Restricting Buildings to an Area:
I've tried to do this ony my map and did not find a solution with the data editor.
I ended up creating zones where I wanted specific buildings to be allowed and enforced it with triggers.
To do this, create a trigger with event "any unit creats any unit with any effect", then check if the created unit is the kind of building you want to restrict access for. If not, destroy the unit and refund the player.
Also, I'd suggest giving a bit of UI feedback like "This building can only be placed in certain areas of the map [pings on areas]"
3rd: No idea here, sorry
4th: Periodically giving income to a player:
There should be a tutorial covering this. I would not suggest updating the income via iteration over all supply depots in a fixed time interval.
Instead, add a function to the "any unit creats any unit with any effect" trigger, check if it's a supply depot and if so, modify the players income.
The distribution of the income looks nice, I'd use "for each integer betwenn 1 and 10" though.
"Pick each integer" does not nest (you cant "pick each integer" inside a "pick each integer" loop).
This might not be a problem in most cases, but it's better to stick to something that always works in my opinion.
EDIT: TheAlmaity did have a few very nice ideas, better stick to what he said
@TheAlmaity: Go
@Attack Waves:
Would "AI - Set the target for player 11 attack waves to (Enemies of player 11)" Work? I would suspect that the wave system is more random, which I like, but does it actually send them whenever a new set is spawned?
@Resources:
I am indeed not using the resource footprints at all. That could work nicely.
EDIT: I have no idea what that is. I just looked for it.
@Attack Redirect:
Occam's Razor it is. I tried all kinds of silly combinations of attack redirect and cloned bunker abilities. Didn't even consider just using redirect on its own.
@Triggers Question:
Those triggers aren't updating the income correctly. I attached a sound prompt to make sure it was firing, and the income one definitely is. I don't know about the income checker though.
You could create a grid of hidden (invisible model) units that you build your stuff ontop of similar to the refineries on geysers.
You need to give the transport unit a Redirect Target ability to tell units inside it to use the attack ability. The visual landing can be done with a buff using the Unit Modification - Height field.
Never used attack waves. I presumed you just did "Issue Order to unit". Seeing as it's an AI function, it's not as simple (I think you will need to add units to an attack wave (something that works like a unit group I believe, but has seperate trigger actions for setting it up) and use a few more other actions, but I dont really know, never used them. If that action alone works, that's great.)
Resources:
Created a footprint and open its "Layers field"
Underneath the grid is a drop down menu marked "Layers". Select "Placement Apply".
Click "Define Sets", then check the "Near Resources" checkbox and uncheck the rest.
Now click on the grid's boxes (I dont't know how large your restricted areas have to be, or what shapes they need to be. If they are just large boxes, you can make a single footprint covering it. Or you can make a small footprint and place it as many times as needed (i.e. using a 1x1 footprint to sort of paint pathing)
Go back to the first thing in the dropdown menu, pick "ground" pathing from the buttons below and click near the center of the grid to paint that pathing (If I remember right, leaving the pathing layer empty causes the unit not to snap to the building grid)
This is now your build zone footprint. Create a unit, set its flags to unselectable, uncommandable, untargetable and invulnerable (And whatever else seems reasonable), its minimap radius to 0, and then set its footprint to the one you just created. create an actor for it using the model "Invisible". This is now your dummy unit to place the areas you want stuff to be built in. Place the unit wherever you need it. ctrl+shift+h shows the build grid I believe, could be helpful.
Do the same thing again to create a footprint for your structure, but this time instead of "placement apply" pick "Placement check" and in define sets make "near resources" required and "no build" invalid and paint the grid as needed. Then on placement check make a "no build" set and paint the grid again (This is so that structures cant be stacked). Then paint the grid in the pathing layer with "building" so that units can't pass through it (This layer allows more detailed pathing, there are buttons showing you the grid with smaller and smaller triangles inside the boxes, those will allow you to paint in smaller detail. You can use this to make buildings act as if they were round, etc.)
Attack Redirect: So it works? Good :)
Income trigger: Ok... If your income is purely periodic and has no conditions, you can use data instead. Create a "modify player" effect, make it give minerals equal to your income per supply depot, then create a behavior of type buff, make the modify player effect be the "Periodic effect", change the behaviors period to whatever the tick time should be, and give it an infinite duration (either -1 or 0). This will be out of sync though as the behavior starts ticking as soon as the supply depot is finished building. If you want them all to tick at the same time, instead of giving the behavior to the supply depot in the units tab, leave them without it and apply the behavior through triggers every time income should tick, that way all supply depots get the behavior right on the tick and will be in sync.
Otherwise, create an integer array to represent income. Increase it everytime a supply depot is built, decrease it everytime one is destroyed (If its at all possible to do that in your map). If your events for some reason wont fire, you can use behaviors and effects instead (Behavior with a 1 second duration and an empty set effect as the initial effect, then have a trigger use an effect event), those never failed me.
Both the income trigger and the resources hurt my brain. I tried following your instructions for the footprint, but I got quickly overwhelmed by it. I'll get back to that. As for the resource system...Behavior? What?
1. Do you know Pathing tool? It is easist way to make unbuildable ares for yor map.
3. Try to add Attack (Redirect) for your Warp Prism. I have created APC unit this way (=units inside APC can shoot) Remember to add some weapon / turret for Warp Prism.
I dont know the actual triggers but in theory, you could use the Attack Command on the waves via triggers to make it attack all buildings and units in its way.
First Question: How do you create a wave of units that attacks in the general vicinity of a unit for each player?
Example: Each player's "King" is the target of the attack waves, but intervening units and buildings are attacked as well.
-Your question is kind of confusing compared to the example, but here we go. Use the issue order to unit group command, make the unit group your attack wave, click on the blue "(" and choose order targeting unit. Make the targeted unit the king. If you want them to stop after entering a certain distance around the king and attack, create a new trigger and use the unit enters a certain distance around a point (search up "unit enters/leaves" then look at the three that pop up and choose the one that has "point" in its name) event, make a new condition, hit ok (the condition we want is automatically selected when you create a new condition), change the player to the player that conntrols the attack wave and the issue order command to triggering unit to stop.-
2nd Question: SOLVED.
Third Question: I have a Warp Prism with Attack (Redirect) replacing the normal attack, so it acts like a bunker. Why the hell is it a "missing model" dome?
-This is a glitch that happens a lot when you duplicate a unit, I have a feeling you did so, to fix this, go under the warp prism actor and change its art, which has been changed to no model because you duplicated the actor when you duplicated the unit, so refill those in to the correct values, and you should be good. Also, you can modify a unit's height under the UI field within the data editor-
Finnaly understood what you meant in your 1st question (I think), So do your issue order to unit group command, the unit group being your attack wave, click on the left parenthesis bracked that it blue and choose order targeting point, set your point, and make the ability command attack. You should set your point where the king is.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
First Question: How do you create a wave of units that attacks in the general vicinity of a unit for each player?
Example: Each player's "King" is the target of the attack waves, but intervening units and buildings are attacked as well.
2nd Question: SOLVED.
Third Question: I have a Warp Prism with Attack (Redirect) replacing the normal attack, so it acts like a bunker. Why the hell is it a "missing model" dome?
Last Question: I need a periodic event timer giving X Minerals every 5 seconds, where X is supposed to be the number of Supply Depots built by the player. I would like this to work for each player if possible. If not, I'll just duplicate it for each player.
"Issue Order", then change one of the parameters to "Ability targetting point" or something along that line. This, however, will not automatically follow the hero unit, so you'd have to issue new orders regularly so that they attack the correct point in case the hero moves far.
Look at either using creep (You can change the creep texture), or if you are not using the "resource" footprint (The thing that prevents nexi/CCs/hatcheries from being built near minerals and gas) you can try using that in reverse (i.e. instead of a structure having "resource" marked as not allowed, you mark it as required. Then create invisible dummy units with a resource footprint and place them as you wish)
The bunker has the ability "attack redirect" I believe. Add it to the warp prism and a button for it, and it *should* work. Just compare the warp prism to the bunker if it doesn't work and mess around. Shouldn't be too hard to get it right.
Having it land... I can't remember where, but all air units are "flying" because of a field that determines their height. Its either under actors or units, the former being more likely. Find their height field and lower it.
I don't see a question?
EDIT: If you want me to clarify some of my suggestions, I'll try and check this thread again and do so.
Hi. I've only ever created 1 map and never published one, but maybe I can help with a few things.
1st: Having units attack the hero while still attacking units on their path:
Never tried it, but you should be able to give units an attack move command to a point near the unit in question.
2nd: Restricting Buildings to an Area:
I've tried to do this ony my map and did not find a solution with the data editor.
I ended up creating zones where I wanted specific buildings to be allowed and enforced it with triggers.
To do this, create a trigger with event "any unit creats any unit with any effect", then check if the created unit is the kind of building you want to restrict access for. If not, destroy the unit and refund the player.
Also, I'd suggest giving a bit of UI feedback like "This building can only be placed in certain areas of the map [pings on areas]"
3rd: No idea here, sorry
4th: Periodically giving income to a player:
There should be a tutorial covering this. I would not suggest updating the income via iteration over all supply depots in a fixed time interval.
Instead, add a function to the "any unit creats any unit with any effect" trigger, check if it's a supply depot and if so, modify the players income.
The distribution of the income looks nice, I'd use "for each integer betwenn 1 and 10" though.
"Pick each integer" does not nest (you cant "pick each integer" inside a "pick each integer" loop).
This might not be a problem in most cases, but it's better to stick to something that always works in my opinion.
EDIT: TheAlmaity did have a few very nice ideas, better stick to what he said
@TheAlmaity: Go @Attack Waves: Would "AI - Set the target for player 11 attack waves to (Enemies of player 11)" Work? I would suspect that the wave system is more random, which I like, but does it actually send them whenever a new set is spawned?
@Resources: I am indeed not using the resource footprints at all. That could work nicely. EDIT: I have no idea what that is. I just looked for it.
@Attack Redirect: Occam's Razor it is. I tried all kinds of silly combinations of attack redirect and cloned bunker abilities. Didn't even consider just using redirect on its own.
@Triggers Question: Those triggers aren't updating the income correctly. I attached a sound prompt to make sure it was firing, and the income one definitely is. I don't know about the income checker though.
You could create a grid of hidden (invisible model) units that you build your stuff ontop of similar to the refineries on geysers.
You need to give the transport unit a Redirect Target ability to tell units inside it to use the attack ability. The visual landing can be done with a buff using the Unit Modification - Height field.
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
@nytemare3701: Go
Never used attack waves. I presumed you just did "Issue Order to unit". Seeing as it's an AI function, it's not as simple (I think you will need to add units to an attack wave (something that works like a unit group I believe, but has seperate trigger actions for setting it up) and use a few more other actions, but I dont really know, never used them. If that action alone works, that's great.)
Resources:
Created a footprint and open its "Layers field"
Underneath the grid is a drop down menu marked "Layers". Select "Placement Apply".
Click "Define Sets", then check the "Near Resources" checkbox and uncheck the rest.
Now click on the grid's boxes (I dont't know how large your restricted areas have to be, or what shapes they need to be. If they are just large boxes, you can make a single footprint covering it. Or you can make a small footprint and place it as many times as needed (i.e. using a 1x1 footprint to sort of paint pathing)
Go back to the first thing in the dropdown menu, pick "ground" pathing from the buttons below and click near the center of the grid to paint that pathing (If I remember right, leaving the pathing layer empty causes the unit not to snap to the building grid)
This is now your build zone footprint. Create a unit, set its flags to unselectable, uncommandable, untargetable and invulnerable (And whatever else seems reasonable), its minimap radius to 0, and then set its footprint to the one you just created. create an actor for it using the model "Invisible". This is now your dummy unit to place the areas you want stuff to be built in. Place the unit wherever you need it. ctrl+shift+h shows the build grid I believe, could be helpful.
Do the same thing again to create a footprint for your structure, but this time instead of "placement apply" pick "Placement check" and in define sets make "near resources" required and "no build" invalid and paint the grid as needed. Then on placement check make a "no build" set and paint the grid again (This is so that structures cant be stacked). Then paint the grid in the pathing layer with "building" so that units can't pass through it (This layer allows more detailed pathing, there are buttons showing you the grid with smaller and smaller triangles inside the boxes, those will allow you to paint in smaller detail. You can use this to make buildings act as if they were round, etc.)
Attack Redirect: So it works? Good :)
Income trigger: Ok... If your income is purely periodic and has no conditions, you can use data instead. Create a "modify player" effect, make it give minerals equal to your income per supply depot, then create a behavior of type buff, make the modify player effect be the "Periodic effect", change the behaviors period to whatever the tick time should be, and give it an infinite duration (either -1 or 0). This will be out of sync though as the behavior starts ticking as soon as the supply depot is finished building. If you want them all to tick at the same time, instead of giving the behavior to the supply depot in the units tab, leave them without it and apply the behavior through triggers every time income should tick, that way all supply depots get the behavior right on the tick and will be in sync.
Otherwise, create an integer array to represent income. Increase it everytime a supply depot is built, decrease it everytime one is destroyed (If its at all possible to do that in your map). If your events for some reason wont fire, you can use behaviors and effects instead (Behavior with a 1 second duration and an empty set effect as the initial effect, then have a trigger use an effect event), those never failed me.
Both the income trigger and the resources hurt my brain. I tried following your instructions for the footprint, but I got quickly overwhelmed by it. I'll get back to that. As for the resource system...Behavior? What?
1. Do you know Pathing tool? It is easist way to make unbuildable ares for yor map.
3. Try to add Attack (Redirect) for your Warp Prism. I have created APC unit this way (=units inside APC can shoot) Remember to add some weapon / turret for Warp Prism.
OP Updated with revised questions and whatnot.
I dont know the actual triggers but in theory, you could use the Attack Command on the waves via triggers to make it attack all buildings and units in its way.
I have in-quote replies, marked by "-" on either end:
Finnaly understood what you meant in your 1st question (I think), So do your issue order to unit group command, the unit group being your attack wave, click on the left parenthesis bracked that it blue and choose order targeting point, set your point, and make the ability command attack. You should set your point where the king is.