Make appear another actor after collecting items

dondan89dondan89 Member Posts: 150
edited October 2012 in Working with GS (Mac)
Hello,

I have my game when collecting items then the main character has to go to the main goal and level is finish. What I want to know if I can make that when the main character collect all the items an arrow appear close to the main goal.

How can I do this?

thank you

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Use what ever attribute you are using to track how many items have been collected and add a rule to a single controller actor

    When game.YouAttribute = 10
    Spawn Arrow Actor at x and y

    Or you could go ahead and place the arrow actor and set its Alpha Value to 0 then have a rule in the arrow

    When game.YouAttribute = 10
    Change self.color.alpha to 1


    The 10 I'm using is just an example in case that was not clear.
    theres lots of ways to do what you are wanting to do. None are necessarily the right way either. You just have to really play with all the different options and decide what works best for this particular game.
  • carlblanchetcarlblanchet Member Posts: 755
    Have an index attribute for the collected items. +1 every time an item is collected. For that Arrow have it off screen, if items collected attribute is i.e. 15, change attribute for the x and y coordinates of the arrow to the desired spot.
  • dondan89dondan89 Member Posts: 150
    Hi,

    Thank you so much for all the help
  • alarm656alarm656 Member Posts: 291
    Hello,

    I have my game when collecting items then the main character has to go to the main goal and level is finish. What I want to know if I can make that when the main character collect all the items an arrow appear close to the main goal.

    How can I do this?

    thank you
    Hello, how did you collected your items?
  • carlblanchetcarlblanchet Member Posts: 755
    @alarm656 When ItemActor overlaps or collides with CharacterActor, add rules that that add +1 to the ItemsCollected attribute and make the item actor destroy itself.
  • alarm656alarm656 Member Posts: 291
    @alarm656 When ItemActor overlaps or collides with CharacterActor, add rules that that add +1 to the ItemsCollected attribute and make the item actor destroy itself.
    Thank you brother! I will try it today.
  • alarm656alarm656 Member Posts: 291
    @alarm656 When ItemActor overlaps or collides with CharacterActor, add rules that that add +1 to the ItemsCollected attribute and make the item actor destroy itself.
    thanks again! but is it possible to make it like that: when itemActor touche is pressed?
  • carlblanchetcarlblanchet Member Posts: 755
    edited October 2012
    @alarm656 It sure is! It works the same way as I previously stated, except in the ItemActor you make a rule that if touch is pressed -> add +1 to the ItemsCollected attribute and make the item actor destroy itself.

    Your welcome! :)
Sign In or Register to comment.