gaining points by killing another actor

hello!

I'm trying to recreate this game - http://www.bbc.co.uk/cbeebies/charlie-and-lola/games/charlie-and-lola-cloudhopping/

how do i go about doing the catching the butterfly action.
I have the butterfly moving across the screen using interpolation and the actor can jump from platform to platform.
I need it so when the character actor is close to the moving butterfly actor and the space bar is pressed, the butterfly actor will disappear.

Thank you for your help in advance!

Answers

  • JordeyyJordeyy Member Posts: 409
    If I understand you correctly, I would do it this way

    I would make it so ,when space is pressed, it spawns a small invisible actor ,
    Constrained to the main actors x,y position

    On this spawned actor have ,when (spawned actor collides with butterfly destroy butterfly

    And have a timer for like 0.5 seconds on the (spawned actor) stating , after 0.5 seconds destroy spawned actor


    Hope this helps :). Also hope that's what you mean
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Detecting collisions with Interpolate behaviors will not give you consistent results. You'll need to use Move/Accelerate/Change Attribute instead. Once you do that, it's just a matter of adding a rule in the butterfly actor that says When [all] key space is pressed AND When actor collides with [Player actor] --> Destroy actor.

    And if you don't want it only to work with collisions, you could use magnitude to determine how far away the butterfly is.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • lalaglalag Member Posts: 2
    Thank you so much for your help. Would you be able to write this out for me telling me what exactly I should click as I am still stuck and it's not working for me. Thank you!
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @lalag What have you done differently from before when you were using Interpolate? If you'd like to post a screenshot of your collision and magnitude rules, I can help troubleshoot them.

    To post an image, upload it to a file-sharing service to generate a URL and then use <$img src="URL"> without the $ symbol.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.