Collecting Stars?

GuaveMediaGuaveMedia Member, PRO Posts: 1,262
edited November -1 in Working with GS (Mac)
Good evening,

my first app comes to an end. The last thing to do is to create this:

I made my first app a simple and classic one, you have to jump on walls and collect the stars.
I want to do it like all other apps.

On the top of the view you have 3 uncoloured stars, if the actor gets one, one star at the top gets filled with a color, I think everyone knows what I am trying to say..

My first Idea was to create a Collide Rule, when the actor hits the star, destroy the star. But then?

Thanks ...

Comments

  • JadarStudiosJadarStudios Member Posts: 264
    Have a game attribute, or a scene attribute. It should be a boolean. Have it be like starCollect#1 or something. Have this be in the star:

    When collide with Actor, destroy actor, and change attribute game.StarCollect#1 to true.

    Now put the stars in the scene, then open them from the scene, unlock them, then change the change attribute to a different attribute, like starCollect#2. I haven't tested this, but I think this should work.
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    But what about the stars fields at the top of the view?
  • JadarStudiosJadarStudios Member Posts: 264
    Take back what I said earlier. Have the attribute be a integer, and the rules in the star be:

    When collide with Actor, change attribute game.StarCollect to game.StarCollect + 1, timer: after 0.001 seconds, destroy actor.

    Now have an actor with the same image as the star, have this in the rules:

    Rule: When Attribute game.StarCollect > 0:

    Change attribute self.Color.Alpha to 1
    Replicate direction right, copies game.StarCollect.

    After that put that actor on a non-scrollable layer, in the top right corner at the edge. Make sure it's alpha is set to 0, and try it.
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Okey I tryed it it but it didn't work :/
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Two problems,

    1, What do you mean with Replicate direction right, copies game.StarCollect??

    2, When I set the second star Alpha to 0, the star doesnt get seen, I want to see the outline, and after the characer collects the star, the other star ( with only the outline first) gets filled with blue or green or...
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    I am working with Gimp and Inkscape. And I thought I create two stars, one filled for the character to collect, and the same one but just with the outline ;)

    But what Jadar tryed to say to me doesn't work :/ I mean it would be logical but somehow it doesn't work...
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Nobody an idea?
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Nobody an idea?
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Okey, I tried and thought about it but I don't get on with it, has someone an idea?

    ALex
Sign In or Register to comment.