Individual actor no wrap

sparkzillasparkzilla Member Posts: 152
edited November -1 in Working with GS (Mac)
Hi,

I have some actors that I want to wrap (come back on the other side of the screen) and some that I don't. Is it possible to make it so that an individual actor in a scene does not wrap?

Comments

  • LordTarantorLordTarantor Member, PRO Posts: 890
    You might put a wall and put a collide with tag and put all the actors you do not want to wrap in that group or tag.
  • sparkzillasparkzilla Member Posts: 152
    Actually I didn't explain well. I have an actor that has particles trailing behind it. If the actor gets too close to the left-hand side then the particles appear on the other side. I'm going to try to make a layer that covers that side and is over the particle actor but under the other actors. Any other ideas most welcome.
  • sparkzillasparkzilla Member Posts: 152
    that didn't work because the particles and the actor are in the same level :-(
  • sparkzillasparkzilla Member Posts: 152
    I'm back to this question again. Any ideas most appreciated.
  • spliketspliket Member Posts: 93
    i would suggest doing your wrapping with rules instead of having it set globally.

    so, if you're making a landscape game, create 2 rules like this :

    RULE 1:
    if
    self.position.X < 0
    and
    self.linearVelocity.X < 0 (this makes sure the actor is going to the left - otherwise, the wrap rules would just bounce the actor back and forth)

    then
    change self.position.X to 480

    RULE 2:
    if
    self.position.X > 480
    and
    self.linearVelocity.X > 0

    then
    change self.position.X to 0

    you may have to change some of the numbers to get the actor to fully go off screen before wrapping (this depends on the size of your actor of course.
  • sparkzillasparkzilla Member Posts: 152
    Thanks for your help. I appreciate it!
  • sparkzillasparkzilla Member Posts: 152
    Just actually got round to using this and it works perfectly, thanks again.
Sign In or Register to comment.