Modding Help Spawning projectile to act as Say message

Discussion in 'Starbound Modding' started by tfalmeida91, Oct 25, 2020.

  1. tfalmeida91

    tfalmeida91 Master Chief

    Hi everyone! I need help with something. I wanna be able to say the current time. I'm trying to spawn an invisible projectlie that will act as a simple "say" message, containing the current time.

    I was able to get my player ID and position, but everytime I call the function below, it gives me this error:
    Code:
    world.spawnProjectile(
                "invisibleprojectile",
                mcontroller.position(),
                playerID,
                {0,0},
                true,
                {
                    damageType = "NoDamage",
                    actionOnReap = {
                        action = "particle",
                        specification = {
                            text = "Time is: " .. tostring(1),
                            size = 1,
                            color = {255, 0, 0, 255},
                            destructionAction = "fade",
                            timeToLive = 5,
                            destructionTime = 0.0,
                            layer = "front",
                            position = {0,5},
                            initialVelocity = {0,0},
                            finalVelocity = {0,0},
                            type = "text"
                        }
                    }
                }
            )

    Both the playerID and mcontroller.position() have values.

    Please help me understand what I'm doing wrong here
     

Share This Page