Language…
14 users online: Alewx_, AlundraMM, GuiGD,  Hazel, Jeff2342, mason, MoxieCat,  NopeContest, Peydon Su, Raychu2021,  Segment1Zone2, tap52384, Yoshi Master, Zavok - Guests: 102 - Bots: 112
Users: 70,448 (2,477 active)
Latest user: Peydon Su

On/Off Block

SMW Blocks → On/Off Block

Submission Details

Name: On/Off Block
Author: MarioFanGamer
Added:
Act As: 130
Includes GFX: Yes
Description: A customisable on/off block which unlike most imitators is able to actually display a bounce animation (which for this reason requires PIXI v1.40 or newer) but can be disabled for your likings as well as be set to be one-way only, change to a different block (thus being single-use) as well as be triggered by a whole lot of options (kicked objects, spin jump and fireball besides the usual cape).
Tags: bounce lorom on-off sa-1 switch
Comments: 2 (jump to comments)
Rating:
5.0 (1 rating)
No rating
Download 8.77 KiB | 152 downloads

Screenshots

Comments (2)

 Erik Link
Tested with:
- GPS v1.4.4
- PIXI v1.42
- SA-1 v1.40
- Lunar Magic 3.50
- snes9x 1.62.3 and Mesen 2
- ON/OFF Cooldown
- UberASM Tool v2.0 (the cooldown patch requires UberASM)

I fixed two bugs where layer 2 was ignored when triggering this by fireball or cape. Very noticeable as a second ON/OFF switch could be placed below the original, and further hits would make both trigger, canceling their effect.
This block may seem intimidating at first, due to its vast configuration, but once you read through its defines, you will see it's actually very simple to use and a very useful resource. The fireball trigger is something which I especially believe will be appreciated over other alternatives.
I will admit I couldn't get the duplication feature to work. Either duplicating the vanilla ON/OFF block is very easy (I could dup that with no slowdown, to the sides or up) or this code doesn't work correctly. Still, pretty minor.

(also i found a lunar magic bug while moderating this LOL)
HammerBrother Link
Looks like you did that thing again where when the block spawns a sprite (when enabled), only that sprite, not the block itself, handles changing the block from a trigger-able state to a non-triggerable state, which result it can be triggered multiple times on the same frame (such as 2 kicked sprites hitting the left and right side of the block, or player hits the bottom and by a sprite at the same time, or Mario hitting the block at the same frame $9D is set). I was thinking of an option to disable multi-hit, which that causes bounceable blocks to immediately disable themselves after processing the first hit.

(^This is not to be confused with the second change16 into a used block and the bounce block despawns, which is impossible to have a secondary block change without the block being touched, so a sprite or something like this is required.)

Also, does it work with this uberasm tool code unlike the patch version (the latter disables the block entirely, the former allows bouncing, but not flipping the on/off flag)?