Modding Help play cinematic to player in lua. (SOLVED)

Discussion in 'Starbound Modding' started by ImSoAwesome, Oct 9, 2017.

  1. ImSoAwesome

    ImSoAwesome Orbital Explorer

    I'm trying to make a monster where if you get killed by it, it plays a custom cinematic to that player. I tried doing it but with no luck. Is there anyway of doing this, but not through quests/missions lua?
    I'm very bad at coding btw.
     
  2. TheElderScroller

    TheElderScroller Pangalactic Porcupine

    I would just make a quest. Maybe one that runs all the time just to give access to player.playCinematic...
    Then when the monster dies you can world.sendEntityMessage the player.

    Like in the quest script
    Code:
    function init()
      message.setHandler("monsterDeathCinematic", function(_, _, ...)
        -- do stuff
      end)
    end
    
    and the monster script
    Code:
    function die()
      world.sendEntityMessage(playerID, "monsterDeathCinematic")
    end
    
    ... for example...
     
  3. ImSoAwesome

    ImSoAwesome Orbital Explorer

    soooo... what do I do/add in?
     
  4. ImSoAwesome

    ImSoAwesome Orbital Explorer

    I found a way of doing now. Thanks
     

Share This Page