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

#576 2013-04-29 19:13:56

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

jn3579 wrote:

second question of the day for me.
how do i make the time not start and stay at 0 but when it get a broadcast it starts and after 4 seconds i would want it to stop at 0 again.

i tried using a variable but i did somthing wrong with it and it glitches out most of the time. you can show me it with a variable but pleez explain it thoroughly.

To be honest, i do not totally know what you're asking, but here's my best guess:


when i receive [start timer v]
repeat until < (game over?) = [yes] >
reset timer
wait until < (timer) = [4] >
reset timer
end
Is this what you're looking for?

Regards,

CAA14

Offline

 

#577 2013-04-29 19:22:34

jn3579
New Scratcher
Registered: 2012-02-27
Posts: 20

Re: Scripts Workshop: Give and get help with scripts

no thats not  sad
let me give a example:
you are playing a strategy game
you play whatever number amount of mini-games then there is this one that requiers the timer. the timer goes up to 4 seconds, broadcast whatever then goes back to 0 and stays at 0 for the rest of the game.

i would like it so before that mini-game that requires the timer gets played:
*that the timer is ether hidden or at 0.
* i dont know if there is a way to make the timer count down but if there is that will be great.

Offline

 

#578 2013-04-29 19:36:35

jn3579
New Scratcher
Registered: 2012-02-27
Posts: 20

Re: Scripts Workshop: Give and get help with scripts

pleez help
this is due the 30th for a school project

Offline

 

#579 2013-04-29 19:43:04

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

jn3579 wrote:

no thats not  sad
let me give a example:
you are playing a strategy game
you play whatever number amount of mini-games then there is this one that requiers the timer. the timer goes up to 4 seconds, broadcast whatever then goes back to 0 and stays at 0 for the rest of the game.

i would like it so before that mini-game that requires the timer gets played:
*that the timer is ether hidden or at 0.
* i dont know if there is a way to make the timer count down but if there is that will be great.

Well, just to coun to 4 and then broadcast something is very easy, here's the script:


when i receive [minigame timer start v]
wait (4) secs
broadcast [whatever v]

Is that more like it?

Regards,

CAA14

Last edited by CAA14 (2013-04-29 19:44:32)

Offline

 

#580 2013-04-29 20:04:48

jn3579
New Scratcher
Registered: 2012-02-27
Posts: 20

Re: Scripts Workshop: Give and get help with scripts

WOW
why didnt i think of that. i was getting all up in the operators, senses and variables then i see this.
WOW it blows me away that i didnt think of that.
thx CAA14
smile

Offline

 

#581 2013-04-29 20:46:09

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

jn3579 wrote:

WOW
why didnt i think of that. i was getting all up in the operators, senses and variables then i see this.
WOW it blows me away that i didnt think of that.
thx CAA14
smile

No problem, trust me, i have done that plenty of times before, if you think about something to hard, you'll over complicate things.  wink

Also, good luck on your project.  smile


Regards,

CAA14

Offline

 

#582 2013-05-01 01:46:36

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

qwerts9000 wrote:

ErnieParke wrote:

qwerts9000 wrote:

Is this a script help thing?

Yes, yes it is.

With regards,

ErnieParke

Okay, so I have ideas for a sonic game, but cant find a good engine or tutorial or ANYTHING. Any ideas?

The game will be be based on the newgrounds game "Ultimate flash sonic"

Firstly, you'll need to move your character. Left and right is easy.

forever if <key [left arrow v] pressed?>
change x by (-2) // The lower this number, the faster the character will move.
end
forever if <key [right arrow v] pressed?>
change x by (2) // The higher this number, the faster the character will move.
end
Gravity (moving up and down) is more complicated, and nearly impossible to get perfect on Scratch. My advice to you on that would be to check the wiki and, if still in doubt, download other peoples' platformers and look at their scripts.

Last edited by JH1010 (2013-05-01 02:17:21)

Offline

 

#583 2013-05-01 23:21:46

qwerts9000
Scratcher
Registered: 2011-02-21
Posts: 100+

Re: Scripts Workshop: Give and get help with scripts

JH1010 wrote:

qwerts9000 wrote:

ErnieParke wrote:


Yes, yes it is.

With regards,

ErnieParke

Okay, so I have ideas for a sonic game, but cant find a good engine or tutorial or ANYTHING. Any ideas?

The game will be be based on the newgrounds game "Ultimate flash sonic"

Firstly, you'll need to move your character. Left and right is easy.

forever if <key [left arrow v] pressed?>
change x by (-2) // The lower this number, the faster the character will move.
end
forever if <key [right arrow v] pressed?>
change x by (2) // The higher this number, the faster the character will move.
end
Gravity (moving up and down) is more complicated, and nearly impossible to get perfect on Scratch. My advice to you on that would be to check the wiki and, if still in doubt, download other peoples' platformers and look at their scripts.

More advanced, please. I'm not that dumb.

Offline

 

#584 2013-05-02 15:26:45

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

qwerts9000 wrote:

JH1010 wrote:

qwerts9000 wrote:

Okay, so I have ideas for a sonic game, but cant find a good engine or tutorial or ANYTHING. Any ideas?

The game will be be based on the newgrounds game "Ultimate flash sonic"

Firstly, you'll need to move your character. Left and right is easy.

forever if <key [left arrow v] pressed?>
change x by (-2) // The lower this number, the faster the character will move.
end
forever if <key [right arrow v] pressed?>
change x by (2) // The higher this number, the faster the character will move.
end
Gravity (moving up and down) is more complicated, and nearly impossible to get perfect on Scratch. My advice to you on that would be to check the wiki and, if still in doubt, download other peoples' platformers and look at their scripts.

More advanced, please. I'm not that dumb.

Okay. So you want velocities, correct? Then, you're going to need two variables: (X Velocity) and (Y Velocity)

Now, before I move on, do you have any character sensors in your game? If yes, could you tell me what it can sense?

To JH1010:
You do know that you can't put a [forever if] onto a [forever if] ?

With regards,

ErnieParke

Last edited by ErnieParke (2013-05-02 15:27:06)


http://i46.tinypic.com/35ismmc.png

Offline

 

#585 2013-05-03 01:30:27

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

ErnieParke wrote:

To JH1010:
You do know that you can't put a [forever if] onto a [forever if] ?

With regards,

ErnieParke

forever 
if <key [left arrow v] pressed?>
change x by (-2) // The lower this number, the faster the character will move.
end
if <key [right arrow v] pressed?>
change x by (2) // The higher this number, the faster the character will move.
end
end
is what I meant.

Offline

 

#586 2013-05-03 19:52:55

Braeden5454
New Scratcher
Registered: 2013-04-07
Posts: 8

Re: Scripts Workshop: Give and get help with scripts

i would like to join
  could you help me with my game and tell me the bugs and how to fix it   http://scratch.mit.edu/projects/Braeden5454/3242350

Offline

 

#587 2013-05-03 20:30:02

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

Braeden5454 wrote:

i would like to join
  could you help me with my game and tell me the bugs and how to fix it   http://scratch.mit.edu/projects/Braeden5454/3242350

Well of course you can join! Welcome to the Scripts Workshop!

Anyway, I have to go now, so I can't really help with your problem, though someone else will be with you soon.  wink

With regards,

ErnieParke


http://i46.tinypic.com/35ismmc.png

Offline

 

#588 2013-05-03 21:24:56

qwerts9000
Scratcher
Registered: 2011-02-21
Posts: 100+

Re: Scripts Workshop: Give and get help with scripts

thanks

Offline

 

#589 2013-05-04 00:13:30

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

qwerts9000 wrote:

thanks

I actually am gong to release a platformer engine soon, once I perfect it. It will have velocity, collision, and some "insert what you want" sensors.  wink

Regards,

CAA14

Offline

 

#590 2013-05-04 01:43:47

lynetteinEdTech
New Scratcher
Registered: 2013-05-03
Posts: 2

Re: Scripts Workshop: Give and get help with scripts

I posted this already in help, but thought it might grab someone's attention here...so here goes

I am new to Scratch so bear with me.

I am trying to create a two level quiz. The first level contains three questions, each asking the player to select the correct name of the molecular structure being presented. Each structure is a separate sprite. This part I am okay with, though I think my coding could be more efficient. But it works, so I'm good for now.

If the player makes it past the third structure, I want the background to change and say a little something about this being Level 2 and the player can earn double the points. Once the designated object is touched, I want the background to change again (different from the first level). I can't seem to get this to happen.

In total this short quiz will have 5 structures. I want the player to be able to bring up a new structure by clicking a button. I don't think my coding here is as efficient as it should be as I have three separate sprites for the same button in order to accomplish this task.

Any help or insight is greatly appreciated.

Offline

 

#591 2013-05-04 07:57:47

dracae
New Scratcher
Registered: 2013-04-05
Posts: 42

Re: Scripts Workshop: Give and get help with scripts

Okay, so have a variable "Level".
Every time the correct answer is pressed, [change "Level" by 1].
But make sure that Level restarts, so [set Level to 0] [When Green Flag clicked].
Now, we can use this to help you.
Have an [forever if] on the background, and in the pointy slot,
put the <equal> operator, with "Level" in one slot, and (3) (I think) in the other slot.
In the forever-if, insert [set costume to "Double points"].

Offline

 

#592 2013-05-04 08:01:40

dracae
New Scratcher
Registered: 2013-04-05
Posts: 42

Re: Scripts Workshop: Give and get help with scripts

Oh noes, 180 second limit! Any ways, hope my advice helps!  big_smile

Offline

 

#593 2013-05-04 08:41:38

Ernali
New Scratcher
Registered: 2013-05-03
Posts: 8

Re: Scripts Workshop: Give and get help with scripts

Or may I join? Do not underestimate me though. By the way, check out my new game  tongue



http://scratch.mit.edu/projects/Ernali/3306089

Offline

 

#594 2013-05-04 08:51:39

dracae
New Scratcher
Registered: 2013-04-05
Posts: 42

Re: Scripts Workshop: Give and get help with scripts

Ernali, that's a pretty nice game!  big_smile
The only thing I would say (It's really picky though...  neutral  ) is that the coins should scroll too.
But it's still an awesome game!

Offline

 

#595 2013-05-04 09:12:37

Ernali
New Scratcher
Registered: 2013-05-03
Posts: 8

Re: Scripts Workshop: Give and get help with scripts

dracae wrote:

Ernali, that's a pretty nice game!  big_smile
The only thing I would say (It's really picky though...  neutral  ) is that the coins should scroll too.
But it's still an awesome game!

Yep, i know that  tongue  360 degree turns are a little difficult, but anyways... (i will do it, I was thinking of that too)  tongue

Offline

 

#596 2013-05-04 13:43:45

joshuaho
Scratcher
Registered: 2012-08-20
Posts: 100+

Re: Scripts Workshop: Give and get help with scripts

Ernali wrote:

Or may I join? Do not underestimate me though. By the way, check out my new game  tongue



http://scratch.mit.edu/projects/Ernali/3306089

You could just put the link in your signature.


Did you know that you can go to space and see Mars by clicking here?

Offline

 

Board footer