Draw only when on a certain location
app_sauce
Member, PRO Posts: 206
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
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.
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
@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.
@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
You are welcome! Glad its working for you.
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.
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.