I have created a behavior in the data editor that searches in an area front of a unit with a period of 0.4, and if it finds a target it will issue a move order towards the point where it found the target. Now what I am trying to do is make the unit that has this ability return to his original position before he found the target if he can no longer find it for one search period. I am making this so that I can let a unit trigger combat if you get too close, portalling you elsewhere. But you can outrun that unit and avoid combat that way, when that happens it should return to his starting position. (if possible facing direction aswell)
As for the ability itself, it is just a behavior applied to a unit that uses a search effect and a move issue order effect to get to the target. I already made a return effect (move issue order) but I couldn't really figure anything out with that one.
Create a persistent effect at the starting point which issue orders the unit back to it but has the effect disabled by a validator which counts a counter buff applied to the unit by the sees target effect tree. Use the persist until destroyed flag in the persistent. As for facing the right direction you will need some kind of marker units that it can use as a reference. If you use three you could even get those to act as the guide back to the starting location. By having attraction/repusion if under or over a certain distance.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I really can't seem to figure out how to use a persistant along with a validator. I have tried searching for some tutorials that explain it but I couldn't find one that makes things any clearer for me. Perhaps I could attach my map so you can take a look at my effects/etc?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have created a behavior in the data editor that searches in an area front of a unit with a period of 0.4, and if it finds a target it will issue a move order towards the point where it found the target. Now what I am trying to do is make the unit that has this ability return to his original position before he found the target if he can no longer find it for one search period. I am making this so that I can let a unit trigger combat if you get too close, portalling you elsewhere. But you can outrun that unit and avoid combat that way, when that happens it should return to his starting position. (if possible facing direction aswell)
As for the ability itself, it is just a behavior applied to a unit that uses a search effect and a move issue order effect to get to the target. I already made a return effect (move issue order) but I couldn't really figure anything out with that one.
Create a persistent effect at the starting point which issue orders the unit back to it but has the effect disabled by a validator which counts a counter buff applied to the unit by the sees target effect tree. Use the persist until destroyed flag in the persistent. As for facing the right direction you will need some kind of marker units that it can use as a reference. If you use three you could even get those to act as the guide back to the starting location. By having attraction/repusion if under or over a certain distance.
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
@DrSuperEvil: Go
I really can't seem to figure out how to use a persistant along with a validator. I have tried searching for some tutorials that explain it but I couldn't find one that makes things any clearer for me. Perhaps I could attach my map so you can take a look at my effects/etc?