celludriel Posted June 14, 2017 Share Posted June 14, 2017 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 More sharing options...
shadetheartist Posted June 14, 2017 Share Posted June 14, 2017 I'm not knowledgeable in this but you might get somewhere by looking at the code for the other UI elements. Try to figure out where that top row of icons is coming from. Link to comment Share on other sites More sharing options...
celludriel Posted June 14, 2017 Author Share Posted June 14, 2017 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 More sharing options...
shadetheartist Posted June 15, 2017 Share Posted June 15, 2017 I think the first row of bars on the top right are all player specific. I did a quick 'find in files' for keywords of the top bar icons and found nothing. I believe you are shit out of luck here my friend :( Link to comment Share on other sites More sharing options...
celludriel Posted June 15, 2017 Author Share Posted June 15, 2017 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now