Page 1 of 1

set_gui_arrow and character change

Posted: Sat Jul 09, 2016 9:05 am
by binbinhfr
Hi,

about the player.set_gui_arrow function, which is very useful, it seems that if you change the player.character, the arrow dissapears. It appears again if you go back in the original character. But as this function is link to the player and not the the character-entity, teh arrow should remain visible even if the player change character, no ?

EDIT : infact, after testings, there can be an arrow per character. In player.char1, you can have an arrow pointing on entity4, and in player.char2, you can have an arrow pointing on entity5. Switching from char1 to char2 will switch arrows. So either this arrow is player dependant (which I prefer because it's a gui help to the player), or it is character dependant.

Re: set_gui_arrow and character change

Posted: Sat Jul 09, 2016 9:57 am
by Rseding91
The arrow is linked to the character not the player.

Re: set_gui_arrow and character change

Posted: Sat Jul 09, 2016 10:13 am
by binbinhfr
Rseding91 wrote:The arrow is linked to the character not the player.
So it is not very logical that the function is linked to the player... When you switch character, you can left unwanted arrow on the previous character.

Re: set_gui_arrow and character change

Posted: Sat Jul 09, 2016 10:15 am
by Rseding91
Most all actions done through the lua API are applied to the character.

LuaPlayer is just a wrapper around the character entity in most instances.

Re: set_gui_arrow and character change

Posted: Sat Jul 09, 2016 11:10 am
by binbinhfr
ok no problem. Good to know anyway ;-)

by the way, Rseding, while you are around, an idea with this one : viewtopic.php?f=25&t=28551 ?

Re: set_gui_arrow and character change

Posted: Sat Jul 09, 2016 11:51 am
by Rseding91
binbinhfr wrote:ok no problem. Good to know anyway ;-)

by the way, Rseding, while you are around, an idea with this one : viewtopic.php?f=25&t=28551 ?
There's currently no way to just "disable" the energy requirement for an entity.

Re: set_gui_arrow and character change

Posted: Sat Jul 09, 2016 12:33 pm
by binbinhfr
Rseding91 wrote:There's currently no way to just "disable" the energy requirement for an entity.
so no way to make a radar with an internal infinite energy source ?
even with a hiden linked entity ?