end of collection and then change scene

DookiDooki Member Posts: 247
edited November -1 in Working with GS (Mac)
Hey all,

In my game you trigger scene change after you have collected all the gems. How do I go about creating a controller that will do this? Thanks.

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    Have an integer attribute called 'gems'

    Every time your player collides with a gem, change attribute gems to gems +1

    Make a rule:

    If gems = 20

    change scene

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • DookiDooki Member Posts: 247
    Cool! This is the opposite of making it deduct lives per collision. Is the rule (gems=20, change scene) within my main actor too or an external controller? Thanks!
  • quantumsheepquantumsheep Member Posts: 8,188
    I'd make it external. If you wanted to change the number depending on the level, it's easier to do with instances of an external actor, rather than muck about with your main actor prototype.

    QS

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • DookiDooki Member Posts: 247
    Thanks. So for every level I create an instance of the external controller actor, check. So if level one I have a controller and level two I use an instance of the controller, can I dump the original controller in level two from level one?
  • DookiDooki Member Posts: 247
    OK, I got the external controller to work. NOW, I notice that if I make changes to level two the same changes happen in level one. For example, level one has one actor dropping a gem. Level two has two actors dropping gems. However, when I preview the game level one as the two actors now. How can I make scene changes independent? Thanks.
  • quantumsheepquantumsheep Member Posts: 8,188
    You click on the actor within the scene, then click on the padlock to unlock the prototype and make an instance.

    Have a look at he Wiki stuff. The basics are covered there :D

    Good luck!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • DookiDooki Member Posts: 247
    OH YEAH! I did read this somewhere.

    Thanks again!
Sign In or Register to comment.