Disabling Character on 2nd Background (SOLVED)

Started by meadforspeed, Sun 17/02/2013 04:36:23

Previous topic - Next topic

meadforspeed

So basically what I want to do is have an up-close view of an object when that object is interacted with. Right now I've got it set so that when the player interacts with the object, the view switches to a second background, I got that working just fine, my problem is I can't seem to figure out how to disable walkable areas for JUST this second background. I'd also need to make the player character invisible on this second background, instead of both, which is currently the problem. I did a re-read of the tutorial again and I'm sorry if I'm missing something obvious! Thanks!

Hernald

In the window that shows the second room on the right hand side about halfway down it says ShowPlayerCharacter True; change that to False.

Peder 🚀

#2
Hernald beat me to the solution if you use a separate room though I've left it in anyway since I made a screenshot of it..

If you are using a separate room for the close up then you can do this in the room with the close up:


If it's within the same room I guess maybe creating a walk-behind area that covers the whole screen and is disabled by default and activated whenever the close up is activated..

Code: AGS
SetWalkBehindBase (int area, int baseline)

Changes the walk-behind AREA to have new BASELINE. This effectively allows you to turn walk-behinds on and off, although you can do other tricks with it as well. BASELINE is from 1 to the height of the room (normally 200) and moves the line which you set originally in the editor.

Passing BASELINE as 0 disables the walk-behind area, so that the player will always walk in front of it.

Basically, if the character's feet are below BASELINE, he will be drawn in front of it, otherwise he will be drawn behind it.

Khris

You can simply turn off the walk cursor and move the player off-screen:
Code: ags
// room variable, declared at the very top of the room script
int old_y;

// looking at the object
  SetBackgroundFrame(1);
  mouse.DisableMode(eModeWalkto);
  old_y = player.y;
  player.y = -1;

// closing close-up
  SetBackgroundFrame(0);
  mouse.EnableMode(eModeWalkto);
  player.y = old_y;

meadforspeed

Thanks guys! I really appreciate the help!

SMF spam blocked by CleanTalk