J
james.pierce
Guest
I have done extensive research all over Google for the whole day and it seems I'm the only one who came across this problem. Most likely because most people use the graphical interface to set the background of a room.
Anyways, I created a script called "scr_createbackground()" so I can dynamically set the background for each new room.
In the creation code of the room "rm_00" I wrote "scr_background()" to call the script.
In the script I have the following code:
I have tried all kinds of possible variations to write this line of code. I've read the manual about rooms several times. I watched many youtube videos. And I just can't figure out what I'm doing wrong. It must be something very simple and trivial that I'm constantly missing.
Does anyone know why it is not setting the background of my room?
Thank you all so much for taking the time to read this and also if you have an answer, thank you in advance!
Anyways, I created a script called "scr_createbackground()" so I can dynamically set the background for each new room.
In the creation code of the room "rm_00" I wrote "scr_background()" to call the script.
In the script I have the following code:
var room_index = room;
var bind = 0;
var vis = 1;
var fore = 0;
var back = bg_sky;
var bg_x = 0;
var bg_y = 0;
var htiled = 1;
var vtiled = 1;
var hsp = 0.2;
var vsp = 0;
var alpha = 1;
room_set_background(room_index, bind, vis, fore, back, bg_x, bg_y, htiled, vtiled, hsp, vsp, alpha);
var bind = 0;
var vis = 1;
var fore = 0;
var back = bg_sky;
var bg_x = 0;
var bg_y = 0;
var htiled = 1;
var vtiled = 1;
var hsp = 0.2;
var vsp = 0;
var alpha = 1;
room_set_background(room_index, bind, vis, fore, back, bg_x, bg_y, htiled, vtiled, hsp, vsp, alpha);
I have tried all kinds of possible variations to write this line of code. I've read the manual about rooms several times. I watched many youtube videos. And I just can't figure out what I'm doing wrong. It must be something very simple and trivial that I'm constantly missing.
Does anyone know why it is not setting the background of my room?
Thank you all so much for taking the time to read this and also if you have an answer, thank you in advance!