Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More Events: Add More Events extension #639

Merged
merged 55 commits into from
Aug 23, 2023

Conversation

LilyMakesThings
Copy link
Contributor

@LilyMakesThings LilyMakesThings commented Jun 25, 2023

I've wanted to create this extension for a long while, this is about as many blocks as I can think of.

I needed this extension for specifically the "broadcast to target" block. (In hindsight, it may need some work).

image

@LilyMakesThings LilyMakesThings changed the title Move Events: Add More Events extension More Events: Add More Events extension Jun 25, 2023
@LilyMakesThings
Copy link
Contributor Author

This block now exists thanks to @CST1229
image

- Fixes it being triggered by a green flag click
- Modifies the VM function
- Fixes bug where keys that were in uppercase/not a string were not valid in the menu input.
- Casts the key value to a string and forces it to lowercase.
@LilyMakesThings
Copy link
Contributor Author

Thumbnail:
image

@LilyMakesThings LilyMakesThings mentioned this pull request Jul 2, 2023
@BlueDome77
Copy link
Contributor

"when extension added" will pair nicely with ShovelUtils "load extension" block!

@LilyMakesThings
Copy link
Contributor Author

Likewise with what TheShovel commented on CustomCSS, if there's any immediate problems with this extension (or other ones), just let me know and I can resolve them

@BlueDome77
Copy link
Contributor

BlueDome77 commented Jul 7, 2023

Are you going to add this block?

scratchblocks

It only makes sense cause the original "broadcast ()" block has a STRING input

@LilyMakesThings
Copy link
Contributor Author

Are you going to add this block?

scratchblocks

It only makes sense cause the original "broadcast ()" block has a STRING input

That's impossible to add.

@BlueDome77
Copy link
Contributor

Are you going to add this block?
scratchblocks
It only makes sense cause the original "broadcast ()" block has a STRING input

That's impossible to add.

why?

@LilyMakesThings
Copy link
Contributor Author

Are you going to add this block?
scratchblocks
It only makes sense cause the original "broadcast ()" block has a STRING input

That's impossible to add.

why?

Sigh. I hate explaining this to people (that's not your fault).

Broadcasts themselves work through a Block Utility called util.startHats (alternatively you can do Scratch.vm.runtime.startHats, but they work the same regardless). Broadcasts have an input field that it'll check on the hat it starts to see if they match. In this case, it'll be "message 1". If they're the same, the hat will start.

However, the field check on util.startHats only works for 1 type of field (in Scratch terms, "the square one"). It does not work for fields that accept any kind of input.

There is no way around this.

@LilyMakesThings
Copy link
Contributor Author

I forgot to say but I made the changes to this block I eluded to:

  • It now supports sending messages to the stage target
  • The menu isn't broken
  • It sends to clones as well
    image

@LilyMakesThings
Copy link
Contributor Author

A few questions:

  • Are merge conflicts something I'll need to resolve?
  • Should these blocks be removed?
    image

@LilyMakesThings
Copy link
Contributor Author

Added data sending through broadcast messages
image

@LilyMakesThings
Copy link
Contributor Author

Using XML blocktype to get the broadcast menu into the blocks. Doing this until there's a way to do it without XML
image

@GarboMuffin
Copy link
Member

There is a VM change that is merged but not deployed yet that will make whenValueChanged work properly

@LilyMakesThings
Copy link
Contributor Author

should "forever" only run while the project is active?

@LilyMakesThings
Copy link
Contributor Author

All of these have now been implemented. I'm not adding anymore than this.

image

@LilyMakesThings
Copy link
Contributor Author

...except that.

@GarboMuffin
Copy link
Member

is this done?

@LilyMakesThings
Copy link
Contributor Author

yep

@GarboMuffin GarboMuffin merged commit 94f7016 into TurboWarp:master Aug 23, 2023
3 checks passed
@LilyMakesThings
Copy link
Contributor Author

OH DAMN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants