GML Display a lot of different strings using only one obj

ArtCode

Member
Hello!
I'm making a little survival/adventure game and I think I will need to display a lot of different phrases... they will be displayed when the player TRIGGERS a certain position or moment. But I dont want to create a lot of objects for evey string I need to display.
What is easiest and efficient way to do that?
I thought something like to create a SCRIPT with one ARGUMENT, and everytime when the player does something I will pass different arguments to the script to display the STRING with the right ID...
Thanks in advance! :)
 

GMWolf

aka fel666
Create a single object, that displays text as you trigger it.
Give it a variable "text" which holds the strong to display.

In the room editor, place thwart object everywhere you need a trigger, and change the text variables using the creation code.

That way you can have multiple different text instances, each with their own text, but with only one object
 
Top