Create Teleport

JoshKahaneJoshKahane Member Posts: 470
edited November -1 in Working with GS (Mac)
Hi

Either I have absolutely no brain or I am making it far to complicated. I am trying to make a teleport so that when my character actor collides with teleport actor 1 it gets teleported to teleport actor 2 and the same in reverse. Any help much appreciated, thanks.

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    When Actor collides with actor 1 AND self.IJustTeleported is false
    --Change Attribute self.Position.X then give it the X position of Actor 2, manually or via game attributes.
    --Change Attribute self.Position.Y ...Same thing but for the Y position
    --Change Attribute self.IJustTeleported = true

    Do the vice versa for actor 2.

    One more rule:
    If Event Collides with Actor 1 OR Event Collides with Actor 2 OR Attribute self.IJustTeleported is false
    --(Do nothing)
    Otherwise:
    --Timer After .4 seconds
    ----Change Attribute self.IJustTeleported = false
  • JoshKahaneJoshKahane Member Posts: 470
    Hmm, thought this made sense, but I haven't managed to get it working, any possibility you could explain further please or upload a demo? I understand you must be busy but I would really appreciate the help. Thanks.
  • JoshKahaneJoshKahane Member Posts: 470
    tshirtbooth, at hand and foot for all. Your like my fairy god mother, hehe, always helping me and other outs, thanks you two. I shall take alook and see if I can get my brain into action (rare occasion).
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    http://gamesalad.com/game/play/26177 Here is another. :p Had to add a Timer around the otherwise section.
  • JoshKahaneJoshKahane Member Posts: 470
    Ok, so I have a very bizarre little issue, and it must be something I have conflicting, but listen to this.

    On my level, the teleport gets you from side of a wall, to the other side. Only since copying your example (exactly im sure of it, as it works fine and just as I want and as it does in your example), when I collide with the wall from the left (the side i start on) it also acts as a teleport, but from the right it results in gameover as normal. Very odd, huh? Im almost 100% positive that there are not links to the wall giving it teleporting abilities.

    Shouldn't think you will be able to figure that one out, hehe.
  • JoshKahaneJoshKahane Member Posts: 470
    Nope there is a proper issue here. I even tried just replacing the wall with a new actor and still this happens.
  • JoshKahaneJoshKahane Member Posts: 470
    I haven't got a clue, this is really quite odd. Is there someone who really wouldn't mind taking a short moment out of their time to look at the code of my game please then? I really would need their trust and help.
Sign In or Register to comment.