A redesign of the AGS site is being planned! Please check out the mockups and give your feedback.


Two factor authentication (via app or email) is now available for the forums. You can enable it on your profile.

Author Topic: Room background splitted and moved (solved)  (Read 223 times)

Room background splitted and moved (solved)
« on: 10 Jun 2021, 19:15 »
Hello.

I'm getting a weird error while loading one room.
This is how it looks in AGS.

https://imgur.com/hdC98AV
This is how it is shown when running the game.

https://imgur.com/nJp4CMN
Anyone has an idea why is this happening?

Regards.
« Last Edit: 10 Jun 2021, 22:03 by nightmarer »

Re: Room background splitted and moved
« Reply #1 on: 10 Jun 2021, 19:34 »
The only thing this may normally happen if you created more than 1 room viewports in script.

If not, that's some kind of new bug, I have never seen this before.

Re: Room background splitted and moved
« Reply #2 on: 10 Jun 2021, 21:26 »
It happened to another room of the game sometime before, but it seemed to fixed without doing anything.
Let me share the code of the room, so you will see there's anything weird about it.

Quote
// COURTYARD
function room_Load()
{
  transicion(true);
  object[0].SetView(514, 0, 0);
  object[0].Animate(0, 5, eRepeat, eNoBlock);
  object[1].SetView(513, 0, 0);
  object[1].Animate(0, 5, eRepeat, eNoBlock);
  object[2].SetView(512, 0, 0);
  object[2].Animate(0, 5, eRepeat, eNoBlock);
  object[3].SetView(511, 0, 0);
  object[3].Animate(0, 5, eRepeat, eNoBlock);
  object[4].SetView(510, 0, 0);
  object[4].Animate(0, 5, eRepeat, eNoBlock);
  object[5].SetView(291, 0, 0);
  object[5].Animate(0, 5, eRepeat, eNoBlock);
  object[6].SetView(515, 0, 0);
  object[6].Animate(0, 5, eRepeat, eNoBlock);
  object[7].SetView(516, 0, 0);
  object[7].Transparency=(80);
  object[7].Animate(0, 5, eRepeat, eNoBlock);
  FadeOut(64);
  Wait(5);     
  FadeIn(1);   
}

function room_AfterFadeIn()
{
  SetTimer(1, 500);
  Isaac.Walk(246, 240, eBlock, eWalkableAreas);
  transicion(false);
}

function room_FirstLoad()
{
  Isaac.Think("Oh my fucking god.");
}

function room_Leave()
{
  stopper();//AudioStop
}

function room_RepExec()
{
  if(!Spider.Moving && IsTimerExpired(1)) {
    Spider.Walk(Random(175)+200, Random(130)+20, eNoBlock, eWalkableAreas);
  }
}

function room_LeaveBottom()
{
  Isaac.ChangeRoom(29, 136, 753, eDirectionDownLeft);
}

Re: Room background splitted and moved
« Reply #3 on: 10 Jun 2021, 21:42 »
Are these parts of a room background on these screenshots, or they are big objects? Does the character walk properly around the room?

Re: Room background splitted and moved
« Reply #4 on: 10 Jun 2021, 21:56 »
OK, I think that now I know what is happening, I think that I asigned the objets to wrong views in the same room and everything is doing a mess. Sorry for the inconvenience.

eri0o

Re: Room background splitted and moved (solved)
« Reply #5 on: 10 Jun 2021, 22:05 »
nightmarer, you can give name to objects and use the names, and you can also give names to views and use their names - the name you write in the view becomes UPPERCASE_VERSION_OF_IT. Maybe you know this, but just wanted to check it out.

Re: Room background splitted and moved (solved)
« Reply #6 on: 10 Jun 2021, 22:13 »
Thanks eri00.

Sometimes I used object names, but sometimes I prefer to use the numbers just for doing everything faster, and that is why I sometimes mess everything.

Re: Room background splitted and moved (solved)
« Reply #7 on: 11 Jun 2021, 10:47 »
Using numbers isn't faster because a) auto-complete will help with typing the object name b) you'll spend less time fixing error like this one :-D
Fail at Floaty Rog' now!  still having to deal with what games are going through