Almost done with a game called "My Puppy", a simulation project where you adopt a puppy, name it, care for it, compete in dog shows, play games, go places, etc.
Anyway, there are two things I need to figure out.
First off, when you scroll over your puppy, it barks happily and wags its tail. The problem: when the sprite is hidden, this script is still in action. Scroll over the area where the dog should be and the invisible puppy will bark... I need to fix this, though it isn't a major issue.
Second, there is a possibility that when you go to the park, you can find different things lying around. One object is a letter that may appear on the bench. When you click on it, a close-up letter sprite appears and lets you read the whole note. Scroll over the note, a bottom corner lifts up and you can turn the page over to read the back; you can also turn it from the back to the front; however, when the mouse-pointer is not touching the note anymore, the script stops... Yes, it is "forever if". I have also tried "repeat until < not < touching mouse-pointer > >". Plus, when the back page is clicked, it doesn't return to the front...
If you need me to post the actual blocks, I can, but here is basically what I have:
I have it to where there is a variable called "page#?". When flag is clicked, page#? sets to 0. Forever if page#? = 0 and mouse-pointer is touching sprite, (Just scroll over it.) switch to costume with corner pulled up. Now, when sprite is clicked, forever if page#? = 0, switch to costume of writing on back and set page#? to 1. Forever if page#? = 1 and mouse-pointer is touching sprite, (Scroll over it again.) switch to costume of back page with corner pulled up. If sprite is clicked, forever if page#? = 1, switch to first costume of front page and set page#? to 0.
Offline
Well, for the first, just make a variable and set it to 1 whenever you hide the puppy, and 0 whenever you show it. Then make the variable being equal to 0 a conditional for the scrolling/barking script.
I'm not sure I can help with the second unless you post the project so I can see the scripts interacting. But what may be happening is the sprite is clicked and sets the page to 0, but changes back to 1 instantly, because the mouse-pointer is touching the sprite. This doesn't fit the problem that you are having, but seems that it may be a problem with the script that needs fixing anyway.
Offline
What more games said
Offline
The first solution worked and was very simple, thank you!
As for the second, I may post the project later, but for now I have to go to the humane society, so I'll just experiment with it for now. You may be right about the variable instantly changing, so I'll test that.
Offline
Okay, so the instant variable changing is the problem with switching the pages, but now that I know this, how can I fix it? I also have to figure out the page corner thing... If that's too complicated, I can just take that off, but it shouldn't be hard to do.
Anyway, once again, I have to go. Any other suggestions would help! Thanks again.
Offline
MoreGamesNow wrote:
Well, for the first, just make a variable and set it to 1 whenever you hide the puppy, and 0 whenever you show it. Then make the variable being equal to 0 a conditional for the scrolling/barking script.
+1 but I don't know about the second. Post a version of what you have done and tell us when so we can download it and see how it works.
Offline
Posting right now. Early version, but almost done anyway. Download it and you'll easily figure out my simulation, as well as my problems with it.
Offline
Bump. The early version is posted. I really need help with this.
Offline
<when[ Note2 ]clicked>
<if> <( <{ page#? }> <=> 1 )>
<set{ page#? }to( 1 )>
<switch to costume[ costume1 ]>
<else>
<set{ page#? }to( 1 )>
<switch to costume[ costume3 ]>
<end>
Last edited by MoreGamesNow (2011-08-02 09:06:33)
Offline
Thank you! That works perfectly, I'm glad that's figured it out. The "If ... else" thing might work for the page corner pulling as well. If not, I'll post for more help. Thanks again!
Offline
Okay, I decided not to have the page corner pulled up when you scroll over it. Clicking is fine, without the costumes... I'm fine with it like this anyway!
Offline