Modding Help Call Function in Player Script

Discussion in 'Starbound Modding' started by Ianus, Jan 16, 2016.

  1. Ianus

    Ianus Void-Bound Voyager

    I've written my own Player Script by patching the player.config.

    Is it possible to call a Function in this script by an Object?

    I already tried to use this functions, but it didn't work:
    "world.callScriptedEntity" and "world.sendEntityMessage" (of cause by using the Message-Handler)

    At the moment I transmit signals by using global variables, but that's quite inefficent and annoying.
     
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    player is not a scripted entity - so no.
     
  3. Ianus

    Ianus Void-Bound Voyager

    Ok, so is there at least any way that is a bit more... elegant?
     
  4. The | Suit

    The | Suit Agent S. Forum Moderator

    Without knowing what you want to do - there is no way to answer that.
     
  5. Ianus

    Ianus Void-Bound Voyager

    A simple planetside teleporter.
    I set the new player position in the player script and want to transmit the coordinates (where to teleport) from an object to the player.
     
  6. Monijir

    Monijir Scruffy Nerf-Herder

    Have you considered a status effect script? Just shooting from the hip here.
     
  7. Ianus

    Ianus Void-Bound Voyager

    I already tried that. It's as slow as working with global variables.
    I just don't know why no function is added to be able to call functions in player scripts...
     

Share This Page