The coding above is for a dialogue system I was implementing in my game for the story. I learnt how to code a text box here: https://www.youtube.com/watch?v=I4z5aAg09bM.
Watching this tutorial gave me the basis of a text box. I also learnt that instances can be stored in a valuable and data can be extracted from it.
I did some adjusting to make it fit in the bottom of the screen of the camera. The camera was learnt from this video: https://www.youtube.com/watch?v=VYgf3V6Fx3M
I did some more adjusting in the collision box I made for the interaction and in the action code to make it work as a multiple page dialogue system.
The problem arose when all the objects seem to be having the same results, with a few minor differences. I also had this problem when creating the lock door system. After reading this guide: https://docs.yoyogames.com/source/dadiospice/002_reference/001_gml%20language%20overview/401_05_addressing.html. I found out the problem.
The problem was, I was asking for the object data and not the instances. I however thought the instance data would be picked up automatically. I believe in some cases it did, but 90% of the time it didn’t.
After a lot of thinking. I came up with the solution to set all the instance numbers into an array and then use that array in a function. The function would change another valuable to store the instance currently at. From there all the instance data was used instead of the object data.
Here is how it looks:
The dialogue is meaningless at the moment, it is just to show it shows different text at different points.
One thought on “Update: Dialogue System V1.0.0”