On collecting all coins move onto next level

JCFordJCFord Member Posts: 785
edited November -1 in Working with GS (Mac)
If I have a game where an actor is moving around the screen collecting coins. How can I make it so once all the coins are collected the actor can move onto the next level?

Comments

  • JCFordJCFord Member Posts: 785
    Thank you very much Tshirtbooth.
  • yoenoeszyoenoesz Member Posts: 42
    Does the attribute called game.coins have to be an integer or boolean? or real? index?? help please

    and in wich actor do i have to add the rule with game.coins = 0 ?? in the actor self or background? or the coinds??
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Integer should do it ;)

    Doesn't matter really, but I would put it in the coin.

    Ace
  • yoenoeszyoenoesz Member Posts: 42
    hmm doesnt work.. tried everthing but when i get over my 200 points, it doesnt change the scene..
  • rlehmrlehm Member Posts: 320
    Make sure it's a game attribute.

    Also, make sure in the coin, if collision with (actor) game.coin = game.coin+1

    then you need another actor, invisible, rule if game.coin = 10 (or whatever) next level
  • yoenoeszyoenoesz Member Posts: 42
    Can you explain it more detailed?

    Like, add rule, change attribute, cuz i dont get it.. it doesnt work, i made the invisible actor, did everything but doesnt work, do i have to add the actor in scene ? could you plz explain me :(?
  • ShaneS429ShaneS429 Member Posts: 77
    So I'm guessing you have some sort of player controlled actor that goes around collecting the coins?

    This is what I would do:

    1. Make an integer scene attribute called GameCoins and set it to however many coins will be on that scene

    2. In each coin on the scene add these rules.
    If GameCoin - collides or overlaps - with actor of type - Player
    -Change Attribute - Scene.GameCoins to Scene.GameCoins - 1
    -Destroy Actor

    3. Inside the Player or some other actor add:
    If Scene.GameCoins = 0
    -Go to Next Scene (or whatever scene you want to go to).
  • yoenoeszyoenoesz Member Posts: 42
    im stuck at step 2...
    2. In each coin on the scene add these rules.
    If GameCoin - collides or overlaps - with actor of type - Player
    -Change Attribute - Scene.GameCoins to Scene.GameCoins - 1
    -Destroy Actor

    i cant get the scene.gamecoins option at -Change attribute - Scene.GameCoins to Scene.GameCoins -1 ....
    And yes I've made the scene attribute..

    Damn.. hard
  • rlehmrlehm Member Posts: 320
    If you have clicked the (scene) button, and then the + button, and created a new attribute in scene, you should find the above to show up.

    Click create rule, then in rule change attribute, then you'll find a drop down where you can select options, one will be scene, then under scene the attribute you created. Then in the next box, click the drop down again, and scene again, and theattribute you created, and then type in -1 at the end, then the green check.

    good luck. If you're still stuck, screen shot, post.
  • yoenoeszyoenoesz Member Posts: 42
    i know what you mean, by scene, you mean current scene right? but i dont have the opion, look here's the screenshot

    http://ScrnSht.com/qtmfgq

    and yes i have made the screen attribute
Sign In or Register to comment.