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

#1 2009-06-12 05:19:12

halogameaccount
Scratcher
Registered: 2009-06-11
Posts: 61

Random Costume When Player Inactive

As the title suggests, I need to know how to change to a certain costume (a stationary costume) when no buttons (arrow keys) are being pushed (I have got that far) then after a certain time limit like say 5 seconds + it will randomly select some costumes (costumes looking around etc.) and when a button (arrow keys) are pushed it will respond instantly and go to the moving costumes which I have assigned to the arrow keys. If anyone can show me how to do this I would be very grateful, thanks.


http://img200.imageshack.us/img200/9692/signatureatx.png

Offline

 

#2 2009-06-12 05:46:00

MyRedNeptune
Community Moderator
Registered: 2007-05-07
Posts: 1000+

Re: Random Costume When Player Inactive

Hmmmmm maybe you should do it as two seperate scripts:

[blocks]<when green flag clicked>
<forever if><<  <not> <key[ arrow key ]pressed?> >>
<wait( 5 )secsc>
<if><<  <not> <key[ arrow key ]pressed?> >>
<switch to costume[ looking around
<end>
<end>[/blocks]

[blocks]<when[ arrow key ]key pressed>
<switch to costume[ moving[/blocks]


http://i52.tinypic.com/5es7t0.png I know what you're thinking! "Neptune! Get rid of those filthy advertisements and give us back the Zarathustra siggy, you horrible person!" Well, don't worry about it, the Zara siggy will be back soon, new and improved! ^^ Meanwhile, just do what the sig tells you to. >.>

Offline

 

Board footer