Side scroller help

JayReiterJayReiter TexasMember Posts: 88

Hi everyone. I'm a complete noob at Gamesalad here and I'm struggling with some of the basics. I'm creating a side scrolling shoot em up, similar in nature to the Basic Shoot Em Up template. I'm trying to get the background to stop scrolling at a certain point. Right now the background is its own Actor with a simple Move behavior. The Move behavior settings are Move In Direction: 180, Relative to Actor, In an Additive way, At A Speed of 6. The X coordinate starting point is 713 and the Y coordinate starting point is 160. The simple Move behavior works fine and gets the background to slowly move along just how I want. I want the background to stop moving at X coordinate -233. I've tried a few different things and searched different tutorials on YouTube and Recipes, but haven't found a solution yet. What am I missing here?

Comments

  • JayReiterJayReiter TexasMember Posts: 88

    Please also note that I'm not very knowledgeable yet of GS. Don't assume I know what you're talking about. Please break down your instructions on a very step by step basis.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    The Move Behavior moves something at a constant rate of speed, you'd probably be better off using an Interpolate Behavior and Interpolate your background from its starting X position to the -233 you mention. It will then move until it reaches X -233 then it will stop.

  • JayReiterJayReiter TexasMember Posts: 88

    @jamie_c said:
    The Move Behavior moves something at a constant rate of speed, you'd probably be better off using an Interpolate Behavior and Interpolate your background from its starting X position to the -233 you mention. It will then move until it reaches X -233 then it will stop.

    Ok, I tried that and it didn't work. I got rid of my Move behavior and added an Interpolate one instead. I have it set up as Interpolate: self.position.x to self.position.x-233 for 8 seconds using a Linear function. The background does move in the correct direction, but it gradually speeds up (something I don't want) and goes right past the stopping point.

  • BBEnkBBEnk Member Posts: 1,764
    edited March 2014

    go into your actor and change the Liner velocity of X to -6 or whatever speed you want and then add a rule that says when self position = or < less then -233 change velocity to 0.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited March 2014

    Are you sure you removed all the Move Behaviors, it sounds like something else must be effecting it if it's moving beyond the -233 point.

  • JayReiterJayReiter TexasMember Posts: 88

    @jamie_c said:
    Are you sure you removed all the Move Behaviors, it sounds like something else must be effecting it if it's moving beyond the -233 point.

    Yeah, I deleted all behaviors. BBEnk's advice worked, so I got that one problem solved. If you're still willing to help out, jamie_c, there's a lot of stuff I could use your input on, though. :smile:

  • JayReiterJayReiter TexasMember Posts: 88

    @BBEnk said:
    go into your actor and change the Liner velocity of X to -6 or whatever speed you want and then add a rule that says when self position = or < less then -233 change velocity to 0.

    WORKED!!!

  • JayReiterJayReiter TexasMember Posts: 88

    Ok, so the next problem: Once the background stops scrolling, I want the player to shoot at a door. I want the door to have x amount of health, and once its health runs out, I want the door to shatter. I have the door as a separate image and a series of shatter animation images. I'm assuming I'll need to create the door as its own separate actor. Do I need to spawn this actor at a certain point? Or should I have it always active and just have it scroll with the background? Step by steps on how to set all of this up would be great.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Glad you got it worked out one way or another! :)

    I'm about to head to bed here... but feel free to post in the forums, if I don't answer I'm sure someone will! :)

Sign In or Register to comment.