Changing Actors During play

randomunicornrandomunicorn Member Posts: 2
edited June 2012 in Working with GS (Mac)
Hi everyone. I am currently building a game and have got to a point I can't advance past. I have a red ball on the screen that the player moves around the screen to smash red blocks. I am wanting to introduce a block that when collided with changes the red ball to blue and that blue ball will smash the blue blocks only. (and another block to change the ball back to red ball to smash the red blocks only) I have tried "change image" but it doesn't work. Any instructions on how to do this will be greatly appreciated.
Random Unicorn

Best Answers

  • gyroscopegyroscope I am here.Posts: 6,598
    edited June 2012 Accepted Answer

    Hi @randomunicorn

    You'll need a boolean, let's call it RedorBlue.

    Add a condition in your Rules of your prototype ball: When attribute RedorBlue is false
    --- then your red smash/collide rules for red blocks
    otherwise
    --- then your blue smash/collide rules for blue blocks


    Add into the red blocks:

    When colliding with ActorBall,
    when RedorBlue is true
    Change Attribute RedorBlue to false
    Change image (---to red ball image--- this should work fine; if the balls are just colours though, you don't need this, just change the colour from blue to red, of course)

    Add into your the blue block(s):

    When colliding with ActorBall,
    when RedorBlue is false
    Change Attribute RedorBlue to true
    Change image (---to blue ball image--- this should work fine; if the balls are just colours though, you don't need this, just change the colour attributes from red to blue, of course)

    ...something like that; this is off the top of my head but should work out.

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

  • Braydon_SFXBraydon_SFX Posts: 9,273
    edited June 2012 Accepted Answer
    Here is a quick demo. :)
    No need for two ball actors...
    http://www.mediafire.com/?p9xvhx6k6fm2ov5

Answers

  • randomunicornrandomunicorn Member Posts: 2
    Also I have seperate Red And Blue Ball Actors.
  • randomunicornrandomunicorn Member Posts: 2
    Thank you. It worked perfectly. Just finished my tutorial level. Just 49 more levels to create and some music then I am ready to launce. Thanks again
Sign In or Register to comment.