Pages: 1
Posted on 02-26-16, 11:06 pm (rev. 1 by Knight of Time on 02-26-16, 11:06 pm)


Karma: 26
Posts: 17/21
Since: 06-27-14
Hi again guys,

At one point I was tempted to make a topic asking for help on figuring out how to temporarily deactivate pipe bubbles while using a switch, but after finding that answer on my own here in another topic, I wanted to post a similar, but slightly more complicated topic, so here's what I'm trying to do now...I'm trying to do the switch deactivates pipe bubbles thing, but I'm using 6 ? switches that each appear in a specific order (only one of them appears at a time; each of the first five switches makes the next one in the sequence appear without a timer or music change, while the sixth switch activates the timer and music change. This one is the one I'm aiming to temporarily turn off the pipe bubbles with).

Now, I set up the switches appropriately (switch #1's output ID is 3, that 3 becomes the next switch's input ID while it gets an output ID of 4, and so on until the sixth switch's output ID is 8 and the input ID is 7), and used sprite 168 to try and tie this whole thing together (the pipe bubbles are in a loop which can be exited, but there is another separate pipe that I'm intending to make unreachable unless these pipe bubbles are deactivated), but I'm having trouble getting the pipe bubbles to appear (I know that the zone number and the target ID of sprite 168 are supposed to be the same, but for some reason something just doesn't add up to me yet).

So yeah, can someone help me get this resolved, please? I'm probably going to use this puzzle in my first swimming level as the required means for reaching the area with Star Coin #2.

Thanks in advance.
Posted on 07-24-16, 07:56 pm (rev. 4 by ImageBot on 11-21-16, 03:22 am)


Karma: 1064
Posts: 89/200
Since: 02-02-15

NSMB Editor: Loop and link a chain of Switches - Newbie way.



This post have the objective to give a user knowledge to create a simple chain reaction of linked swicthes to do something at the end of the last switch linked.
This example teaches how four switches needs working together to turn off Aquatic Bubbles.

At the end of this post you can download the level example.

You will need:

- A Zone
- Sprite 168 (IF Event)
- Sprite 291 (?-Switch Brick)
- Sprite 107 (?-Switch)
- Bubbles (Sprites 48, 49, 50 and 51)

Let's Make:

Below we show an example of a simple level in the water. There are four switches spread in a row on the level. At the end of the level there is a red colored pipe which player needs to go through to finish the level. The pipe has some bubbles which blocks the player to cross through. While the bubbles are on the way, Mario can't finish the level. The player needs to trigger the switchs in order and in time to turn off the bubbles. Each switch turn on the next. Just the last switch have the capability to turn off the bubbles. So, if Mario fail trigger any switch in time, will need to start again from first switch.

Step 1. Create, put and draw things:

1.1. Create a view and setup Water in 3D Lights option.
Obs.: If you use a non-compatible background, put sprites 316 and 317 (Water Effect).
1.2. Put a Zone and make sure Mario will need to pass through it.
1.3. Put a Sprite 168 (IF Event) inside the Zone (the position is optional, but help you to see better).
1.4. Put a "?-Switch Brick" (Sprite 291).
1.5. Put three "?-Switches" (Sprite 107) over three coin-bricks from basic tileset.
1.6. Draw a pipe an put Bubble sprite on it (Sprites 48-Up, 49-Down, 50-Right or 51-Left)

The picture 1 and 2 below show and example how your view could look after design the level. This view show some other optional elements not necessary for our example, like coins around the switches, Spawn Cheep Cheep (Sprite 185) and Arrows (Sprite 277).


Pic 1: brick switch, normal switch and sprite 168.


Pic 2: the other two switch sprites, and the bubble sprite.

Now we need to config our Switch sprites. Let's see the step 2:

Step 2. Link and config the things:

First "?-Switch Brick" (Sprite 291):
- Output ID=1, Mode=Activate ID, and put to play with music.
Second "?-Switch" (Sprite 107):
- Input ID=1, Output ID=2, Mode=Activate ID, and put to play with music.
Third "?-Switch" (Sprite 107):
- Input ID=2, Output ID=3, Mode=Activate ID, and put to play with music.
Last "?-Switch" (Sprite 107):
- Input ID=3, Output ID=4, Mode=Deactivate ID, and put to play with music.
Bubble sprite:
- Input ID=4.
:: Sprite 168 (IF Event) (*here is "the jump of the cat"*)
- Target ID=4, Mode=Activate ID, Enemy Zone ID=255.

Save your level and try it!


Here is a video with the result of the effect.
Sorry the bad quality (hardware limitations).

NSMB Editor: Loop and link a chain of switches

Youtube duration: 2:33 min.

Download the Level Example:
NSMB_Linked_Chain_Switches.nml

[]-P
Pages: 1