Cortex-Command-Community-Project icon indicating copy to clipboard operation
Cortex-Command-Community-Project copied to clipboard

Some grenades have weird interactions...

Open BuildTheirMan opened this issue 1 year ago • 0 comments

So I was playing with the Dummy Faction and found a weird bug with the impulse grenade. If any unit controlled by the AI is left holding an impulse grenade in hand they will auto switch to their primary (if they have any) but the grenade will turn active on the units pocket, meaning that once you equip it or the unit dies (causing it to leave the inventory) it will trigger the explosion in pretty much an instant.

Here is how to do it: Step 1: Have a fellow unit with the impulse grenade and any weapon. Step 2: Take control of the unit and switch to the impulse grenade. Step 3: Let the AI take control of the unit. Step 4: Once again take control of the unit and switch to the impulse grenade. Step 5: The impulse grenade will either explode as soon as you select it again or after a small delay, it will also activate on death or by dropping it.

Step 5 in particular happens with any other grenade if you first activate it in hand before switching to another weapon yourself (the AI won’t do it).

This grenade in inventory issue could be solved by either deactivating the grenade once a unit switch to another weapon (indirectly fixing the impulse grenade bug as well) or by keeping a timer on the unit that will eventually detonate the grenade on its pocket rather than once it gets dropped or equipped again (this would require fixing the impulse grenade being automatically activated by the AI like done above in Step 3).

The second fix sounds more funny and would fix the main issue of having a grenade with a 0-second timer in your inventory that explodes as soon as it appears.

BuildTheirMan avatar Feb 25 '24 16:02 BuildTheirMan