Soo, i was thinking,
is it possible to create a ui on rightclick of an entity?
i already tried checking the player.gui en de top/center and left attributes of it while having a smart-inventory open
but it doesn't display that any GUI element is open. If there was a way, i could just adjust the inventory that already exists.
i also couldn't find an event for detecting rightclick of an entity. If i did i could just create a plain entity and on rightclick activate a custom GUI element.
Thanks in advance,
Eastborn
Custom GUIElement on Entity open/select
Re: Custom GUIElement on Entity open/select
No, it is not possible, and I think it has alredy been suggested/talked aboutEastborn wrote:Soo, i was thinking,
is it possible to create a ui on rightclick of an entity?
i already tried checking the player.gui en de top/center and left attributes of it while having a smart-inventory open
but it doesn't display that any GUI element is open. If there was a way, i could just adjust the inventory that already exists.
i also couldn't find an event for detecting rightclick of an entity. If i did i could just create a plain entity and on rightclick activate a custom GUI element.
Thanks in advance,
Eastborn
Re: Custom GUIElement on Entity open/select
Well it's gotta be possible to some extent, or else how do chests and furnaces work?ficolas wrote:No, it is not possible, and I think it has alredy been suggested/talked aboutEastborn wrote:Soo, i was thinking,
is it possible to create a ui on rightclick of an entity?
i already tried checking the player.gui en de top/center and left attributes of it while having a smart-inventory open
but it doesn't display that any GUI element is open. If there was a way, i could just adjust the inventory that already exists.
i also couldn't find an event for detecting rightclick of an entity. If i did i could just create a plain entity and on rightclick activate a custom GUI element.
Thanks in advance,
Eastborn
"F**k thy hater"
-George Watsky
Feel free to contact me!
Skype: Zer0t3ch
Razer Comms: Zer0t3ch
Email: zer0t3ch@live.com
-George Watsky
Feel free to contact me!
Skype: Zer0t3ch
Razer Comms: Zer0t3ch
Email: zer0t3ch@live.com
Re: Custom GUIElement on Entity open/select
Well, i think they do that in the c++ code of the game.zer0t3ch wrote:Well it's gotta be possible to some extent, or else how do chests and furnaces work?
I also tested if i could grab the inventory or any ui of entities ingame trough lua. this was not possible..
Re: Custom GUIElement on Entity open/select
Seeing as the chests are added as prototypes, I would think they would do the clicks for it in LUA also.Eastborn wrote:Well, i think they do that in the c++ code of the game.zer0t3ch wrote:Well it's gotta be possible to some extent, or else how do chests and furnaces work?
I also tested if i could grab the inventory or any ui of entities ingame trough lua. this was not possible..
"F**k thy hater"
-George Watsky
Feel free to contact me!
Skype: Zer0t3ch
Razer Comms: Zer0t3ch
Email: zer0t3ch@live.com
-George Watsky
Feel free to contact me!
Skype: Zer0t3ch
Razer Comms: Zer0t3ch
Email: zer0t3ch@live.com
Re: Custom GUIElement on Entity open/select
Every entity is added as a prototype, but if you look at the definition, the type of the chest, is container, that is what the c++ code takes to know what does that thing do, if you dont belive me, you can allways look at the lua code, any entity in vanilla made like we do the mods, just the definition is, what makes the entity be diferent (regardless of the diferences in the prototype definition, like the image and colision box) is in the c++ code.zer0t3ch wrote:Seeing as the chests are added as prototypes, I would think they would do the clicks for it in LUA also.Eastborn wrote:Well, i think they do that in the c++ code of the game.zer0t3ch wrote:Well it's gotta be possible to some extent, or else how do chests and furnaces work?
I also tested if i could grab the inventory or any ui of entities ingame trough lua. this was not possible..
A custom entity type has been asked for several times, and I think kovarex said he will add it, some time in the future.
Re: Custom GUIElement on Entity open/select
Ah, ok. Can't wait for the custom entity!ficolas wrote:Every entity is added as a prototype, but if you look at the definition, the type of the chest, is container, that is what the c++ code takes to know what does that thing do, if you dont belive me, you can allways look at the lua code, any entity in vanilla made like we do the mods, just the definition is, what makes the entity be diferent (regardless of the diferences in the prototype definition, like the image and colision box) is in the c++ code.zer0t3ch wrote:Seeing as the chests are added as prototypes, I would think they would do the clicks for it in LUA also.Eastborn wrote: Well, i think they do that in the c++ code of the game.
I also tested if i could grab the inventory or any ui of entities ingame trough lua. this was not possible..
A custom entity type has been asked for several times, and I think kovarex said he will add it, some time in the future.
"F**k thy hater"
-George Watsky
Feel free to contact me!
Skype: Zer0t3ch
Razer Comms: Zer0t3ch
Email: zer0t3ch@live.com
-George Watsky
Feel free to contact me!
Skype: Zer0t3ch
Razer Comms: Zer0t3ch
Email: zer0t3ch@live.com
Re: Custom GUIElement on Entity open/select
Ficolas made a good point. At the moment, only the properties of existing types of entities (prototypes) can be changed. So you can make a variation of a chest or a variation of a solar panel, but it is not possible to make a new entity completely from the ground (well you can use some tricks like for instance in the treemod script to achieve the same effect). And yes, the custom lua entity is definitely coming.