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

Messages - RadarG

#1
yes, all the rooms have 2 backgrounds, 1 background for 1 of the characters point of view and the other background for the other character.

#2
Monsieur OUXX I tried your code but it gives me an error in the GetRoomProperty it says this:

GetProperty: no such property found in schema.
#3
I've tried both codes, to be honest I didn't understood very well the first one and the second one works but only when I'm playing with cMaggie when I change to play with the other character (cRubber) the backgrounds start to change again, so I tried to stop that with:
Code: ags

function on_event (EventType event, int data) 
{
    if (event == eEventEnterRoomBeforeFadein)
    {
        if (player == cMaggie)
            SetBackgroundFrame(0);
        else
            SetBackgroundFrame(1);
    }
}



but didn't worked. Also when in the Function on_event appears (EvenType event , int data) here data is the room number? and what is the event?
thank you so much
#4
I dont understand that, what do you mean?

My objective is to change the background when I change the character because the idea of the game is that the characters have diferent points of view.
Like one is older than the other and has a mature view of environment while the other has more childish view, the backgraound should have the possibily to be changed in all the rooms because the player can change in all the rooms the character.
#5
So that worked, but just in the room that has 2 backgrounds which is logic but when I click in that GUI in another room the error appears. I have assume that is becoause the background changing is set in the GUI script. So is there another way to do it?

Also is there any way that the backgrounds dont change continuosly, I've set the delay at a very high number but doesn't seem to work.
#6
I put the 0 for main and 1 for second background and it gives me this error

SetBackgroundFrame: Invalid frame number specified




I have 2 backgrounds that's an image of the room
#7
Ye sorry, the background I want to change is the room's background
#8
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.
#9
Okay didnt knew that about GUI, I'll try putint the button on the GUI.

Thanks mate.;)
#10
Yep I saw the name was changed so I corrected that but that wasn't the problem.

About if the button is in the room or in the GUI or room, is an object in the room like the character changing in "Day of the tentacle" but insted of being in the GUI is in the room. Actually I'm trying to do the game without GUI so the player does everything with de mouse (there is no: talk, view, etc..., just walk to).
#11
Ups didnt know that, I'm new here.

So I used this in the room properties:



I thought that would make my button clickable.

Sorry, I'm new in AGS and programming. :sad:

Thanks BTW.
#12
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