Hi, i'm trying to make a game where you control a character (my case a zealot) with the arrow keys, and attack when you push 'a'. I want my characters weapon to be ranged, so i'm using the battlecruiser ATS gun as his main weapon. When i push 'a', a region is put in front of him, and it detects if there are any enemies inside and sets to attack them. It works except the attack will continue when you let go of 'a' and my character will hunt the enemy down.
I have the behavior set to none, and for some reason if i issue the command "hold fire" right after the attack, he will still attack. Stop won't work in this case either because i want my character to be able to attack while moving.
bump/side note,
the only reason i'm doing this is to create a smash-tv like system where a ranged weapon comes shooting out of my guy and hits whoever is in front of him. Maybe i'm going at it wrong. is there instead a way to create a detection for when the missile (battlecruiser gun) collides with an enemy?
Hiya, not sure but you've set this up something like this right:
'Player 1 press A DOWN
create region
attack units in region bla bla'?
Then try adding another trigger:
'Player 1 press A UP
Order YourUnit to Stop (override other orders)'
HOWEVER the whole system is a little rough, I would try to transition to another technique, like a proper missile firing.
This is however something Im not 100% sure how to do, search around :P
Good luck
thanks for the response,
i've tried using the stop command, but the problem with that is i want him to be able to attack while moving also. and if there's a stop, my character will stop moving all together. That's why i was hoping the hold-fire command would do something.... but it doesn't seem to.
Hi, i'm trying to make a game where you control a character (my case a zealot) with the arrow keys, and attack when you push 'a'. I want my characters weapon to be ranged, so i'm using the battlecruiser ATS gun as his main weapon. When i push 'a', a region is put in front of him, and it detects if there are any enemies inside and sets to attack them. It works except the attack will continue when you let go of 'a' and my character will hunt the enemy down.
I have the behavior set to none, and for some reason if i issue the command "hold fire" right after the attack, he will still attack. Stop won't work in this case either because i want my character to be able to attack while moving.
is there any way to make my guy attack once?
@WilliamRockford: Go
bump/side note, the only reason i'm doing this is to create a smash-tv like system where a ranged weapon comes shooting out of my guy and hits whoever is in front of him. Maybe i'm going at it wrong. is there instead a way to create a detection for when the missile (battlecruiser gun) collides with an enemy?
@WilliamRockford: Go
Hiya, not sure but you've set this up something like this right: 'Player 1 press A DOWN create region attack units in region bla bla'?
Then try adding another trigger: 'Player 1 press A UP Order YourUnit to Stop (override other orders)'
HOWEVER the whole system is a little rough, I would try to transition to another technique, like a proper missile firing. This is however something Im not 100% sure how to do, search around :P Good luck
@tutstuts: Go
thanks for the response, i've tried using the stop command, but the problem with that is i want him to be able to attack while moving also. and if there's a stop, my character will stop moving all together. That's why i was hoping the hold-fire command would do something.... but it doesn't seem to.
You could create an ability that uses the units normal weapon to deal damage. That way it will only attack once.
And ofcourse, hide the ability or dont show on the command card, but tie it to the "press a" trigger.
Hold Fire is an ability that the ghost/spectre has. You're ordering the zealot to do something that he can't, which is why it doesn't do anything.