Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

RenJS

HTML5 Visual Novel creation made easy and free · By lunafromthemoon

Input Example questions and issues

A topic by Lapinay created Apr 14, 2019 Views: 508 Replies: 9
Viewing posts 1 to 9

Hi. The Input Example (here)  is made to let user enter a name for the character, then we can can add this custom name in dialogs with the correct variable. That's great ;) I've tried to add this feature to my game but when i call the function  showInput, nothing happens.

In the story i have: 

- text: Please input your name.
  - call showInput: 
  - deuzi says: Welcome to the Quickstart, {username}!

In CustomContent.js, i've added the function as seen on the example (indention and placement seems OK)

In index.html,  i've added <script type="text/javascript" src="libs/phaser-input.min.js"></script> between "head" and the file is  in the right folder with the right name. 

Did i miss something ?

Developer

What happens when you execute it? If it freezes the story, then press F12 in the navigator and copy here what the error is (it should appear in the browser console).

No specific error just : " Expected color but found ‘0’. from DOM"

Developer

Does the example as is work for you?

(1 edit)

No, it does not. The example i've downloaded from Github does not work for me. I am freezed on the loading screen.

Developer

I'll check it and come back to you.

Developer

Hello Alix, to properly integrate the PhaserInput plugin you need to add it to the game object:

In your own example try adding this line:

game.add.plugin(PhaserInput.Plugin);

as the first line of the bootstrap init function (RenJSBootstrap.js, line 7). This is not an official addition to RenJS but just a quick example I did for someone that asked for it, so it's not perfect and I don't know if any other unexpected bug could appear.

In any case, I updated also the example repository and it should work now.

Thank you, it works now :) I hope it would be an official feature.

By the way, do you have a roadmap or an idea of what is coming next ?  I don't want to pressure you !  

Keep doing such a good work :)

Developer

Hello again, there's really not a roadmap, I add features as I need them in my games and I also take suggestions along the way.

ok :)