Hey guys, I just started a new project after scrapping two previous ones. I decided to not go with a scrolling option so what I have is my character going up stairs towards the right and at the edge I want it so that when he hits it, the next background is shown, and the stairs sprites disappear. What do I do to achieve this?
Offline
You could do this by creating sprites called "Exit 1" "Exit 2" etc:
Tell those sprites to "Forever, show. Set Ghost effect to 100%" and then tell your main charecter to broadcast "Exit 1" "Exit 2" etc: Depending on which exit your touching
Then, make all sprites you don't want hide when they receive "Exit 1" and everything you do want shows, with the background changing etc:
If you want, you can download my Dot RPG project and look at the sprites/scripts to see what I mean
Download here
Offline
What's the ghost effects? I only started using this program for a couple days. I haven't used broadcasting yet either.
Thanks. Do you have any instant messaging? I need to get this done by 9:30am or I'm dead. You can try my AIM at Lobo Herrerano, Skype doratheconquistadora
Last edited by Weredawg (2009-12-03 06:58:44)
Offline
Weredawg wrote:
What's the ghost effects? I only started using this program for a couple days. I haven't used broadcasting yet either.
Thanks. Do you have any instant messaging? I need to get this done by 9:30am or I'm dead. You can try my AIM at Lobo Herrerano, Skype doratheconquistadora
<ghost> effect is used to create transparency, like a stereotypical ghost. Broadcast means like you're sending a message to the world, and then you can make other sprites respond to that message with the <when I receive[ block
And to help with the original question:
Create a sprite called exit, whenever it touches the player, make it broadcast "next".
DO NOT make it broadcast "exit1" for level 1 and "exit2" for level 2 etc, you're wasting time, effort and memory space. Create a variable called "level". Now create a script saying:
<when I receive[ next
<change{ level }by( 1
Then for the stage or whatever is the level, say
<switch to costume[ <{ level }>
If you number the costumes, or you could:
<if><( <{ level }> <=> 1 )>
<switch to costume[ whatever your costume is called.
There are many many more ways, but this is my second favorite (favorite involves a lot of pen so I won't go into it now).
Also, for the stairs, do something like:
<if><( level <=> number )>
<go to x
something )y
something
If you aren't comfortable with variables, please ignore this post.
Last edited by justtestingstickman (2009-12-04 08:28:56)
Offline