Modding Help mcontroller's parameter functions are suddenly nil

Discussion in 'Starbound Modding' started by XanthicDragon, Feb 22, 2020.

  1. XanthicDragon

    XanthicDragon Void-Bound Voyager

    I've been tearing my hair out for the past hour because, despite the API's statements, mcontroller.parameters() and mcontroller.applyParameters() error when I attempt to call them because they are nil.

    Now before you bring up the "Does mcontroller actually exist in the context?" question, yes, it does. This script is running in a status effect as a persistent effect to my race.

    This works perfectly until it gets to calling either parameters() or applyParameters(). If I remove the calls to those two functions, this code runs. Why have these two functions mysteriously ceased to exist?


    UPDATE: This issue was caused due to a misunderstanding of the mcontroller var. I was unaware that it was able to reference other types of movement controllers, specifically controllers that don't have access to certain API. In the contexts of statuses, they use actorMovementController, which does not have access to parameters.

    Thanks for your time.
     
    Last edited: Feb 22, 2020
    The | Suit likes this.

Share This Page