OpenXcom Forum
Modding => Help => Topic started by: wcho035 on September 28, 2019, 06:53:22 am
-
Hi, I have experimented with the leeroyjenkin feature. It need a melee weapon, however can there be a melee weapon to hurt a unit own health to turn it into a real suicide unit? The Cybermite from the xcomfiles does not have that capability.
-
Try this
costMelee:
health: 100
-
Thanks nord, I give it ago
-
No, there isn't a way to directly have a unit kill itself when attacking in melee range. The health cost for attacks will just prevent attacking if HP is lower than cost. Scripts to hurt attacker when hitting just sets the attacker's HP to 1 at minimum. Finally, the AI doesn't like to attack if they are inside the radius of their own AoE weapon.
Closest you could probably do is have negative HP recovery on the unit's armor and a script that counteracts the HP loss until the unit hits in melee. Once they hit, set HP and TUs to 1 and set a tag on the unit to let the health degen kill it beginning of the next turn.
-
Perhaps it's time to request suicide bombing as a full-fledged feature. It's a common thing in games, it makes sense, and it keeps being brought up by various people...
-
Oh thank you all for the kind contribution. I have not yet tested the code Nord had suggested cause I am at work. However, like mr ohartenstein23 had written, it’s not possible. I am sadden for not able to create a true suicide unit cause my head huggers are unstoppable. Should have been like the face huggers in aliens, 1 hugger for 1 soldier.
Solarius, thanks for the suggestion of this need to be a requested feature. However, I have requested enough as it is. With the random number generation for clone soldier’s stats still pending.. I will leave it to some else to do it.
Thank you all for the advice.
-
Perhaps it's time to request suicide bombing as a full-fledged feature. It's a common thing in games, it makes sense, and it keeps being brought up by various people...
I hadn't tried it yet, but it was something I had in mind to simulate a few transformations, like an egg/host shooting a blank that "kills" the egg/host and converts said unit to a hatchling, and a parasite burrowing into a target or latching on (half-life style) by killing the parasite and converting the target (zombie style). And aside from that, obviously, it'd be good to make suicide bombers (bloated-zombies, terrorists, etc.).
(Side-question: Can we change the type of explosion a unit like the cyberdisc creates? Like maybe a flamethrower armor explodes with fire, or an underwater monster sprays "bloody-viscera" smoke.)
-
Thanks nord, I give it ago
Hi Nord, after some consideration, I will test this advice of yours, but at a cost of 300 health.. let see how this go..
-
Finally, the AI doesn't like to attack if they are inside the radius of their own AoE weapon.
Vexing, that was going to be the implementation for suicide units I was setting up.
It is good to know though and explains some of the enemy behaviour I've been observing.
-
It doesn't work. It was a good try though.