Hi, everyone.
I'm having problems trying to change the backgroung. I'll explain this.
My game has two playable characters and I want to change the background when I change the characer. The change of the characters is made with GUI so when I click in that GUI the character changes and I want the background to change too.
This is the code I've got
Code: ags
But I don't know which is the frame of the second background. When I import the background in the room it appears as "Background 1" and the previous backroung is "Main Background" So which is the frame?
Thank you.
I'm having problems trying to change the backgroung. I'll explain this.
My game has two playable characters and I want to change the background when I change the characer. The change of the characters is made with GUI so when I click in that GUI the character changes and I want the background to change too.
This is the code I've got
function gGui1_OnClick(GUI *theGui, MouseButton button)
{
cRubber.SetAsPlayer();
cMaggie.StopMoving();
SetBackgroundFrame(0);
}
function gGui2_OnClick(GUI *theGui, MouseButton button)
{
cMaggie.SetAsPlayer();
cRubber.StopMoving();
SetBackgroundFrame(Background 1);
}
But I don't know which is the frame of the second background. When I import the background in the room it appears as "Background 1" and the previous backroung is "Main Background" So which is the frame?
Thank you.