Jump to content

[Question] Attach menu item to a player ?


celludriel

Recommended Posts

Is it possible to add a new top right menu icon to a player ?  In most of the current scripts they all get attached to a ship, but I want my icon to be present all the time.  It made sense attaching it to the player but I just can't get it to work.  Client side there is no addScript() option to Player.  And I don't think the code belongs server side.

 

Has anyone got some experience with it yet ?

Link to comment
Share on other sites

Oh I know that though, I got it working by attaching it to the ship the player is flying, but well that is not really what I wanted.  It's a workaround but a lot of code for something this simple.  I had hoped there was an easy way to attach it to the player instead of an Entity

 

Really hope there is a way or there will be one in the future

Link to comment
Share on other sites

Yeah I did the same at first to, hoping to find any kind of label in any of the lua files.  I got the workaround working now.  I just don't understand his design decision on this one.  It makes sense to have different menu options for different kind of ships.  So I get it why you would attach UI scripts to ship objects.  But surely you want options available all the time.

 

The API also doesn't allow to addScripts on the Server object which for me sucks since I wanted to have a persistant script running each five seconds server side.  I had to workaround it with a coroutine and bootstrap it to server.lua ... which I'm not happy about, but ... it works.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...