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

#1 2012-03-23 20:00:40

ScratchOS
Scratcher
Registered: 2012-03-20
Posts: 53

varible changed by (x) NEW BLOCK

varible changed by (1)
variblea changed by (-1)
variblae changed by (
+
variable changed by (-)
This would be a booleen block meaning it would insert into 'if' blocks. It detects if a variable has been changed by a number or has gone up or down.

Offline

 

#2 2012-03-23 20:03:31

trinary
Scratcher
Registered: 2012-01-29
Posts: 1000+

Re: varible changed by (x) NEW BLOCK

Could you explain this in more detail?

How would it detect whether a variable has been changed, since once changed a variable holds that value and no other?


http://trinary.tk/images/signature_.php

Offline

 

#3 2012-03-23 20:54:45

Haiming
Scratcher
Registered: 2011-08-20
Posts: 1000+

Re: varible changed by (x) NEW BLOCK

I don't get it.

Offline

 

#4 2012-03-23 21:06:07

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: varible changed by (x) NEW BLOCK

trinary wrote:

Could you explain this in more detail?

How would it detect whether a variable has been changed, since once changed a variable holds that value and no other?

^This.

It's impossible, is the simple answer.


Why

Offline

 

#5 2012-03-23 23:13:15

zippynk
Scratcher
Registered: 2011-07-23
Posts: 500+

Re: varible changed by (x) NEW BLOCK

trinary wrote:

Could you explain this in more detail?

How would it detect whether a variable has been changed, since once changed a variable holds that value and no other?

It could check if it's changed since the last time it's checked.

Or there could be a "When _______ changes" hat block.

Last edited by zippynk (2012-03-23 23:13:29)


https://dl.dropbox.com/u/60598636/trifocal_interlude_soundcloud_button.png

Offline

 

#6 2012-03-24 00:29:56

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: varible changed by (x) NEW BLOCK

ScratchOS wrote:

varible changed by (1)
variblea changed by (-1)
variblae changed by (
+
variable changed by (-)
This would be a booleen block meaning it would insert into 'if' blocks. It detects if a variable has been changed by a number or has gone up or down.

There is a workaround if I understand correctly on what you want
You can go like this

when gf clicked
set [variable v] to [insert number here]
set [variable saver v] to <variable> //the one above
wait until <you want to check>
if <<variable saver>=<variable>>
do scripts here
else
do scripts here
end
I think that's what you need, it wasn't really explained enough for what you want...

Offline

 

#7 2012-03-24 02:43:49

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: varible changed by (x) NEW BLOCK

well there could be a block

 <[variable v] changes in next () secs> 


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#8 2012-03-25 09:43:00

PencilFactory
Scratcher
Registered: 2011-11-11
Posts: 100+

Re: varible changed by (x) NEW BLOCK

if <[variable v] changed?>
//do something
end

Last edited by PencilFactory (2012-03-25 09:45:58)


PencilFactory is http://blocks.scratchr.org/API.php?user=PencilFactory&amp;action=onlineStatus&amp;type=text, see my computerhttp://mag.racked.eu/cimage/i9002/Achievement+get%21/Computer+crashed/mca.png

Offline

 

Board footer