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

#1 2012-05-04 14:44:06

Yagman5000
New Scratcher
Registered: 2012-05-02
Posts: 10

Sensing variables not working?

Hi all,

So pretty much what the title says. I have a shooting game, and the sensing isnt working very well. I have it set so when "x" color touches "x" color "outcome" happens. So it takes off "health" from the "health" variable, which is working. But to equivalently record that so the script knows when to end, I made a list. So it adds "x" amount of "things" to the list, depending on the damage. Well that isn't really working out well..  hmm  I cant find out how to do more than 1 at a time, so I did a "repeat 20" to do 20 damage. Not really working, it's just sticking in 1. Kinda hard to explain, i know. I'll post a couple shots of the script, as well as a download link for the game if u have time to check it out and see if u can help. Any suggestions appreciated  smile

http://gyazo.com/e48d4f1aebda4964f239c6a1570ea1cd

^screenshot

http://www.mediafire.com/?8v2sp4buc66g0x0

^game download link

Thanks in advance for all your help  smile

Offline

 

#2 2012-05-04 15:13:43

itsmomito
Scratcher
Registered: 2008-03-28
Posts: 100+

Re: Sensing variables not working?

Yagman5000 wrote:

Hi all,

So pretty much what the title says. I have a shooting game, and the sensing isnt working very well. I have it set so when "x" color touches "x" color "outcome" happens. So it takes off "health" from the "health" variable, which is working. But to equivalently record that so the script knows when to end, I made a list. So it adds "x" amount of "things" to the list, depending on the damage. Well that isn't really working out well..  hmm  I cant find out how to do more than 1 at a time, so I did a "repeat 20" to do 20 damage. Not really working, it's just sticking in 1. Kinda hard to explain, i know. I'll post a couple shots of the script, as well as a download link for the game if u have time to check it out and see if u can help. Any suggestions appreciated  smile

http://gyazo.com/e48d4f1aebda4964f239c6a1570ea1cd

^screenshot

http://www.mediafire.com/?8v2sp4buc66g0x0

^game download link

Thanks in advance for all your help  smile

Hi there! I looked at the scripts, what exactly are you trying to fix? I don't really get it.

Offline

 

#3 2012-05-04 17:19:35

Yagman5000
New Scratcher
Registered: 2012-05-02
Posts: 10

Re: Sensing variables not working?

itsmomito wrote:

Yagman5000 wrote:

Hi all,

So pretty much what the title says. I have a shooting game, and the sensing isnt working very well. I have it set so when "x" color touches "x" color "outcome" happens. So it takes off "health" from the "health" variable, which is working. But to equivalently record that so the script knows when to end, I made a list. So it adds "x" amount of "things" to the list, depending on the damage. Well that isn't really working out well..  hmm  I cant find out how to do more than 1 at a time, so I did a "repeat 20" to do 20 damage. Not really working, it's just sticking in 1. Kinda hard to explain, i know. I'll post a couple shots of the script, as well as a download link for the game if u have time to check it out and see if u can help. Any suggestions appreciated  smile

http://gyazo.com/e48d4f1aebda4964f239c6a1570ea1cd

^screenshot

http://www.mediafire.com/?8v2sp4buc66g0x0

^game download link

Thanks in advance for all your help  smile

Hi there! I looked at the scripts, what exactly are you trying to fix? I don't really get it.

Yea, I know what you mean. It SHOULD work. It's just that it's not, and Im really not sure why.. does it work for you? Like instead of adding 20 of "thing" to the list its adding 1, even though it should be adding 20.. at least for me.

Offline

 

#4 2012-05-04 17:58:41

itsmomito
Scratcher
Registered: 2008-03-28
Posts: 100+

Re: Sensing variables not working?

Yagman5000 wrote:

itsmomito wrote:

Yagman5000 wrote:

Hi all,

So pretty much what the title says. I have a shooting game, and the sensing isnt working very well. I have it set so when "x" color touches "x" color "outcome" happens. So it takes off "health" from the "health" variable, which is working. But to equivalently record that so the script knows when to end, I made a list. So it adds "x" amount of "things" to the list, depending on the damage. Well that isn't really working out well..  hmm  I cant find out how to do more than 1 at a time, so I did a "repeat 20" to do 20 damage. Not really working, it's just sticking in 1. Kinda hard to explain, i know. I'll post a couple shots of the script, as well as a download link for the game if u have time to check it out and see if u can help. Any suggestions appreciated  smile

http://gyazo.com/e48d4f1aebda4964f239c6a1570ea1cd

^screenshot

http://www.mediafire.com/?8v2sp4buc66g0x0

^game download link

Thanks in advance for all your help  smile

Hi there! I looked at the scripts, what exactly are you trying to fix? I don't really get it.

Yea, I know what you mean. It SHOULD work. It's just that it's not, and Im really not sure why.. does it work for you? Like instead of adding 20 of "thing" to the list its adding 1, even though it should be adding 20.. at least for me.

Hmm, it did that when I looked at it. Weird

Offline

 

Board footer