Discuss Scratch
- Discussion Forums
- » Suggestions
- » New Method Types
- Furious-
-
24 posts
New Method Types
Okay, I think I've posted this before, but no one saw it. ;-; Anyway, I had an idea for new method (custom block) types.
I'll share a project to explain and show you what it'll look like.
Something like this:
Say, if the largest value is 205, then “return” will return 205, therefore “LARGEST IN THE LIST OMG” will be 205. Amazing, right?!??!
Do I have support?
I'll share a project to explain and show you what it'll look like.
Something like this:
set [LARGEST IN THE LIST OMG v] to (item (biggest value [list v] :: custom block) of [my list v])
define biggest value (list)
set [largest v] to ((0) / (-1))
set [index v] to [0]
repeat (length of [list v])
change [index v] by [1]
if <(item (index) of [list v]) > (largest)> then
set [largest v] to (item (index) of [list v])
end
end
return (largest) :: custom block
Say, if the largest value is 205, then “return” will return 205, therefore “LARGEST IN THE LIST OMG” will be 205. Amazing, right?!??!
Do I have support?
// Please note that this is my best try at making it look perfect.
Last edited by Furious- (Aug. 14, 2015 20:21:55)
- gdpr533f604550b2f20900645890
-
1000+ posts
New Method Types
Last edited by gdpr533f604550b2f20900645890 (Aug. 14, 2015 21:30:33)
- Harakou
-
1000+ posts
New Method Types
Duplicate.It does seem like that suggestion encompasses this one, yes. Please use the existing link. Also, if you've already made a thread about something, please find it and bump it instead of making another one. Thanks!
- Discussion Forums
- » Suggestions
- » New Method Types