gameMessage in javascript

OmnisScio

Veteran
Veteran
Joined
Oct 26, 2015
Messages
43
Reaction score
2
First Language
English
I have a function in a javascript file that at some point displays a message to the screen.
The problem is that the code immediately following this message is run without waiting for the player to click ok on the message.
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,623
Reaction score
1,439
First Language
French
Primarily Uses
RMMV
I have a function in a javascript file that at some point displays a message to the screen.
The problem is that the code immediately following this message is run without waiting for the player to click ok on the message.
i friend go to this link

https:// docs.google.com/spreadsheets/d/1-Oa0cRGpjC8L5JO8vdMwOaYMKO75dtfKDOetnvh7OHs



.
 

OmnisScio

Veteran
Veteran
Joined
Oct 26, 2015
Messages
43
Reaction score
2
First Language
English
I don't know what that link is, it doesn't seem to work.

I think I know what's going on, but I still can't figure out a solution.

The problem is that I want the code to stop at a certain line, but in javascript (like most programming languages) code execution doesn't work that way. It runs through the code, line by line, as fast as it can all the time. A 'pause' effect can be achieved by having a loop that won't progress untill something (like pressing unpause) breaks it out of the loop.
I have tried to create just this sort of code, but doing it in javascript creates an infinite loop, and doing it in the editor makes the game really laggy.

This whole thing could be solved if there was a way to enter a string variable (so a variable created in the javascript file) into a show text instruction.

The main point of this endeavor is to avoid the rediculious mess of if statements that my code would require if made in the editor. Making it in a function in javascript is so much cleaner.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top