Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - RadarG

#1
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


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.
#2
Hi everyone,

I've start a new game with AGS in which the player has 2 differents characters to play, but I'm having issues trying to change de character.

I had the idea to change clicking on a button and I tried this:
Code: ags

function button_AnyClick()
{
  cRubber.SetAsPlayer();
}


Where cRubber is the character I want to change.
Thank you.

RadarG
SMF spam blocked by CleanTalk