Discuss Scratch

memedoggo
Scratcher
18 posts

I have an error i my game, can anyone help?

I added a secret code feature in my game, an upgrade for one of your units. so you typed in the code and it broadcasts a message, the basic sprite disappears and stops spawning, and the other starts spawning after 10 secs, but the unit won't spawn. the link to the game is here, you can remix it to veiw the script and tell me what to do. https://scratch.mit.edu/projects/201901016/#player
StealthstarTest
Scratcher
9 posts

I have an error i my game, can anyone help?

Could it be that Colossus is spelled wrong in one instance?

Don't mind me
memedoggo
Scratcher
18 posts

I have an error i my game, can anyone help?

Well Stealtstartest, that was a problem I tested many times, I kept changing it and retrying it, but it wont work. I'll double check on that. Thanks for the help, I'll put you in the credits.
cbletson
Scratcher
27 posts

I have an error i my game, can anyone help?

The problem is that the costum you have it set to is blank

The over complicator, All of my code is over complicated. I know the easy way but where's the fun in that.
CBLetson
Just for fun

when I receive [ Wake up]
repeat until <(nap)=[1]>
add (code) to (projects)
insert (unnecessary code)
wait until <not<(brain)=(fried)>>
if <(time)=[2 a.m]> then
set(nap) to [1]
end
end
wait((2)*((60)*(60))) secs
set(nap) to [0]
broadcast[Wake up]
cbletson
Scratcher
27 posts

I have an error i my game, can anyone help?

never mind i was looking at the wrong one

cbletson wrote:

The problem is that the costum you have it set to is blank
o

The over complicator, All of my code is over complicated. I know the easy way but where's the fun in that.
CBLetson
Just for fun

when I receive [ Wake up]
repeat until <(nap)=[1]>
add (code) to (projects)
insert (unnecessary code)
wait until <not<(brain)=(fried)>>
if <(time)=[2 a.m]> then
set(nap) to [1]
end
end
wait((2)*((60)*(60))) secs
set(nap) to [0]
broadcast[Wake up]
cbletson
Scratcher
27 posts

I have an error i my game, can anyone help?

Colossus hasto be capilalized or it doesn't work try doing this
when this sprite clicked
ask [enter code] and wait
forever
if <<(answer) = [Colossus]> or <(answer) = [colossus]>> then
broadcast [colossus]
end
end

The over complicator, All of my code is over complicated. I know the easy way but where's the fun in that.
CBLetson
Just for fun

when I receive [ Wake up]
repeat until <(nap)=[1]>
add (code) to (projects)
insert (unnecessary code)
wait until <not<(brain)=(fried)>>
if <(time)=[2 a.m]> then
set(nap) to [1]
end
end
wait((2)*((60)*(60))) secs
set(nap) to [0]
broadcast[Wake up]
deck26
Scratcher
1000+ posts

I have an error i my game, can anyone help?

cbletson wrote:

Colossus hasto be capilalized or it doesn't work try doing this
when this sprite clicked
ask [enter code] and wait
forever
if <<(answer) = [Colossus]> or <(answer) = [colossus]>> then
broadcast [colossus]
end
end
Won't make any difference, Scratch isn't case sensitive when comparing strings.
memedoggo
Scratcher
18 posts

I have an error i my game, can anyone help?

thanks everyone. I'll look into this. Sorry I haven't checked back in awhile. Its a secret code, so I suppose you guys can have that as your reward.
memedoggo
Scratcher
18 posts

I have an error i my game, can anyone help?

Cbleston, Thanks for your help, I tried the new script but it didn't work.
H4K
Scratcher
100+ posts

I have an error i my game, can anyone help?

memedoggo wrote:

Cbleston, Thanks for your help, I tried the new script but it didn't work.
That's because that script doesn't make any difference (Scratch isn't case sensitive)

memedoggo wrote:

I added a secret code feature in my game, an upgrade for one of your units. so you typed in the code and it broadcasts a message, the basic sprite disappears and stops spawning, and the other starts spawning after 10 secs, but the unit won't spawn. the link to the game is here, you can remix it to veiw the script and tell me what to do. https://scratch.mit.edu/projects/201901016/#player
Why there isn't any
when I receive [ v]
block when you have a
broadcast [ v]
block?

My PC specs (for bugs & glitches):
- Intel Core i9-9980XE
- 64 GB DDR4-3200
- Nvidia GeForce RTX 2080 Ti (x2)

This is a signature










Last edited by Kaj (March 16, 2880 00:00:00)



















memedoggo
Scratcher
18 posts

I have an error i my game, can anyone help?

H4K, the thing is that I have included a
when I receive [ v]

block. however, it is not in the same sprite. If you would look, you would see that in the colossus sprite, there is in fact one of those blocks.

I will double check.
asivi
Scratcher
1000+ posts

I have an error i my game, can anyone help?

They have a receiver… in sprite “Colossus”

@memedoggo

“answer” is not case sensitive
Also remove the needless forever loops you have inside the “answers” checks.

memedoggo
Scratcher
18 posts

I have an error i my game, can anyone help?

thanks asivi. I'll take a look at this.

P.S. I am aware that it is not case sensitive, I have been, I simply thought from a scratcher above that said so, which got me to believe that I should give it a try. I now find it a waste of time, and unnecessary, to remove the script chunks.

Last edited by memedoggo (March 2, 2018 21:09:41)

H4K
Scratcher
100+ posts

I have an error i my game, can anyone help?

memedoggo wrote:

H4K, the thing is that I have included a
when I receive [ v]

block. however, it is not in the same sprite. If you would look, you would see that in the colossus sprite, there is in fact one of those blocks.

I will double check.

You probably modified it after the project was loaded for me

Can you please explain what's the problem? What sprite is the basic sprite?

My PC specs (for bugs & glitches):
- Intel Core i9-9980XE
- 64 GB DDR4-3200
- Nvidia GeForce RTX 2080 Ti (x2)

This is a signature










Last edited by Kaj (March 16, 2880 00:00:00)



















memedoggo
Scratcher
18 posts

I have an error i my game, can anyone help?

Actually, H4K, that chunk/block/etc was added as soon as I set up the cheat codes.

The problem is that a cheat code isn't working. The sprites that the code are associated with are as follows:
Sprite 1
Goliath
Colossus
memedoggo
Scratcher
18 posts

I have an error i my game, can anyone help?

I'm off to spend my free time. Thanks for the help.
cbletson
Scratcher
27 posts

I have an error i my game, can anyone help?

It might be working it is just set to 9 seconds until it shows and how are you spelling colossus because the name of the sprite and what your broadcasting is spelled differently. one has two l's and one only has one l so if your like me and trying to spell the sprite name then it doesn't work but if u spell it the right way then just wait nine seconds and it works.

Hope I helped!

The over complicator, All of my code is over complicated. I know the easy way but where's the fun in that.
CBLetson
Just for fun

when I receive [ Wake up]
repeat until <(nap)=[1]>
add (code) to (projects)
insert (unnecessary code)
wait until <not<(brain)=(fried)>>
if <(time)=[2 a.m]> then
set(nap) to [1]
end
end
wait((2)*((60)*(60))) secs
set(nap) to [0]
broadcast[Wake up]
memedoggo
Scratcher
18 posts

I have an error i my game, can anyone help?

thanks cbleston, The
wait (9) secs

Was actually the cause of this whole thing. Glad for the help, and it may still need some work, but it is overall good to go and in a second draft. Thanks again.
cbletson
Scratcher
27 posts

I have an error i my game, can anyone help?

No Problem

The over complicator, All of my code is over complicated. I know the easy way but where's the fun in that.
CBLetson
Just for fun

when I receive [ Wake up]
repeat until <(nap)=[1]>
add (code) to (projects)
insert (unnecessary code)
wait until <not<(brain)=(fried)>>
if <(time)=[2 a.m]> then
set(nap) to [1]
end
end
wait((2)*((60)*(60))) secs
set(nap) to [0]
broadcast[Wake up]

Powered by DjangoBB