Author Topic: unit without corpse (and more)  (Read 2201 times)

Offline robin

  • Commander
  • *****
  • Posts: 1225
  • ULTIMATE ROOKIE
    • View Profile
unit without corpse (and more)
« on: August 05, 2022, 02:45:12 pm »
I want to create a unit that leaves no corpse behind when killed.
I could make the corpse unrecoverable + use an invisible (AKA empty) floor sprite, that is not a problem.
But, is there a more straightforward way?

Bonus question: how to make a firearm with "flat" accuracy? I want to create a weapon with X% of accuracy regardless of the unit accuracy.

Thanks.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9124
    • View Profile
Re: unit without corpse (and more)
« Reply #1 on: August 05, 2022, 03:13:17 pm »
I want to create a unit that leaves no corpse behind when killed.
I could make the corpse unrecoverable + use an invisible (AKA empty) floor sprite, that is not a problem.
But, is there a more straightforward way?

`overKill: 0.0` on armor?
just guessing, didn't test

Bonus question: how to make a firearm with "flat" accuracy? I want to create a weapon with X% of accuracy regardless of the unit accuracy.

override the calculation formula using `accuracyMultiplier`

Code: [Select]
- type: STR_PISTOL
   accuracyMultiplier:
     firing: 0.0
     flatHundred: 1.0

Offline robin

  • Commander
  • *****
  • Posts: 1225
  • ULTIMATE ROOKIE
    • View Profile
Re: unit without corpse (and more)
« Reply #2 on: August 05, 2022, 03:54:14 pm »
Even with overKill: 0.0, I would still have to define the corpse, otherwise game would not start, I think.
I'll just define the corpse, invisible, not a big deal.

I did not realize I could use flatHundred there.

Thanks!


Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3366
    • View Profile
Re: unit without corpse (and more)
« Reply #3 on: August 05, 2022, 05:56:46 pm »
Even with overKill: 0.0, I would still have to define the corpse, otherwise game would not start, I think.
I'll just define the corpse, invisible, not a big deal.

I did not realize I could use flatHundred there.

Thanks!
Yes as you can "neutralize" units without killing them. As there is multiple conditions when this can happens only good solution is always require corpse.
Probably you need create only one corpse like this and share it for every unit that do not need corpse.