How to move an Actor from one scene to another?

DesBDesB Member Posts: 39
edited November -1 in Working with GS (Mac)
Please help...I need to get a selected actor in Scene one to appear in scene two....How would you do it?

Comments

  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    I'm afraid it i impossible, unless you make two actors (First on the first scene and second on the second scene), and give them rules or behaviors you want.
    Also you can make a integer attribute, and create a rule in the first actor:
    If position/game.attribute/self.attribute (depending on what do you want)
    Change attribute game.XXX to 1.

    And on the second scene, create rule in the actor:
    If attribute game.XXX=1
    Move to XXXXX / or something else.

    Second way:
    If you have this actor as a prototype (not a instance), than you can make a Spawn Actor behavior somewhere in the second scene, and spawn this actor.

    Hope that helps.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Just to point out that you only need one actor for both scenes, placed in start position differently to each other if required.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • DesBDesB Member Posts: 39
    ThankYou very much TheMoonwalls.....What I am trying to achieve is to give the gameplayer (say) four buttons in scene one... and asking him to choose one.......and this chosen button appears on scene two.
    Is this possible?
    Thanks again
  • DimensionGamesDimensionGames PRO Posts: 993
    Im assuming you have each button as a different actor? If so just drag that actor into the next scene. If you are however using one image for all the buttons then I don't think it is possible to do it with the same actor.

    Hope this helps.
  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    I understand now.

    In the first scene add Change attribute behaviors to the original actors: when touch is pressed, change attribute game.button1 to 1, the same for the second actor, but with attribute game.button2.

    On the second scene you have to put these two buttons, and change it's alpha channels to 0. In each of them make a rule: when attribute game.buttonX = 1, change attribute self.Color.Alpha to 1. If you want player to touch this button you have to add this line to your touch rule:
    When attribute self.color.alpha = 1.

    In this situation when player touch first button in the first scene, than on the second scene this button will be visible, and clickable.
    Hope that helps.
Sign In or Register to comment.