How do I temporarily disable the side scrolling background?

Game Editor comments and discussion.

How do I temporarily disable the side scrolling background?

Postby He360 » Wed Jan 28, 2009 7:21 pm

I made my game with mostly a side scrolling background, but there is one sceen in there in which I would like the background to be still until the next level. I was wondering how do I temporarily stop the background from scrolling when the character is moving.

It seems like something simple, but I've tried everything (including making the character collide with borders that I made, etc), but I still couldn't do it. Anyway, thanks.
Sometimes you don't need a goal in life.
He360
 
Posts: 22
Joined: Sun Apr 06, 2008 2:21 pm
Score: 0 Give a positive score

Re: How do I temporarily disable the side scrolling background?

Postby speckford123 » Wed Jan 28, 2009 7:28 pm

we might need more information on what your talking about here
is it scrolling as you walk by code? or is it just a repeated background?

have you tried using collision boxes to temporarily disable the scrolling?
or you could create a secondary background on top of your first one that gets destroyed once you get to the next level

just give some details, many of us would be glad to help :D
speckford123
 
Posts: 334
Joined: Fri May 05, 2006 6:33 pm
Score: 49 Give a positive score

Re: How do I temporarily disable the side scrolling background?

Postby He360 » Wed Jan 28, 2009 9:50 pm

Yes, at first in my game, I have a repeated background in which my character walks by everything. That is, I used the steps that the tutorial that comes with the game gave us e.g. the x = x + 5; and the x = x – 5; codes, with the character being the parent of the view, etc).

But in one particular level, I don’t want the character to walk by a repeated background. I want one particular background to stays put, and I don’t want the character to be able to go past that background.

I was thinking to temporarily disable the character from being the parent of the view. But I don’t know how to do that (I’ve tried). I also tried putting walls around the particular scene so that the character can’t go past it (collision with a physical response), but for some reason that’s not working. Maybe I’m doing something wrong.

I hope this helps.

HE
Sometimes you don't need a goal in life.
He360
 
Posts: 22
Joined: Sun Apr 06, 2008 2:21 pm
Score: 0 Give a positive score

Re: How do I temporarily disable the side scrolling background?

Postby jimmynewguy » Wed Jan 28, 2009 10:13 pm

if the background is parented with the view and thats what's moving it. then in draw actor for the bg have a variable called move and if move = 1 change the parent to view and if move = 0 change the parent to none
do you understand?
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: How do I temporarily disable the side scrolling background?

Postby DST » Thu Jan 29, 2009 4:10 am

Make the stopped background another actor alltogether. Here I'll call them scrollbg and stopbg.

Give stopbg this line in it's CreateActor script:
Code: Select all
VisibilityState("Event Actor", DISABLE);


Now on any event you want, do this: (here i'll use collision with filled region)

player>collision>any side>filled region>repeat:no
Code: Select all
VisibilityState("scrollbg", DISABLE);
VisibilityState("stopbg, ENABLE);


And just reverse it when you want the scrolling background back.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron