We need something unique to our mod.
Offline
here's a little code for easier dropdowns:
CommandBlockMorph»uncoloredArgMorphFor:
… uncoloredArgMorphFor: t1 | t2 t3 t4 | t3 _ t1 size. (spec includesSubString: '||') ifTrue: [ t4 _ spec findTokens: '||'. ^ ChoiceOrExpressionArgMorph new choices: t4; choice: (self specsWArgs at: t4 asArray ifAbsent: [t4 at: 1])]. (spec includesSubString: '&&') ifTrue: [ t4 _ spec findTokens: '&&'. ^ ChoiceArgMorph new choices: t4; choice: (self specsWArgs at: t4 asArray ifAbsent: [t4 at: 1])]. (spec includesSubString: '$') ifTrue: [ t4 _ spec findTokens: '$'. ^ ExpressionArgMorphWithMenu new choices: t4; stringExpression: (self specsWArgs at: t4 asArray ifAbsent: [t4 at: 1])]. (spec includesSubString: '@') ifTrue: [ t4 _ spec findTokens: '@'. ^ ExpressionArgMorphWithMenu new choices: t4; numExpression: (self specsWArgs at: t4 asArray ifAbsent: [t4 at: 1])]. …
CommandBlockMorph»specsWArgs
whatever default args other than the first item of the choices you want
CommandBlockMorph class»parseCommandSpec:
parseCommandSpec: t1 | t2 t3 t4 t5 t6 t7 | t2 _ OrderedCollection new. t6 _ t1. (t6 isKindOf: UTF8) ifTrue: [t6 _ String withAll: t6]. t3 _ t1 size. t4 _ 1. [t4 < t3 and: [(t6 at: t4) isSeparator]] whileTrue: [t4 _ t4 + 1]. [t4 <= t3] whileTrue: [t5 _ t6 indexOf: $% startingAt: t4. t5 > 0 ifTrue: [t5 > t4 ifTrue: [t2 addLast: (t6 copyFrom: t4 to: t5 - 1)]. t5 < t3 ifTrue: [t7 _ t5 + 1. (t6 at: t7) isLetter ifTrue: [[t7 + 1 <= t3 and: [(t6 at: t7 + 1) isDigit | (t6 at: t7 + 1) isLetter | (#($& $| $@ $$ ) includes: (t6 at: t7 + 1))]] whileTrue: [t7 _ t7 + 1]. t7 >= t3 ifTrue: [t2 addLast: (t6 copyFrom: t5 to: t3). t4 _ t3 + 1] ifFalse: [t2 addLast: (t6 copyFrom: t5 to: t7). t4 _ t7 + 1]] ifFalse: [t2 addLast: '%'. t4 _ t5 + 1]] ifFalse: [t2 addLast: '%'. t4 _ t5 + 2]] ifFalse: [t2 addLast: (t6 copyFrom: t4 to: t3). t4 _ t3 + 1]]. t2 _ t2 select: [:t8 | t8 ~= ' ']. ^ t2 asArray collect: [:t8 | t8 withBlanksTrimmed]
sorry if that was a little long, but I can't just post without context
Most credit goes to Dream
Last edited by Interest (2013-02-18 13:46:44)
Offline
I like the test version... but i think you should make the 'arrow keys move with speed ()' and 'wasd move with speed ()' my dropdown version, it would not take up as much space and fancy! ( ) move the operators that have something to do with lists (the 'split [] using [] into [list v]' and 'join [list v] using [,]') into the list section. Also you might want to organize the blocks so they are by blocks they are like. Plus you forgot to and me into the team now that i 'officially' joined.
Offline
I know, dropdown movement will be in 1.1.
Offline
Hey! Does someone know how to remove that:
Offline
FanMarioPL wrote:
We need something unique to our mod.
I have an idea!
We can have a tab next to Scripts/Costumes/Sounds that's called "Movies". You would be able to record a movie through a webcam or import it from your computer. Then it would be added to a list of movies, like the way Sounds are listed in that tab.
Then, there would be a Movie tab, and these blocks would be used to run the movies:
play movie [movie v] pause movie [movie v] resume movie [movie v] close movie [movie v]
import movie add recorded movie (last added movie) (length of movie [movie v]) // [movie v] is dropdown show webcam image // would be like "add recorded movie", but wouldn't save it hide webcam imageHmm, what color would the blocks be?... a bronze color?
Last edited by powerpoint56 (2013-02-18 11:25:13)
Offline
Okay, but it`s very hard to code.
Offline
FanMarioPL wrote:
Okay, but it`s very hard to code.
Yeah, I thought so.
But it may be worth trying anyway... We could get even more people to help, and they could submit code pieces. Then you can piece them all together, or something like that.
Last edited by powerpoint56 (2013-02-18 11:44:33)
Offline
However, there will be file support in 1.1. To release new version, i need only 3 things that i can`t do:
- remove the
- compiler is almost done, but the compiled game runs branch, and i want to make it open game
- multi-line field(for file category)
Can someone help me?
btw. here`s a 1.1 screenie:
Last edited by FanMarioPL (2013-02-18 11:54:28)
Offline
FanMarioPL wrote:
However, there will be file support in 1.1. To release new version, i need only 3 things that i can`t do:
- remove the http://i47.tinypic.com/314y102.png
- compiler is almost done, but the compiled game runs branch, and i want to make it open game
- multi-line field(for file category)
Can someone help me?
for #1, goto Scratch-Blocks >> CommandBlockMorph >> private >> canBecomeWatcher. Add #yourSelector:GoesHere: before ") includes: selector)". Accept. (from your local block library)
Offline
FanMarioPL wrote:
However, there will be file support in 1.1. To release new version, i need only 3 things that i can`t do:
- remove the http://i47.tinypic.com/314y102.png
- compiler is almost done, but the compiled game runs branch, and i want to make it open game
- multi-line field(for file category)
Can someone help me?
btw. here`s a 1.1 screenie:
http://i45.tinypic.com/15mi4nn.png
Below pic: Cool!
About the compiler: Do you have the code to open the project with Branch.exe running Branch.image, or just to open Branch.exe running Branch.image? If the first is true, I don't know how to help.
Last edited by powerpoint56 (2013-02-18 12:03:33)
Offline
SFollis wrote:
FanMarioPL wrote:
However, there will be file support in 1.1. To release new version, i need only 3 things that i can`t do:
- remove the http://i47.tinypic.com/314y102.png
- compiler is almost done, but the compiled game runs branch, and i want to make it open game
- multi-line field(for file category)
Can someone help me?for #1, goto Scratch-Blocks >> CommandBlockMorph >> private >> canBecomeWatcher. Add #yourSelector:GoesHere: before ") includes: selector)". Accept. (from your local block library)
Thanks dude!
@powerpoint56: the first one ;/
Offline
FanMarioPL wrote:
SFollis wrote:
FanMarioPL wrote:
However, there will be file support in 1.1. To release new version, i need only 3 things that i can`t do:
- remove the http://i47.tinypic.com/314y102.png
- compiler is almost done, but the compiled game runs branch, and i want to make it open game
- multi-line field(for file category)
Can someone help me?for #1, goto Scratch-Blocks >> CommandBlockMorph >> private >> canBecomeWatcher. Add #yourSelector:GoesHere: before ") includes: selector)". Accept. (from your local block library)
Thanks dude!
@powerpoint56: the first one ;/
rats. Maybe you could search around and ask someone who has made a compiler, like the creators of BYOB or Bingo...?
Offline
I am using the Insanity compiler
btw. one more new feature - fake 3d!
Offline
FanMarioPL wrote:
I am using the Insanity compiler
btw. one more new feature - fake 3d!
http://i50.tinypic.com/23vkm75.png
cool!
Offline
Branch 1.1 will be released tomorrow, i hope someone will help me with compiler...
Offline
Sorry I haven't posted but I've ben on holiday. Anyway, I've had an idea like byob's script variables: script lists. These could be useful if someone wanted to store something with more than one value (such as a vector, which has direction and magnitude) and edit it easily. If this and script variables could be implemented I think that people would find it useful.
Offline
FanMarioPL wrote:
Branch 1.1 will be released tomorrow, i hope someone will help me with compiler...
Do all of your files contain the files belonging to Branch? If not it wouldn't work. But also, I think that the Insanity2EXE code would only work with the specific Insanity files, not the Branch ones.
Offline
powerpoint: it contains all branch files and game files, but when i launch the compiled game, Branch opens and i want make game open .
Offline
powerpoint56 wrote:
FanMarioPL wrote:
Branch 1.1 will be released tomorrow, i hope someone will help me with compiler...
Do all of your files contain the files belonging to Branch? If not it wouldn't work. But also, I think that the Insanity2EXE code would only work with the specific Insanity files, not the Branch ones.
It would be much easier if you just used .sb files instead of .branch Then you could use Scratch2exe instead.
Offline
FanMarioPL wrote:
powerpoint: it contains all branch files and game files, but when i launch the compiled game, Branch opens and i want make game open.
Maybe the Insanity2EXE program doesn't recognize the .branch file format, so it just opens Branch and nothing else. I mean, Ins2EXE is pointed originally to .ins files, not .branch.
Offline
Another strange thing. If I make and save a project in Branch, the file shows as "Project Name".sb.branch, not "Project Name".branch. Could that also be part of the problem?
Last edited by powerpoint56 (2013-02-18 13:43:21)
Offline
SFollis wrote:
FanMarioPL wrote:
I am using the Insanity compiler
btw. one more new feature - fake 3d!
http://i50.tinypic.com/23vkm75.pngIs that what you programmed or want it to do?
think so. Should be...
Last edited by powerpoint56 (2013-02-18 13:44:24)
Offline