Oh yeah, that is what was wrong. Don't know how I missed that so many times.
So, in continuation of my galaxy editor learning process, now that I got that trigger to work I've scrapped it and I'm trying another method. Not really related, but it should be kind of cool if I get it working. I'm basically setting up an array of points around each cow and setting up functions to return a desirability value for each of these points based on said point's proximity to various positive (food, other cows) or negative (cowboy, zergling) units. The unit will then move to the most desirable point. If it works, this should allow much more freedom and adaptability, and will be more elegant than a different function for herd movement, fleeing, eating, etc. If you're interested, I'll let you know how it works out.
The example you attached is pretty much exactly what I want. For some reason, I still can't get it to work in my map though. Maybe I made some change to the cow unit that's interrupting things?
Edit: Got it working now! I think one of my conditions was calling for a triggering unit after I had changed the trigger to periodic event, though I can't find the error in the code below.
Anyhow, here's the current version of my triggers:
So this is what I hacked together, but it's still not working. Initially the trigger was timing out, so I added the tries counter and a quick .1 second wait for good measure. I see the trigger firing in the debugger, but my cows aren't moving (neither the passive ones nor the ones already in their herd routine). If you see any errors or have any ideas, I'd love to hear! My only thought is that maybe the pathing cost is in different units or on a different scale than the actual distance. I'll see what happens if the allowable pathing cost is a much larger number. Edit: I set the limit for pathing cost to 80 and still got nothing, so it doesn't seem like this is the problem.
I had forgotten to disable the wander behavior, which was giving me problems. Looks like it's working now. I'm still having a little issue, though. Maybe somebody will have a creative way to deal with it. I'm trying to implement this behavior for a bunch of cows so that can be herded. If a unit is near the edge of a corral (or up against any other obstacle) the movement order will often be to a point outside of the corral. This means that rather than moving away from the attacker, the unit will take a potentially long path around the obstacle. I can think of two potential ways to get around this, but I don't really know how to do either of them. The first would be to somehow check the path to the selected point and see how long it is. If it's a certain amount longer than offset distance of the move order, the movement would be canceled. I can't seem to find any to return a pathing distance rather than an absolute distance thought. The other potential solution would be to use an ability other than move that would be set up so the unit would just move in a certain direction for a certain time, rather than move targeting a point, but I really have no idea how to go about this. (are there any abilities already like this?)
Edit:
Apparently there's a function that returns the pathing cost between two points. I'll see if I can get it to work and report back.
So I'm having a similar problem. I have a trigger that's more or less exactly what Berrala wrote above (if attacked, move to point x amount from triggering unit, polar offset by angle between attacking unit and triggering unit). It's just not doing anything at all. My theory was that another movement-related trigger was messing with it, but on disabling those other triggers I still had the same problem.
Though I've been making slow but steady progress on figuring out the editor, I've encountered a few things that seem too frustrating to be merely sharp-learning-curve related. First, all my triggers disappeared. Luckily I had only made a couple basic things at that point (e.g. revealing the map and assigning some starting resources). Though those triggers seem to be lost forever, restarting the editor allowed me to rebuild the triggers (before the restart all the trigger-related menus were blank). This problem is, at least assuming it doesn't recur, fixed. I mention it because I wonder if it might be related to the other problem I'm having: all my terrain and button textures have disappeared. The map itself appears as totally black other than my one little builder man, and the units and doodads menus are filled with little blue and red squares. Not sure if this is relevant, but if I go to Map > Map Textures, the current texture set is listed as ZhakulDas (unknown) and the only option in the New Texture Set menu is Story Mode. Also, if I test the map, everything seems to function properly. All the textures and buttons work in game, just not in the editor.
Anybody else have this problem or know how to fix it?
Well, I managed to get the ability to work, more or less, based on the calldownMULE ability, but there are still two issues. First, the animation is doubled. Two little canisters fall from the sky, one after the other. I tried changing the associated model to see which one might disappear, but neither did, it just added a dumpster in addition to the two canisters. Second, it would be nice to have a little shadow-type placement helper as is present in building buildings instead of the crosshair.
Hey all, I apologize if a similar question has already been addressed. I did a search and found a lot of related things, but nothing that would answer my specific question. I'm Working on a Tower Defense type map. I'm trying to make a tower build via a calldown type ability. Ideally, the construction would be in two phases. On placing the tower, it would be dropped down in an unfinished state. The builder would then walk over to the building site and complete the tower. If this proves too complicated, I would be satisfied with simply dropping the tower in fully formed. I made a new ability based on the terran BuildDrop ability, but I can't get it to function properly (the command card button doesn't show up in game). In fact, I even tried giving the original builddrop ability to my guy with the default supply depot, and it still doesn't show up. Any advice?
0
@Berrala: Go
Oh yeah, that is what was wrong. Don't know how I missed that so many times. So, in continuation of my galaxy editor learning process, now that I got that trigger to work I've scrapped it and I'm trying another method. Not really related, but it should be kind of cool if I get it working. I'm basically setting up an array of points around each cow and setting up functions to return a desirability value for each of these points based on said point's proximity to various positive (food, other cows) or negative (cowboy, zergling) units. The unit will then move to the most desirable point. If it works, this should allow much more freedom and adaptability, and will be more elegant than a different function for herd movement, fleeing, eating, etc. If you're interested, I'll let you know how it works out.
0
The example you attached is pretty much exactly what I want. For some reason, I still can't get it to work in my map though. Maybe I made some change to the cow unit that's interrupting things?
Edit: Got it working now! I think one of my conditions was calling for a triggering unit after I had changed the trigger to periodic event, though I can't find the error in the code below.
Anyhow, here's the current version of my triggers:
Then the Flee Action:
0
So this is what I hacked together, but it's still not working. Initially the trigger was timing out, so I added the tries counter and a quick .1 second wait for good measure. I see the trigger firing in the debugger, but my cows aren't moving (neither the passive ones nor the ones already in their herd routine). If you see any errors or have any ideas, I'd love to hear! My only thought is that maybe the pathing cost is in different units or on a different scale than the actual distance. I'll see what happens if the allowable pathing cost is a much larger number. Edit: I set the limit for pathing cost to 80 and still got nothing, so it doesn't seem like this is the problem.
0
I had forgotten to disable the wander behavior, which was giving me problems. Looks like it's working now. I'm still having a little issue, though. Maybe somebody will have a creative way to deal with it. I'm trying to implement this behavior for a bunch of cows so that can be herded. If a unit is near the edge of a corral (or up against any other obstacle) the movement order will often be to a point outside of the corral. This means that rather than moving away from the attacker, the unit will take a potentially long path around the obstacle. I can think of two potential ways to get around this, but I don't really know how to do either of them. The first would be to somehow check the path to the selected point and see how long it is. If it's a certain amount longer than offset distance of the move order, the movement would be canceled. I can't seem to find any to return a pathing distance rather than an absolute distance thought. The other potential solution would be to use an ability other than move that would be set up so the unit would just move in a certain direction for a certain time, rather than move targeting a point, but I really have no idea how to go about this. (are there any abilities already like this?)
Edit: Apparently there's a function that returns the pathing cost between two points. I'll see if I can get it to work and report back.
0
So I'm having a similar problem. I have a trigger that's more or less exactly what Berrala wrote above (if attacked, move to point x amount from triggering unit, polar offset by angle between attacking unit and triggering unit). It's just not doing anything at all. My theory was that another movement-related trigger was messing with it, but on disabling those other triggers I still had the same problem.
0
Though I've been making slow but steady progress on figuring out the editor, I've encountered a few things that seem too frustrating to be merely sharp-learning-curve related. First, all my triggers disappeared. Luckily I had only made a couple basic things at that point (e.g. revealing the map and assigning some starting resources). Though those triggers seem to be lost forever, restarting the editor allowed me to rebuild the triggers (before the restart all the trigger-related menus were blank). This problem is, at least assuming it doesn't recur, fixed. I mention it because I wonder if it might be related to the other problem I'm having: all my terrain and button textures have disappeared. The map itself appears as totally black other than my one little builder man, and the units and doodads menus are filled with little blue and red squares. Not sure if this is relevant, but if I go to Map > Map Textures, the current texture set is listed as ZhakulDas (unknown) and the only option in the New Texture Set menu is Story Mode. Also, if I test the map, everything seems to function properly. All the textures and buttons work in game, just not in the editor. Anybody else have this problem or know how to fix it?
0
@Spintherism: Go
Well, I managed to get the ability to work, more or less, based on the calldownMULE ability, but there are still two issues. First, the animation is doubled. Two little canisters fall from the sky, one after the other. I tried changing the associated model to see which one might disappear, but neither did, it just added a dumpster in addition to the two canisters. Second, it would be nice to have a little shadow-type placement helper as is present in building buildings instead of the crosshair.
0
Hey all, I apologize if a similar question has already been addressed. I did a search and found a lot of related things, but nothing that would answer my specific question. I'm Working on a Tower Defense type map. I'm trying to make a tower build via a calldown type ability. Ideally, the construction would be in two phases. On placing the tower, it would be dropped down in an unfinished state. The builder would then walk over to the building site and complete the tower. If this proves too complicated, I would be satisfied with simply dropping the tower in fully formed. I made a new ability based on the terran BuildDrop ability, but I can't get it to function properly (the command card button doesn't show up in game). In fact, I even tried giving the original builddrop ability to my guy with the default supply depot, and it still doesn't show up. Any advice?