Home   Help Search Login Register  

Author Topic: Problems controling AI units (firing&moving)  (Read 546 times)

0 Members and 3 Guests are viewing this topic.

Lihamatti

  • Guest
Problems controling AI units (firing&moving)
« on: 14 Jul 2004, 17:27:56 »
I have a couple of problems with AI units:

1. How can I make a unit to stay in a position and shoot a specified person?
Using dotarget and dofire works somethimes but sometimes the unit start running towards target and it tooks about 15s for him to start firing. (target distance unit < 20). I have ordered the unit to move to target with domove (before dotarget and dofire commands), maybe that's the problem?. Using stop or disableAI "move" commands will make unit stay in position but not firing. How can I enable AI move again? using unit stop false works for the "stop" command, but then again the unit will move towards target (maybe it still remembers the domove command?). Any idead?

2. How can I make a unit to run and fire at the same time?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Problems controling AI units (firing&moving)
« Reply #1 on: 14 Jul 2004, 18:57:29 »
1.    I don't understand why you've given the loon a doMove command if you want him to stand still.   What have I missed?

2.   You probably can't.    If you can he won't be likely to hit anything.
Plenty of reviewed ArmA missions for you to play

DBR_ONIX

  • Guest
Re:Problems controling AI units (firing&moving)
« Reply #2 on: 14 Jul 2004, 20:51:56 »
Yeah, it's been asked, you can make the AI move and fire..
Oh, did you know, in Half-Life, the enemy couldn't move and fire at the same time..</pointless fact>
;D
- Ben

Lihamatti

  • Guest
Re:Problems controling AI units (firing&moving)
« Reply #3 on: 14 Jul 2004, 20:52:19 »
I made a script where a police chases the player or something like that. So he first moves to target = player (in his car) and then ( when close) comes out and start shooting for a while. Then again goes in his car and drive close to player, gets out and start shooting, and so on...

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Problems controling AI units (firing&moving)
« Reply #4 on: 14 Jul 2004, 21:44:15 »
Ah, well, in that case you might want something like this


? (shooter distance target < 20) and (shooter knowsAbout target > 1.5) : shooter doMove getPos Shooter
Plenty of reviewed ArmA missions for you to play

Lihamatti

  • Guest
Re:Problems controling AI units (firing&moving)
« Reply #5 on: 15 Jul 2004, 10:27:28 »
Thanks macguba, that helped.

This is much harder than I thought, though. I mean to get a script to work properly. There is always something not working as supposed. Now I'm having a problem that police can't shoot the player if player is too close (distance <10, or something). If I make the police to be on enemy side, it works otherwice, but sometimes the police starts running towards the position where its "group leader" was, even if I deleted that unit after the police got his side. Police domove getpos police don't work in this situation.