Noobie data editor here. I'm currently designing a diplomacy map, and I was wondering if there is a way through data or triggers that activates when a unit moves within a set range to a type of doodad, or walks on top of a specific terrain texture. In this map I'm attempting to add a behavior to units who walk under any tree doodad, and there will be lots of trees on the map.
The alternative I thought of is to use regions, but it would take several hundred regions to cover all the areas where trees are present.
No, sorry. For the most part, doodads cannot interact with units, with the exception being destructible doodads (being destroyed is all that they do). To have a doodad do something when a unit draws near, it needs to be turned into a unit. So change the tree doodad actors to unit actors, connect them to a tree unit, and then give the unit an behavior that every 0.5 seconds searches for nearby units. Then, when it finds them, it uses an Add Behavior effect on those units.
You will also have to delete all of the current tree doodads placed on the map and replace them with tree units.
Just a warning, turning trees into units will slow down your map if you have a heck of a lot of trees. One tweak is to set the Fog Visibility (in the UNIT data, not in the Actor data) to Dimmed, so that the trees do not have snapshot actors. This will help a lot.
As for terrain textures, no, sadly there's nothing that can reference them, even in triggers. You have to resort to regions.
Actually destructibles are units. Doodads are actors that can have a footprint to stop being walked over but otherwise do not interact with a unit although their actor can be affected by units using Query Region actors like the colossus tree burn.
I'm going to have to use regions after all. I assume having hundreds of regions does not have much effect on latency? Are regions tied to data or trigger, or both?
Good day folks.
Noobie data editor here. I'm currently designing a diplomacy map, and I was wondering if there is a way through data or triggers that activates when a unit moves within a set range to a type of doodad, or walks on top of a specific terrain texture. In this map I'm attempting to add a behavior to units who walk under any tree doodad, and there will be lots of trees on the map.
The alternative I thought of is to use regions, but it would take several hundred regions to cover all the areas where trees are present.
Thanks in advance for your assistance.
@TheLostAzn: Go
No, sorry. For the most part, doodads cannot interact with units, with the exception being destructible doodads (being destroyed is all that they do). To have a doodad do something when a unit draws near, it needs to be turned into a unit. So change the tree doodad actors to unit actors, connect them to a tree unit, and then give the unit an behavior that every 0.5 seconds searches for nearby units. Then, when it finds them, it uses an Add Behavior effect on those units.
You will also have to delete all of the current tree doodads placed on the map and replace them with tree units.
Just a warning, turning trees into units will slow down your map if you have a heck of a lot of trees. One tweak is to set the Fog Visibility (in the UNIT data, not in the Actor data) to Dimmed, so that the trees do not have snapshot actors. This will help a lot.
As for terrain textures, no, sadly there's nothing that can reference them, even in triggers. You have to resort to regions.
Actually destructibles are units. Doodads are actors that can have a footprint to stop being walked over but otherwise do not interact with a unit although their actor can be affected by units using Query Region actors like the colossus tree burn.
@TrenchaunT: Go
Jetter solution just have a buff on the unit that is disabled by an Enumerate Area validator unless near a tree type unit.
You can determine what texture set is used but not an individual texture. A cheap workaround is to have a hidden unit nearby to allow the change.
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
All right, thanks both of you for your answers.
I'm going to have to use regions after all. I assume having hundreds of regions does not have much effect on latency? Are regions tied to data or trigger, or both?
I believe 1.5 added a Terrain Texture At Point trigger that you could use.
Bump.
I'd very much like to know if having 100+ regions to apply a behavior, done in either triggers or data, would cause significant lag in multiplayer.
1.5 isn't out yet, but has this already been implemented into the editor?