Modding Help Apply Buff Upon Kill with Specific Weapon

Discussion in 'Starbound Modding' started by SpazDiesFirst360.0, Jan 25, 2020.

  1. SpazDiesFirst360.0

    SpazDiesFirst360.0 Phantasmal Quasar

    I thought it would be an interesting concept to have a melee weapon buff the user whenever they defeat an enemy with it. However, I want a different buff to be applied if a specific enemy is defeated, such as a poptop (as an example) I know this will require LUA, but I'm not quite sure where to start with this. The pseudocode I've created goes something like this, with bold text being placeholders:
    if entityKilled == self.triggeredEntityType then
    EDIT: I know that the status table needs to be accessible by weapon scripts, otherwise this won't work. I also have a feeling that the entity table will also need to be accessible.
    Last edited: Jan 25, 2020
  2. Zaakari

    Zaakari Pangalactic Porcupine

    You have a lot of very good--though seemingly difficult--ideas:nuruhappy:

    The only thing I can think of that has a different outcome based on enemy type, would be capture pods.
    However, those work based on low health (rather than no health). But, maybe it would be worth looking there for ideas.

Share This Page