Author Topic: fighting civilian units / AI stun melee  (Read 3461 times)

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
fighting civilian units / AI stun melee
« on: November 28, 2015, 07:08:26 pm »
so i have two questions.

anyone managed to make a civilian unit that attacks aliens?
i'm using the same unit both as a terrorist and as a civilian (actually two different units but they're clones). the former attacks (as it should) while the latter just.. wanders around like your usual dumb civilian  :P.
if i take control of them in debug mode, the hostile variant shows its builtinweapon in the hand slot, while the civilian variant has both hands empty, as if the weapon is not attached.
(are fighting civilians still no-go?)


also unrelated:
made an ai unit (terrorist) with a melee weapon that deals stun damage (...it is... a fixed stun rod, only difference is sprite and power). the unit seem to attack normally, but it deals no stun damage at all.
i guess it is because melee weapon for ai units can strily only deal melee-type damage, right?

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: fighting civilian units / AI stun melee
« Reply #1 on: November 28, 2015, 11:59:22 pm »
I don't know anything about this game's AI so I can't answer the first question, but I thought it would be interesting if there were a variety of civilians, including some types that fight against the aliens. Perhaps a police officer, or a man with a gun. The rest need to be better at hiding.



also unrelated:
made an ai unit (terrorist) with a melee weapon that deals stun damage (...it is... a fixed stun rod, only difference is sprite and power). the unit seem to attack normally, but it deals no stun damage at all.
i guess it is because melee weapon for ai units can strily only deal melee-type damage, right?
There is a damage type flag (type 7) on the default units. It is on their weapon in the items list. Make sure you haven't put the damage type on the unit. It needs to be on the unit's weapon. If that doesn't work then maybe it's hard-coded but I'd wager more likely it's a bug with Open Xcom. But go try it, I bet it works.

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: fighting civilian units / AI stun melee
« Reply #2 on: November 29, 2015, 12:38:28 am »
Code handling civilian don't use weapons. Exactly same with deployment. To made it work there need of rewriting this code (like reuse alien code).
This was requested for Extended version and it will be done in some far future.