shifted wrote:
Thanks, that's definitely better than what I have going on. Just to clarify, will that really keep the arrow from pointing at the mouse cursor while in flight? (My current model will turn sideways if I move the mouse.)
Also, I was imagining a system that fired one arrow per click, not that you have to hold down LMB, but hey. Like I said it's way better than what I have.
Thanks
Yes, the arrow would stay pointing at it's target while in flight and not at your mouse. And since you want one shot per click, here's a somewhat-altered script that you could always use:
when gf clicked forever go to [Main Sprite v] point towards [Mouse Pointer v] if (mouse down?) repeat until <(touching [bad guy v]?) or (touching [edge v]?)> move (20) steps end wait until <not (mouse down?)>//This is what causes the 1 shot per click. end
Offline
Offline
Hey Guys
I had the same problem as john17312 which is on the first page and I tried to add the scripts which are supose to solve the problem but I can seem to find the:
orange change/set y velocity by block
blue change y block by
the orange y velocity block
Help needed. Thanks.
Offline
Its suppose to say "but I can't seem to find the:"
Offline
LeopardDude wrote:
Hey Guys
I had the same problem as john17312 which is on the first page and I tried to add the scripts which are supose to solve the problem but I can't seem to find the:
orange change/set y velocity by block
blue change y block by
the orange y velocity block
Help needed. Thanks.
Well, the blue [change y by] block is under Motion, and the others you should find by going to Variables, then to "Make a Variable", then typing in "Y Velocity", and finally hitting "Okay"
I hope that this helps!
With regards,
ErnieParke
Last edited by ErnieParke (2013-03-28 18:29:05)
Offline
Thanks so much ErnieParke. I am new to Scratch. I tweaked the numbers and got it to half work but now face another problem. I don't know how to stop my sprites from going through walls. Could you help me? Thanks
Offline
Hi, I've been on Scratch for over 3 years now and I was wondering if I could become a member. I'm not a master programmer, but I could definitely be of help, especially to the New Scratchers. Thanks
Offline
OMG! Pico hit Scripts Workshop! Nooooooooooooooooo!
Offline
Sorry.Looks like Pico is taking over the workshop.
Offline
7734f, shivadas and xlk added.
Offline
Hey guys, I will try to ask help in this topic:
7734f wrote:
Jeese wrote:
Sorry for your effort.
There you go:
http://oi47.tinypic.com/s30t3k.jpg
hope you can see it now.Cool scripts, but I don't know how you got those. Maybe go to Advanced Topics, and they can help. It's in the bottom section of the forums.
Offline
Hi,
Hoping someone may be able to point me in the right direction.
I have a .txt file with a string of numbers in, I want to create a script that will read through the string and then move onto the next line.
I have been able to read and extract the data from the string ok, but I can not seem to be able to move to the next line in the .txt file
Any help appreciated
Offline
B.u.m.p.
Pixie97, I am sorry, but I do not know exactly what you're asking.
Regards,
CAA14
Offline
pixie97 wrote:
Hi,
Hoping someone may be able to point me in the right direction.
I have a .txt file with a string of numbers in, I want to create a script that will read through the string and then move onto the next line.
I have been able to read and extract the data from the string ok, but I can not seem to be able to move to the next line in the .txt file
Any help appreciated
Ohhh... This problem sounds interesting. How exatcly are you reading the .txt file? Are you saving it in a variable and then reading it?
With regards,
ErnieParke
Offline
ErnieParke wrote:
pixie97 wrote:
Hi,
Hoping someone may be able to point me in the right direction.
I have a .txt file with a string of numbers in, I want to create a script that will read through the string and then move onto the next line.
I have been able to read and extract the data from the string ok, but I can not seem to be able to move to the next line in the .txt file
Any help appreciatedOhhh... This problem sounds interesting. How exatcly are you reading the .txt file? Are you saving it in a variable and then reading it?
With regards,
ErnieParke
One idea is that you could copy each line into a list and then say the list...
Regards,
CAA14
Offline
pixie97 wrote:
Hi,
Hoping someone may be able to point me in the right direction.
I have a .txt file with a string of numbers in, I want to create a script that will read through the string and then move onto the next line.
I have been able to read and extract the data from the string ok, but I can not seem to be able to move to the next line in the .txt file
Any help appreciated
The only way I could think of would be to get each digit of the .txt file to be a variable and have a list of these variables for each line.
Offline
I am making a game with lives so I made a varibal called lives and made it so that when the green flag is clicked they set to 3 and if you touch the enemy you lose a life. But I can't figure out how to make it game over when you have lost all 3 lives. Does anyone know how to?
Offline
wartr
oin1 wrote:I am making a game with lives so I made a varibal called lives and made it so that when the green flag is clicked they set to 3 and if you touch the enemy you lose a life. But I can't figure out how to make it game over when you have lost all 3 lives. Does anyone know how to?
when gf clicked forever if <(lives)=(0)> //or lives is smaller than 1 broadcast [game over v] end endUse the game over broadcast to make the game over stuff happen.
Last edited by JH1010 (2013-04-06 04:47:01)
Offline
JH1010 wrote:
wartr
oin1 wrote:I am making a game with lives so I made a varibal called lives and made it so that when the green flag is clicked they set to 3 and if you touch the enemy you lose a life. But I can't figure out how to make it game over when you have lost all 3 lives. Does anyone know how to?
when gf clicked forever if <(lives)=(0)> //or lives is smaller than 1 broadcast [game over v] end endUse the game over broadcast to make the game over stuff happen.
Or you could use:
when gf clicked forever if <(lives) < (1)> broadcast [game over v] endWith regards,
Offline
Wanna know how to make a wall jumping game? Well it's right here!
when gf clicked set [R-vel v] to [0] set [L-vel v] to [0] forever if <key [right arrow v] pressed?> change [R-vel v] by (1) end if <key [left arrow v] pressed?> change [L-vel v] by (1) end if <key [up arrow v] pressed?> if <color [#0000FF] is touching [#000000]?> set [Y-vel v] to [20] broadcast [Jump v] end end if <not <color [#0000FF] is touching [#000000]?>> change y by (-5) end if <color [#FF0000] is touching [#000000]?> set [Y-vel v] to [0] set [R-vel v] to [0] if <not < <color [#0000FF] is touching [#000000]?> or <key [up arrow v] pressed?> > > wait (0.5) secs if <key [up arrow v] pressed?> set [Y-vel v] to [20] broadcast [Jump v] end set [L-vel v] to [10] end end if <color [#00FF00] is touching [#000000]?> set [Y-vel v] to [0] set [R-vel v] to [0] if <not < <color [#0000FF] is touching [#000000]?> or <key [up arrow v] pressed?> > > wait (0.5) secs if <key [up arrow v] pressed?> set [Y-vel v] to [20] broadcast [Jump v] end set [R-vel v] to [10] end end change x by (R-vel) change x by ((0) - (L-vel)) change [R-vel v] by ((R-vel) * (-0.2)) change [L-vel v] by ((L-vel) * (-0.2)) when I receive [Jump v] repeat (10) if <color [#FF0000] is touching [#000000]?> set [Y-vel v] to [0] stop script end change y by (Y-vel) change [Y-vel v] by (-1) end set [Y-vel v] to [0]
Offline
Offline
Offline