GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Draw only when on a certain location

Hey - I'm trying to figure out how to make it possible to draw but only when the user is pressing on a certain point. I am trying to make a tracing app. I am using a draw demo I found and making the draw function only happen with the mouse position is within a certain invisible actor. But it doesnt work. Since the shapes I want to be able to trace arent just squares I have been placing several of my trace actors into patterns for the user to "trace" but the when mouse position is within actor attribute seems to go off every time the mouse position goes from one block to the next.

Anyone know a way to accomplish this??
Thanks

SocializeTwitter , **My Site ** **Play Loop Zen Free **iOS HERE, Google Play HERE

Comments

  • RThurmanRThurman Posts: 2,829Member, Sous Chef, PRO

    There isn't much info to go on here. But a guess might be that you are using a game level attribute to fire off the trace actors. (When one trace actor sets the game attribute to true, all the trace actors fire off.) To fix it, use a self attribute in each trace actor.

  • app_sauceapp_sauce Posts: 206Member, PRO

    Sorry If I didn't have a lot of info. Let me try to explain it a bit better. I am using a demo I found for drawing smooth lines in gamesalad. (The Demo is called Draw-It_v1.1). The demo works perfectly for drawing lines thats not the issue. My problem is that I only want to be able to draw lines on top of a certain actor. I want to do a letter tracing app for kids to learn how to write the alphabet. So I tried putting a letter "A" png into gs and put A rule that stated when mouse position is within my letter A actor change can trace to true. Then I added game attribute must be true to draw. It worked fine but you could draw in the entire square around the letter "A" png not just over the letter A. It seems like it should be an easy fix I just cant think of a way for gamesalad to recognize when the user is touching the "meat and potatoes" of the Letter A actor.

    Thanks for your help

    SocializeTwitter , **My Site ** **Play Loop Zen Free **iOS HERE, Google Play HERE

  • RThurmanRThurman Posts: 2,829Member, Sous Chef, PRO
    edited October 2014

    @bktennis12‌ -- OK now I see what you are doing!

    Using Draw-It_v1.1 you will need to do a bit more.

    1) Make an actor that only covers the lines you want traced. For example make an actor called "a_Pieces" and cover all the parts of the 'A' image where you want the "ink" to go. (For the capital A you will need 3 copies of "a_Pieces" to cover the three lines of the 'A'.)

    2) Create a game level attribute called "mouseInActor"

    3) In the 'draw function' actor add a condition to both of the rules that are listed there. The condition to add is: When attribute game.mouseInActor is true

    4) In the 'a_Pieces" actor add the following rule:

    That should get you back on the right path.

  • app_sauceapp_sauce Posts: 206Member, PRO

    @RThurman Thanks its working well! I had the game.mousinactor to false in the wrong Otherwise slot.

    SocializeTwitter , **My Site ** **Play Loop Zen Free **iOS HERE, Google Play HERE

  • RThurmanRThurman Posts: 2,829Member, Sous Chef, PRO

    You are welcome! Glad its working for you.

  • sheba2018sheba2018 Posts: 3Member

    Using Draw-It_v1.1 you will need to do a bit more.

    Where can I find this demo? I am also trying to do a tracing game and trying to find an easy way to do it. I have 235 characters that I would like to have traced in a game.

  • Sheba's JewelsSheba's Jewels Posts: 9Member, PRO

    Using Draw-It_v1.1 you will need to do a bit more.

    Where can I find this demo? I am also trying to do a tracing game and trying to find an easy way to do it. I have 235 characters that I would like to have traced in a game.

Sign In or Register to comment.