So I'm making a game, not going into detail, but the point is is that you're underwater and i have a fish swim back and forth on the screen, in this water room, there are 3 doors, you enter them by pressing 1, 2, or 3, you don't have to touch the doors, which is what i want. anyways, when i leave the water room, the fish won't disappear. I've tried lots of stuff to get it to disappear when i press 1, 2, or 3. One time i actually got the fish to disappear when i left the room, but sadly, it wouldn't come back when i pressed 4 to return to the water room. Here is how i had the coding before i deleted the fish, i really want to bring the fish back:
<when I receive[ Lvl 8
<repeat until> <( <{ Lvl }> <=> 9 )>
<if> << <not> <( <{ Room }> <=> << 4 )> >>
<show>
<repeat until> <( <{ Room }> <=> 4 )>
<glide( 5 )secs to x ? )y
?
<switch to costume[ 2
<glide( 5 )secs to x blah )y
blah
<switch to costume[ 1
<else>
<hide>
<end>
Last edited by croatoan (2010-07-30 00:09:51)
Offline
I still don't get what exactly you want...do you want to make it so you have to choose the correct door or something? But then, what's the point of the fish?
I'll help if you give me a little more detail about what you want the game to be like.
Offline
ok, so there are four rooms, you start in room 1 with 3 doors, these doors lead to 2, 3, and 4. in roon 4, it is flooded and i want to show it by having a fish in it that moves. When i go to room 4, it appears like i want it to, but when i leave back to any of the other rooms, it's still swimming across the screen...
Offline
croatoan wrote:
ok, so there are four rooms, you start in room 1 with 3 doors, these doors lead to 2, 3, and 4. in roon 4, it is flooded and i want to show it by having a fish in it that moves. When i go to room 4, it appears like i want it to, but when i leave back to any of the other rooms, it's still swimming across the screen...
u switch rooms with the corresponding number key
Offline
This should work, assuming you want it to show and move while the room is 4. The only problem is that it won't hide immediately once the room switches; it will finish moving, then hide. I can fix that if you want, but it will involve a slightly more complex script.
Does that work? Tell me if it does!
Offline
Harakou wrote:
This should work, assuming you want it to show and move while the room is 4. The only problem is that it won't hide immediately once the room switches; it will finish moving, then hide. I can fix that if you want, but it will involve a slightly more complex script.
http://i32.tinypic.com/20u4ow7.gif
Does that work? Tell me if it does!
Yeah, thats been my problem actually, it finishes its swim before it disappears, could you please fix that?
Offline
croatoan wrote:
Harakou wrote:
This should work, assuming you want it to show and move while the room is 4. The only problem is that it won't hide immediately once the room switches; it will finish moving, then hide. I can fix that if you want, but it will involve a slightly more complex script.
http://i32.tinypic.com/20u4ow7.gif
Does that work? Tell me if it does!Yeah, thats been my problem actually, it finishes its swim before it disappears, could you please fix that?
Oh, okay! I guess I didn't understand your problem at first. I was confused, actually, because I didn't really change anything... I'll post the script in a minute. Just let me get it working...
Last edited by Harakou (2010-07-30 00:59:32)
Offline
Harakou wrote:
croatoan wrote:
Harakou wrote:
This should work, assuming you want it to show and move while the room is 4. The only problem is that it won't hide immediately once the room switches; it will finish moving, then hide. I can fix that if you want, but it will involve a slightly more complex script.
http://i32.tinypic.com/20u4ow7.gif
Does that work? Tell me if it does!Yeah, thats been my problem actually, it finishes its swim before it disappears, could you please fix that?
Oh, okay! I guess I didn't understand your problem at first. I was confused, actually, because I didn't really change anything... I'll post the script in a minute. Just let me get it working...
awesome. thank you.
Offline
Oh, one question, do you want the sprite to point at the destination, or just slide? (I can get it working either way. I just way to know your preference, because it needs to work differently depending on what you want.)
Last edited by Harakou (2010-07-30 01:02:01)
Offline
Harakou wrote:
Oh, one question, do you want the sprite to point at the destination, or just slide? (I can get it working either way. I just way to know your preference, because it needs to work differently depending on what you want.)
its costumes are the directions that it points
Offline
croatoan wrote:
Harakou wrote:
Oh, one question, do you want the sprite to point at the destination, or just slide? (I can get it working either way. I just way to know your preference, because it needs to work differently depending on what you want.)
its costumes are the directions that it points
Ok. I think I see. So I can make I point in a direction?
Offline
Harakou wrote:
croatoan wrote:
Harakou wrote:
Oh, one question, do you want the sprite to point at the destination, or just slide? (I can get it working either way. I just way to know your preference, because it needs to work differently depending on what you want.)
its costumes are the directions that it points
Ok. I think I see. So I can make I point in a direction?
whenever i make it point in to the left the fish is upsidedown facing that way, so i just made a second costume of him facing that way instead of using directions
Offline
<when[ 1 ]key pressed> <Make three of these, for 1, 2, and 3
<broadcast[ something ]>
<when[ 4 ]key pressed> <These scripts go to the stage
<broadcast[ something else ]>
<when I receive[ something ]> <This script goes to the fish.
<hide>
<when I receive[ something else ]>
<show>
Hope this helps
Offline