1 decade ago by fulvio
I have a few NPC&
Basically the character detects when the player is close to them and displays the dialogue automatically. I then use
While close to the NPC I&
039;s that display in-game dialogues and I was hoping to be able to disable the shoot #ig.input.pressed('shoot')
functionality temporarily per entity.Basically the character detects when the player is close to them and displays the dialogue automatically. I then use
ig.input.pressed('shoot')
to iterate through the dialogue text. The problem at the moment is that shoot
is also assigned to the player&039;s shoot button within #player.js
.While close to the NPC I&
039;d like to disable the #shoot
button in the player.js
class while this is happening. I tried adding a boolean flag to my main game class if.game.freezePlayer
and check for whether this is true
and disable any shoot functionality, however when I have multiple dialogues in my level it's always set to whatever dialogue is loaded first - so it's not really going to work like I want it to.