Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: I have some problem when using setSprite in hullmod  (Read 143 times)

cjy4312

  • Ensign
  • *
  • Posts: 28
    • View Profile
    • Email
I have some problem when using setSprite in hullmod
« on: November 24, 2020, 09:42:07 PM »


I'm not good at English,I can't describe this issue exactly,So I uploaded a video https://www.bilibili.com/video/BV1eK4y1f7BV


I'm trying to use this code to change my ship's sprite and improve flux dissipation when all wings removed


Code
public void applyEffectsAfterShipCreation(ShipAPI ship, String id){
        if(ship.getVariant().getWings().isEmpty()){
            ship.setSprite("CTB_Ship", "ctb_mycarrier_redrunway");
            ship.getMutableStats().getFluxDissipation().modifyMult(id, 2f);
        }else{
            ship.getMutableStats().getFluxDissipation().unmodify(id);
        }
    }
Logged