set_gui_arrow and character change

Bugs that are actually features.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

set_gui_arrow and character change

Post 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.
My mods on the Factorio Mod Portal :geek:
Rseding91
Factorio Staff
Factorio Staff
Posts: 15906
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: set_gui_arrow and character change

Post by Rseding91 »

The arrow is linked to the character not the player.
If you want to get ahold of me I'm almost always on Discord.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: set_gui_arrow and character change

Post 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.
My mods on the Factorio Mod Portal :geek:
Rseding91
Factorio Staff
Factorio Staff
Posts: 15906
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: set_gui_arrow and character change

Post 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.
If you want to get ahold of me I'm almost always on Discord.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: set_gui_arrow and character change

Post 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 ?
My mods on the Factorio Mod Portal :geek:
Rseding91
Factorio Staff
Factorio Staff
Posts: 15906
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: set_gui_arrow and character change

Post 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.
If you want to get ahold of me I'm almost always on Discord.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: set_gui_arrow and character change

Post 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 ?
My mods on the Factorio Mod Portal :geek:
Post Reply

Return to “Not a bug”