Room background splitted and moved (solved)

Started by nightmarer, Thu 10/06/2021 19:15:48

Previous topic - Next topic

nightmarer

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.

Crimson Wizard

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.

nightmarer

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);
}

Crimson Wizard

Are these parts of a room background on these screenshots, or they are big objects? Does the character walk properly around the room?

nightmarer

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

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.

nightmarer

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.

Khris

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

SMF spam blocked by CleanTalk