Make only one actor use scene wrapping?

Is it possible to have only one actor use scene wrapping? In my side scrolling game the ground moves past to give the effect of moving but the ground has to be the only thing that wraps or it will completely mess up my game.
Thanks

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    you'll have to do it manually

    when self.position.x = -XXX
    change attribute selt.position.x to XXXX
  • brandon.shepherd99brandon.shepherd99 Member Posts: 44
    i think the entire scene has to be wrapped. Im not sure exactly what you are trying to do but if you just need the ground to constantly move like its endless, you might trying having it move and once it gets to a certain position have it change its position back to the starting position so it gives the look of constant movement.
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Yeah, you'd just have to do it manually like jonmulcahy says.
  • blue_elephantblue_elephant Member Posts: 505
    edited July 2013
    I created a rule which says : when self.position x= 0, change attribute, self.position x to self.position x + 320. This did nothing. The game is landscape and the floor is moving to the left at a speed of 400.
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    make it read:

    When self.postion x =< 0

    change self.position x to 320

    You have to include the < symbol as the X postion may never equal exactly 0.
  • DeadlySeriousMediaDeadlySeriousMedia ArizonaMember Posts: 838
    You may also want to not use 0.

    Use a number half the width of the actor.

    Example:

    Actor width = 100

    When self.postion x =< -50

    change self.position x to 370

    This way the actor is out side of the camera when it changes position.
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    @DeadlySeriousMedia, good catch!
Sign In or Register to comment.