Hiya - this problem has me totally perplexed, and I really need your (the community) help.
So here is my objective: create a unit that has a behavior which tells that unit to attack.
Here is my problem: I would like the unit to attack move to a random-ish location in the direction of the enemy, however I can't figure out the random element of it.
What I have done so far: I have managed to create a unit with a behaviour which fires a 'Effect - Search Area' (this is to find the direction of the enemy), which in turn fires an 'Effect - Issue Order' (attack to target). This works fine, however the units attack directly to each other resulting in a long line of units.
I then added an 'Effect - Create Persistent' into the mix (so it goes Behavior -> Search -> Persistent -> Order). I added some periodic offsets into the persistent effect, and checked the random offset box. The units no longer want to attack. I'm baffled. Please help.
An alternative method would be to have a search with a limited angle of vision combined with a wander behaviour and a periodic stop/disable attack. That way the unit will randomly face the direction while scattering to the surrounding area and head towards it but periodically will stop and lose the target untill it faces the right way again.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
An alternative method would be to have a search with a limited angle of vision combined with a wander behaviour and a periodic stop/disable attack. That way the unit will randomly face the direction while scattering to the surrounding area and head towards it but periodically will stop and lose the target untill it faces the right way again.
The way I had mine work was like this :
Find a target, then pick a random periodic offset either left, right, or behind the target (just a list of offsets) then an order to attack that location (not unit) and the behaviour fires every 15 seconds. It's total randomness and works perfectly for what I need.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hiya - this problem has me totally perplexed, and I really need your (the community) help.
So here is my objective: create a unit that has a behavior which tells that unit to attack.
Here is my problem: I would like the unit to attack move to a random-ish location in the direction of the enemy, however I can't figure out the random element of it.
What I have done so far: I have managed to create a unit with a behaviour which fires a 'Effect - Search Area' (this is to find the direction of the enemy), which in turn fires an 'Effect - Issue Order' (attack to target). This works fine, however the units attack directly to each other resulting in a long line of units.
I then added an 'Effect - Create Persistent' into the mix (so it goes Behavior -> Search -> Persistent -> Order). I added some periodic offsets into the persistent effect, and checked the random offset box. The units no longer want to attack. I'm baffled. Please help.
Many thanks!
Okay I got it sorted - i needed to adjust the targeting Start Value : Target Point
An alternative method would be to have a search with a limited angle of vision combined with a wander behaviour and a periodic stop/disable attack. That way the unit will randomly face the direction while scattering to the surrounding area and head towards it but periodically will stop and lose the target untill it faces the right way again.
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
I like the sound of that.