So anyway. Ignore than dramatic title. Simple put, I am trying to get this creep crawler from Thrikodas to automatically burrow and unborrow searching for new locations on the map without creep. Ever time it burrows, it leaves and used creep tumor, then spawns a new creep crawler than burrows in another location without creep. I'd also like these to be able to run away to a specified location when they sense a uncloaked detector nearby and be able to be controlled by the player temporarily with control, returned to them after a while. This might be ridiculously complicated to do, but if its reasonably easy to do enough, I might give this a try. Any ideas how to get this working?
With triggers, you can just command this unit to burrow at random intervals to a random location, and then unborrow after a while (which I would also randomize). I don't know though if there is a way to check if there is creep around.
There are two ways, if you cannot find a way to know that:
1) Not recommended, but fine if you need that only for a specific map: define an array of points of your choice and just make the units burrow/unburrow every so often. Pretty easy to do but very dull.
2) Completely random as a base, only with some conditions enforced: within a certain range from the point in which you are (in burrowed situation) and also distant from other units that requires OR generate creep. This require for you to define an action, looking for a random point in certain ranges, and keep looking until one which fits those requirement is found.
This could also make you randomize the unburrow (I assume you want to unburrow only when you have found another destination) and burrow commands, by using a temporized trigger (for example: event -> every 1 seconds of game time) which call the action defined above, without while cycles, for all the existing units.
I hope I gave you some ideas, I can help you more, if you need, this was just a brainstorming. Anyway, if you find a way to find if a place has creep by trigger, you still need to check for random points with that conditions.
About data, I don't know how to make AI in data. It's something I should learn, but never had the chance to.
Rollback Post to RevisionRollBack
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
I am going to give this a try soon. Thx for the information. I very new to triggers so I have a lot to learn yet. As for checking if an item is on creep. There is a very simple way to do that. Create a behavior(It can be a wide variety of them from what I am aware), then a search effect with a validator that checks "On creep" I got malignant creep working this way.