Pages: 1
Posted on 01-22-14, 02:04 am


Karma: 9
Posts: 5/11
Since: 01-16-14
Guys, I have a switch problem.

I want Mario to find a ? switch, activate it, and when he activates it, the pipe bubble disappears and Mario gets a star coin.
However, when Mario finds the switch, the switch is already activated and pipe bubble has already disappeared.

I don't know what's wrong...
================================================

? switch: input id = 0 / output id = 1 / deactivates targets / toggle start
pipe bubbles (up): input id = 1 / output id = 0

================================================


I want to post my level here but I don't know how to post images here..
Posted on 01-22-14, 02:11 am
Birdo


Karma: 3304
Posts: 1540/2021
Since: 06-28-11
An image wont help. The .nml file will do.

Also, your problem sounds like you have multiple switches with the same ID
(example, 2 switches with the same output ID of 1. When mario presses the first one, it will desactivate the bubbles if they have an ID of 1)

Just set the ? switch that is supposed to deactivate the bubbles to other value than 1 (and change the new output ID to the pipe bubbles too)
_________________________

Posted on 01-22-14, 03:10 am


Karma: 9
Posts: 6/11
Since: 01-16-14
That's not the problem. I only have one switch in my level.
Posted on 01-22-14, 03:13 am
Birdo


Karma: 3304
Posts: 1541/2021
Since: 06-28-11
Well then, can you upload your level here http://nsmbhd.net/uploaderlist/?cat=3 so people can take a look into it?
_________________________

Posted on 01-22-14, 06:29 am (rev. 2 by maluigi on 01-22-14, 06:38 am)


Karma: 9
Posts: 7/11
Since: 01-16-14
Patching
Posted on 01-22-14, 08:10 am
Doesn't actually do anything.

Karma: 3022
Posts: 368/653
Since: 10-22-12
So, I cleared out a level and recreated this with the settings in the first post. With nothing else in the level, it is as you state; the switch is already pressed and there are no bubbles.

So this is actually two problems, but we only need to worry about one of them.

The problem we care about right now is that you can't use pipe bubbles that way. Pipe bubbles don't have an input/output ID like you said; it has two input IDs. Bubbles start off on if both input IDs are 0, otherwise it will stay off until triggered by the correct ID. This means that even if the switch was fixed, the bubbles would still stay off (since one of the input IDs is not 0) and will turn on when you hit the switch. This is the opposite of what you want, but what you want is not possible as you have it.

So here's how you fix it:

1) In the level editor window, press "z" to switch the dialog on the left to the zone editor. Click "add" to add a zone to the level, then move the zone to the entrance of the level so that when you enter the level, Mario is entirely within that zone. If you have no other zones, this should be zone 0.

2) Add sprite 168 (Event Controller - "If" (uses zones)) to the level. I don't think it matters where in the level you put it, but put it in the zone you just created just to be safe.

3) Edit the details of the sprite you just added to look like this:

Target ID 1 \\ Activates ID 1 Switch Mode Activates Target Usage Mode (don't touch) \\ I don't know what this does, leave it Mario Powerup Any Mario \\ All Mario forms work Mario Status In zone \\ Activates when Mario is in the zone Enemy Zone ID 255 \\ Ignores enemies Mario Zone ID [zone #] \\ Only works with the specified zone


4) Repeat steps 1-3 for all entrances to the level.


The pipe bubbles start out deactivated. When you enter the level, sprite 168 stealth activates ID 1, turning the bubbles on. So when you reach the bubbles, they are on and can be turned off with the switch, which was also fixed with the process above. The problem with the switch was that since the bubbles are off to begin with, there's nothing to deactivate, so the switch stays pressed.
♪♫♩♬
Posted on 01-23-14, 01:43 am


Karma: 9
Posts: 8/11
Since: 01-16-14
Wow thanks very much!

I've never thought about putting in sprite 168...

THANKS VERY MUCH!!
Pages: 1