Make a set of effects, so when he is created, he is also issued an order to move at the caster. You can also use behavior, to periodically set the issue effect. Also, if somebody will attack him or caster, I'd suggest using a second behavior, that allows attacking enemy. Use validator, to check for "in combat" status.
Don't know that everything is in editor, but that's the idea. Good luck.
"its not working" does not help very much. Also, are we supposed to guess, how your complex ability works?
We cannot say much more than "use a periodic issue order to follow the caster." Thats how it works. Period.
If you want help for a specific problem with this setup, we need more information.
How exactly is your setup? What does happen right now? Is the unit simply not following? Does it do anything? Could you provide some more data, possibly a testmap?
ok heres the story, i have a unit create a building which applies a behavior to units in range of 8 to create units on their death which the created units have a periodic behavior to follow caster, but to the created units their caster is the building not the units, and Ive tried "effect create building caster unit" and when i do that it just goes to the bottom left of the map
Left Bottom usually means, that the unit cannot be found, is not available or dead. So try to use other units. Use for example Unit Origin or Source, also you could try to change the effect. If nothing helps, add a dummy persistent effect at the caster before creating the unit; persistents and their sources and targets can be tracked quite successfully, usually (it might be the case, that the create unit effect is no longer "there", when checking for it, so the caster cannot be found as well).
Also try to change the setup a little. Make the caster apply the behavior instead of the building. This way, you can directly reverence the caster from the behavior, instead of having to pick an effect (pick the effect for the apply behavior effect)
also i did the persistent dummy set duration to 0 1 count and the effect to the create building said caster unit of dummy and he went to the bottom and i make sure the unit is not dying
Actually this one is simple, I havent read all of the responses so if this has been resolved im sorry bro 8-)
The coolest thing about this method is that if the owner of the created units isnt moving they are free to acquire targets normally acording to their weapon and basic unit acquire response, but if the host starts moving then they move to him until he stops moving then they can do their thing again, however you cant take control of them and move them about whenever you want unless you set up a seperate ability which I could explain also if you wanted.
What you need is 1 App Behavior Effect, 1 Issue Order Effect and 1 Behavior. So just like a timed life or other such buff added to a created unit via the Effect - Spawn field you can add this behavior it is absolutely important that this behavior be added via that field in the create unit effect because this is like a giant trigger and the issue order effect will draw its target from the create unit effect. Any time you do this with an effect i.e use another effect to give it a target you must use an effect from the effect chain that the effect you are wokring on is in an example is what we are doing here.
In the issue order effect all you need to change is:
Ability - Ability Change this field from None to Move ( will issue the move order)
Target - Target + This is the juicy part. Change this field to caster unit, and above that where you can choose an effect choose the effect that creates the units. This way the issue order effect issues the move order to its target, to move to the caster unit of the create unit effect which created the unit it is ordering to move
Next make the App behavior effect and dont change any fields
Then make the behavior and its handy to name it the exact same name as the apply behavior effect it belongs to that way the editor will automatically add the Beh to the App Beh effect 8-). In the Behaviors periodic effect field add the issue order effect, change the time scale according to your preference and leave the duration at 0 which will make it last forever and leave the period count at -1 but change the period durations field to 1, I use 1 second some people may argue with that but the unit recieving the move order once per second is plenty I dont like using permanent persistent things like this with tiny little periods like .1 secs and such unless I have to as it may not slow the game down but it does make for more traffic one way or the other so I dont needlessly create data traffic if it can be avoided.
Now we are just about done all we have left to do is add a couple of validators to disable the issue order behavior when the caster isnt moving so that the created units can perform some other function than following their master =p. It may seem obvious to just use a Unit Compare Movement Speed which is basically a velocity validator but in my experience that doesnt work so good, so my magic recipe for this is Caster not in Combat, and Caster has Orders, these 2 validators are already there for you thanks to blizzard hehe and they work really well for this application, add them to the Behavior - Validators Disable Field dont worry about making a combine validator for it as any validators you add in that field are all by default part of an "and" function only if you need to use an "or" function do you need to use a combine validator here or of course unless you have a whole bunch of validators you want to use here.
These behavior fields work in reverse of themselves so that if the validator fails then it disables the behavior. So Caster not in Combat fails when the caster is in combat so once the caster takes damage, which is how that particular validator works the the caster is flagged in combat and the behavior is disabled and the slave unit is free to perform actions. Also if the Caster Has Orders returns false meaning the caster has no orders then it is disabled and once the owner has entered combat unless its issued a move order any other order is executed pretty much immediately and has no effect on the behavior but if you move the slave will follow you.
All of this is handled automatically by an Arm Magazine ability if you used one of those instead, but I know sometimes an ability that creates a unit just doesnt work good with arm magazines especially if you want to do more than just create the unit and apply an effect to it. Lemme know if this helps 8-)
OK I get it and thats easy too, provided the created units belong to the player who owns the building and also the unit that created the building. Put a behavior on your hero called "Ghoul Follow Target" that lasts forever and is hidden. Then create a validator that validates unit behavior count and change the behavior field to the Ghoul Follow Target beh we made change the compare field to greater than or equal to and the value to 1. Then make use that behavior to validate the target of the issue order effect. So your issue order effect will just issue move order to target target unit with no reference to any effect, and in the validator field add the Ghoul Follow Target validator, also change the Target field that refers to the unit recieving the order and change it to source, as source will refer to the bearer of the behavior, this is handy for any time you use behaviors caster and source become seperated when a behavior is involved i.e when a behavior is applied its applied from the caster but if that behavior uses say a search effect to launch a missile then those things are launched from source as the behavior denotes source from that point on. Then make a search effect and have it do the issue order effect in whatever radius you want the ghould to be able to find and then follow their master, and use that in the periodic effect of a behavior, make sure to set the impact location of the search to source point. The key here is using the behavior and validator to isolate and target the caster@aczchef: Go
sigh bump that didn't work drteyece if you could be more clear that would help a lil im not sure whats happening but i kinda understand whast suppost to be happening
how could i make a unit created with an effect follow the caster
Hm? I dint understand the question very well...U wanna create a unit that will follow the caster?("Who summoned it"?)
Make a set of effects, so when he is created, he is also issued an order to move at the caster. You can also use behavior, to periodically set the issue effect. Also, if somebody will attack him or caster, I'd suggest using a second behavior, that allows attacking enemy. Use validator, to check for "in combat" status.
Don't know that everything is in editor, but that's the idea. Good luck.
yes i cant figure out how to make him follow the caster
well i have what you said o3210 i have priodic behavior to follow him but its not working also its a lill more complex ablity
"its not working" does not help very much. Also, are we supposed to guess, how your complex ability works?
We cannot say much more than "use a periodic issue order to follow the caster." Thats how it works. Period.
If you want help for a specific problem with this setup, we need more information.
How exactly is your setup? What does happen right now? Is the unit simply not following? Does it do anything? Could you provide some more data, possibly a testmap?
ok heres the story, i have a unit create a building which applies a behavior to units in range of 8 to create units on their death which the created units have a periodic behavior to follow caster, but to the created units their caster is the building not the units, and Ive tried "effect create building caster unit" and when i do that it just goes to the bottom left of the map
Okay, thats something we can work with :)
Left Bottom usually means, that the unit cannot be found, is not available or dead. So try to use other units. Use for example Unit Origin or Source, also you could try to change the effect. If nothing helps, add a dummy persistent effect at the caster before creating the unit; persistents and their sources and targets can be tracked quite successfully, usually (it might be the case, that the create unit effect is no longer "there", when checking for it, so the caster cannot be found as well).
Also try to change the setup a little. Make the caster apply the behavior instead of the building. This way, you can directly reverence the caster from the behavior, instead of having to pick an effect (pick the effect for the apply behavior effect)
but have the caster apply would cause problems because it supposed to be at one spot and it reapplies it every 0.7 seconds
also i did the persistent dummy set duration to 0 1 count and the effect to the create building said caster unit of dummy and he went to the bottom and i make sure the unit is not dying
Actually this one is simple, I havent read all of the responses so if this has been resolved im sorry bro 8-)
The coolest thing about this method is that if the owner of the created units isnt moving they are free to acquire targets normally acording to their weapon and basic unit acquire response, but if the host starts moving then they move to him until he stops moving then they can do their thing again, however you cant take control of them and move them about whenever you want unless you set up a seperate ability which I could explain also if you wanted.
What you need is 1 App Behavior Effect, 1 Issue Order Effect and 1 Behavior. So just like a timed life or other such buff added to a created unit via the Effect - Spawn field you can add this behavior it is absolutely important that this behavior be added via that field in the create unit effect because this is like a giant trigger and the issue order effect will draw its target from the create unit effect. Any time you do this with an effect i.e use another effect to give it a target you must use an effect from the effect chain that the effect you are wokring on is in an example is what we are doing here.
In the issue order effect all you need to change is: Ability - Ability Change this field from None to Move ( will issue the move order) Target - Target + This is the juicy part. Change this field to caster unit, and above that where you can choose an effect choose the effect that creates the units. This way the issue order effect issues the move order to its target, to move to the caster unit of the create unit effect which created the unit it is ordering to move
Next make the App behavior effect and dont change any fields
Then make the behavior and its handy to name it the exact same name as the apply behavior effect it belongs to that way the editor will automatically add the Beh to the App Beh effect 8-). In the Behaviors periodic effect field add the issue order effect, change the time scale according to your preference and leave the duration at 0 which will make it last forever and leave the period count at -1 but change the period durations field to 1, I use 1 second some people may argue with that but the unit recieving the move order once per second is plenty I dont like using permanent persistent things like this with tiny little periods like .1 secs and such unless I have to as it may not slow the game down but it does make for more traffic one way or the other so I dont needlessly create data traffic if it can be avoided.
Now we are just about done all we have left to do is add a couple of validators to disable the issue order behavior when the caster isnt moving so that the created units can perform some other function than following their master =p. It may seem obvious to just use a Unit Compare Movement Speed which is basically a velocity validator but in my experience that doesnt work so good, so my magic recipe for this is Caster not in Combat, and Caster has Orders, these 2 validators are already there for you thanks to blizzard hehe and they work really well for this application, add them to the Behavior - Validators Disable Field dont worry about making a combine validator for it as any validators you add in that field are all by default part of an "and" function only if you need to use an "or" function do you need to use a combine validator here or of course unless you have a whole bunch of validators you want to use here.
These behavior fields work in reverse of themselves so that if the validator fails then it disables the behavior. So Caster not in Combat fails when the caster is in combat so once the caster takes damage, which is how that particular validator works the the caster is flagged in combat and the behavior is disabled and the slave unit is free to perform actions. Also if the Caster Has Orders returns false meaning the caster has no orders then it is disabled and once the owner has entered combat unless its issued a move order any other order is executed pretty much immediately and has no effect on the behavior but if you move the slave will follow you.
All of this is handled automatically by an Arm Magazine ability if you used one of those instead, but I know sometimes an ability that creates a unit just doesnt work good with arm magazines especially if you want to do more than just create the unit and apply an effect to it. Lemme know if this helps 8-)
well ill use some of that for the attacking part but my ability is more complex read a few post before yours
OK I get it and thats easy too, provided the created units belong to the player who owns the building and also the unit that created the building. Put a behavior on your hero called "Ghoul Follow Target" that lasts forever and is hidden. Then create a validator that validates unit behavior count and change the behavior field to the Ghoul Follow Target beh we made change the compare field to greater than or equal to and the value to 1. Then make use that behavior to validate the target of the issue order effect. So your issue order effect will just issue move order to target target unit with no reference to any effect, and in the validator field add the Ghoul Follow Target validator, also change the Target field that refers to the unit recieving the order and change it to source, as source will refer to the bearer of the behavior, this is handy for any time you use behaviors caster and source become seperated when a behavior is involved i.e when a behavior is applied its applied from the caster but if that behavior uses say a search effect to launch a missile then those things are launched from source as the behavior denotes source from that point on. Then make a search effect and have it do the issue order effect in whatever radius you want the ghould to be able to find and then follow their master, and use that in the periodic effect of a behavior, make sure to set the impact location of the search to source point. The key here is using the behavior and validator to isolate and target the caster@aczchef: Go
sigh bump that didn't work drteyece if you could be more clear that would help a lil im not sure whats happening but i kinda understand whast suppost to be happening
bump its been 2 weeks of me just trying to figure that out
Solved solucarver helped me
I would do it with the arm magazine ability. so you don't need a ton of effects and searches... just et it to extrenal and there you go...