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

#1 2012-12-01 09:48:19

Bidbrain007
New Scratcher
Registered: 2012-11-03
Posts: 8

I need a certain script .Please Help!

In need a working script that goes something like this :


when gf clicked
forever if <([x position] of [sprite 1]) = <any number between 40 and 60>>
 point in direction ( 90 )
 switch to costume (3)
 move (0.5) steps

Offline

 

#2 2012-12-01 17:33:24

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

Re: I need a certain script .Please Help!

First of all, this belongs in Help with Scripts. I reported it to be moved for you.

Second of all, what's wrong with that one? Or do you need help with the <any number between 40 and 60>? If so, here:

when gf clicked 
forever
if <<([x position v] of [sprite 1 v]) > (40)>and<([x position v] of [sprite 1 v]) < (60)>>
point in direction (90 v)
switch to costume <(0)+(3)> //if you're trying to get it by #. you could also call it by name
move (0.5) steps //don't you want it to be 1? 0.5 steps isn't even 1 pixel.
end

Last edited by TorbyFork234 (2012-12-01 17:33:40)

Offline

 

#3 2013-03-16 15:46:20

Bidbrain007
New Scratcher
Registered: 2012-11-03
Posts: 8

Re: I need a certain script .Please Help!

Wow i feel stupid!  big_smile  Thank you. 0.5 steps was just an example:I didn't want to put in the variables and operators.

Offline

 

Board footer