This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-12-13 13:34:28

Happypieman
Scratcher
Registered: 2010-09-28
Posts: 100+

'Only if'

I'm thinking of a block which will encase a script, like a forever block, but with the little tab at the bottom. The encased  script will only peform its function if such and such is the same ALL THE TIME. Think about it!  big_smile


2012--The biggest troll ever.

Offline

 

#2 2011-12-13 14:28:08

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: 'Only if'

Happypieman wrote:

I'm thinking of a block which will encase a script, like a forever block, but with the little tab at the bottom. The encased  script will only peform its function if such and such is the same ALL THE TIME. Think about it!  big_smile

I have thought of this before, but I found it is impossible for the block to tell the past and feauter. Not even a human can tell that!


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#3 2011-12-14 00:47:30

Happypieman
Scratcher
Registered: 2010-09-28
Posts: 100+

Re: 'Only if'

Pecola1 wrote:

Happypieman wrote:

I'm thinking of a block which will encase a script, like a forever block, but with the little tab at the bottom. The encased  script will only peform its function if such and such is the same ALL THE TIME. Think about it!  big_smile

I have thought of this before, but I found it is impossible for the block to tell the past and feauter. Not even a human can tell that!

I don't know if i have explained it clearly!  big_smile  What i mean is that every time it goes to perform a specific action, it will check to see if such and such is still what it should be. If it is, it will perform the action and move onto the next block. If the value has changed, it will terminate the action. I think that when this occurs, all of the previous actions will have happened already (i may be getting a little confusing now but...)

There, now i've had my rant!  smile


2012--The biggest troll ever.

Offline

 

#4 2011-12-14 09:05:15

Vista4563
Scratcher
Registered: 2009-07-20
Posts: 500+

Re: 'Only if'

You can get across this by using the Forever If block and broadcasting, I'm pretty sure...


Team Vista | TBG Moderator | #stopKony #Kony2012 | http://ls.gd/icgrin http://is.gd/78GWUZ
http://is.gd/jEY5Ihttp://is.gd/Vl19zR http://i.imgur.com/L4HIs.png

Offline

 

#5 2011-12-14 09:35:05

PaperMario123
Scratcher
Registered: 2011-11-25
Posts: 500+

Re: 'Only if'

Yep, the regular Forever block, a little broadcasting, and maybe even the If have already made this possible.


http://i.picasion.com/pic46/52268c4a041cced4c8ed97cc7468f869.gif

Offline

 

#6 2011-12-14 14:05:52

Happypieman
Scratcher
Registered: 2010-09-28
Posts: 100+

Re: 'Only if'

PaperMario123 wrote:

Yep, the regular Forever block, a little broadcasting, and maybe even the If have already made this possible.

Yeah, but wouldn't it be a little more convenient, and aso reduce the size of the file if the sprite is doing a lot of actions that need checking.


2012--The biggest troll ever.

Offline

 

#7 2011-12-14 14:14:21

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: 'Only if'

Happypieman wrote:

Pecola1 wrote:

Happypieman wrote:

I'm thinking of a block which will encase a script, like a forever block, but with the little tab at the bottom. The encased  script will only peform its function if such and such is the same ALL THE TIME. Think about it!  big_smile

I have thought of this before, but I found it is impossible for the block to tell the past and feauter. Not even a human can tell that!

I don't know if i have explained it clearly!  big_smile  What i mean is that every time it goes to perform a specific action, it will check to see if such and such is still what it should be. If it is, it will perform the action and move onto the next block. If the value has changed, it will terminate the action. I think that when this occurs, all of the previous actions will have happened already (i may be getting a little confusing now but...)

There, now i've had my rant!  smile

Ooooohhh... so every single block it checks.  roll  Only way to do that now is by putting a bunch of if's around every block and then put that into a forever if.

This could be helpful.

However it is usually necessarily to complete the process before stopping.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#8 2011-12-14 15:32:56

iTweak0r
Scratcher
Registered: 2011-07-30
Posts: 100+

Re: 'Only if'

This is

<forever if> Condition
<end>


Make it in Scratch! because it's cooler when it's made in scratch
http://i.imgur.com/D4iqPHR.png

Offline

 

#9 2011-12-16 15:48:42

soniku3
Scratcher
Registered: 2011-12-08
Posts: 1000+

Re: 'Only if'

Yes that is cool!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


internet's all about cats today.

Offline

 

Board footer