So right now in starcraft 2 you can attack a player but if your enemy goes to far into the fog(no vision) that attack dies and your unit stops. Is there anyway to make the unit keep the attack going after the enemy?
I dont think so, cuz your guys dont know where the unit is so they can not follow. You could, obviously, disable the fog of war, and that would prevent the whole thing
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
Yeah, the reason the attack stops is because it loses vision of the target. You could increase the attacker's vision range, or possibly create a trigger that reveals a region around the attacked unit so the attacker still can see it.
yea that would ruin it tho, dont want the vision always to be seen unless theres a way to trick ur unit in thinking he has vision but the user cant see the enemy at all.
I dont know what kind of attack you are going for, but you could probally make it so you attack once, and then a series of effects/triggers take over. They won't care about visibility.
You will probally run into some difficulties with the unit running around attacking others while attacking. I dont have time to test it now, but you could look at it.
I think you will need to create a new Behavior. I'd Duplicate "Ghost Hold fire" and Call it "Never give up"
Click on the behavior and then go to "Behavior Modification +"
You will see a heap of Tabs up top that have movement, combat, behavior etc. I would probably go opposite to what hold fire is. Like where it says "Ability Classes disabled" you could maybe change the "Attack" to Disabled, and enable all the rest. That way it has no choice but to attack. I'm not entirely sure what the go is here but I'm sure that's the place.
You could always try triggers.
Maybe "If unit becomes Idle, issue order attack marine 33. 22. 01"
I made a solution that consists of two triggers, a weapon, and an ability.
First, trigger triggers when one of our unit type starts attacking a target.
I add the unit to a unit group of units who are currently attacking. I then remove the weapon from the attacker, and add a dummy weapon. This dummy weapon is just there so the player will see the correct stats when hovering over the weapons.
Next, I order the unit to use an ability I called wait. It's an effect - instant ability with no effect, but an extremely long cast time. I use it to force the unit to stand still - like I mentioned, that would be a problem with this approach.
Next, for as long as the attacker is in the unit group of attacking units, I make the attacker face the target, apply the attack effect that the weapon would normally apply, tell the unit to play the attack animation, and wait for a duration equal to the normal cooldown of the weapon.
If the target dies, I remove the attacker from the unit group.
When the attacker is no longer in the unit group, I give it back it's original weapon.
I have another trigger that listens for when a unit in the unit group is ordered to do anything. If that happens, I remove it from the unit group to stop the previous trigger from attacking.
I made an example map.
One thing Im unhappy about is that if the unit was attacking normally, it would keep on turning towards the enemy. In this solution, it will only turn to the enemy when it is ready to attack. It is possible to make the unit face the target at very small intervals, but I can't think of a way to make the unit play the turn animation aswell as the attack animation at the same time. As a result, the unit's feet would be standing still while the unit is (constantly) rotating - that really looks ugly. If anyone got a solution there - speak up ;)
Also, note that if your attacker fires projectiles, they are belonging to the attacker, and as a result he will be able to see where they are going. So eaven if the target is miles into the fog, the attacking player will be able to follow the projectiles with his camera and see where the target is.
ooh.. I misunderstood you then.. I thought you wanted the unit to be able to attack people in the fog, but not initiate an attack unless the target is in range
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So right now in starcraft 2 you can attack a player but if your enemy goes to far into the fog(no vision) that attack dies and your unit stops. Is there anyway to make the unit keep the attack going after the enemy?
I dont think so, cuz your guys dont know where the unit is so they can not follow. You could, obviously, disable the fog of war, and that would prevent the whole thing
Yeah, the reason the attack stops is because it loses vision of the target. You could increase the attacker's vision range, or possibly create a trigger that reveals a region around the attacked unit so the attacker still can see it.
yea that would ruin it tho, dont want the vision always to be seen unless theres a way to trick ur unit in thinking he has vision but the user cant see the enemy at all.
I dont know what kind of attack you are going for, but you could probally make it so you attack once, and then a series of effects/triggers take over. They won't care about visibility.
You will probally run into some difficulties with the unit running around attacking others while attacking. I dont have time to test it now, but you could look at it.
Check out the behaviors.
I think you will need to create a new Behavior. I'd Duplicate "Ghost Hold fire" and Call it "Never give up"
Click on the behavior and then go to "Behavior Modification +"
You will see a heap of Tabs up top that have movement, combat, behavior etc. I would probably go opposite to what hold fire is. Like where it says "Ability Classes disabled" you could maybe change the "Attack" to Disabled, and enable all the rest. That way it has no choice but to attack. I'm not entirely sure what the go is here but I'm sure that's the place.
You could always try triggers.
Maybe "If unit becomes Idle, issue order attack marine 33. 22. 01"
Or something like that.
I don't know. I'm somewhat a newb.
On unit Idle, add triggering unit to attack wave 1. Set Target unit for attack waves,
Or maybe:
Set Target unitArea for attack waves Set Target unitgroup for attack waves
Maybe they will help?
I will try all those ideas when Im home from work, thx a lot for the help tho
none of those ideas worked..anything else?
I made a solution that consists of two triggers, a weapon, and an ability.
First, trigger triggers when one of our unit type starts attacking a target.
I add the unit to a unit group of units who are currently attacking. I then remove the weapon from the attacker, and add a dummy weapon. This dummy weapon is just there so the player will see the correct stats when hovering over the weapons.
Next, I order the unit to use an ability I called wait. It's an effect - instant ability with no effect, but an extremely long cast time. I use it to force the unit to stand still - like I mentioned, that would be a problem with this approach.
Next, for as long as the attacker is in the unit group of attacking units, I make the attacker face the target, apply the attack effect that the weapon would normally apply, tell the unit to play the attack animation, and wait for a duration equal to the normal cooldown of the weapon.
If the target dies, I remove the attacker from the unit group.
When the attacker is no longer in the unit group, I give it back it's original weapon.
I have another trigger that listens for when a unit in the unit group is ordered to do anything. If that happens, I remove it from the unit group to stop the previous trigger from attacking.
I made an example map.
One thing Im unhappy about is that if the unit was attacking normally, it would keep on turning towards the enemy. In this solution, it will only turn to the enemy when it is ready to attack. It is possible to make the unit face the target at very small intervals, but I can't think of a way to make the unit play the turn animation aswell as the attack animation at the same time. As a result, the unit's feet would be standing still while the unit is (constantly) rotating - that really looks ugly. If anyone got a solution there - speak up ;)
Also, note that if your attacker fires projectiles, they are belonging to the attacker, and as a result he will be able to see where they are going. So eaven if the target is miles into the fog, the attacking player will be able to follow the projectiles with his camera and see where the target is.
Hm, this is a start i think..But I might see it wrong or something but all I see is the attack have crazy range?
I want the unit to have the same range and follow the enemy unit(into the fog) wherever he goes and then attack him..
ooh.. I misunderstood you then.. I thought you wanted the unit to be able to attack people in the fog, but not initiate an attack unless the target is in range