Discuss Scratch

EpicFangirl21
Scratcher
3 posts

How do you make spikes?

sorry i'm new to this and want to create a game sort of like Mario where instead you have to avoid spikes, climb walls, double-jump, and capture a flag. Hopefully there can be 5-6 levels, but i really need help! I would GREATLY appreciate anyone who can help me, and they will definitely be mentioned for helping me. THANK YOU!!!! XD
Sinaboo
Scratcher
100+ posts

How do you make spikes?

Ok what do you need help with? Just spikes for now?

Last edited by Sinaboo (Nov. 13, 2018 22:41:58)

whooshang
Scratcher
100+ posts

How do you make spikes?

I have a project where spikes are used. It's here. Take out the sprite “spike” and use it for your project, and give credit.

Last edited by whooshang (Nov. 14, 2018 01:29:26)

EpicFangirl21
Scratcher
3 posts

How do you make spikes?

yeah all i need is spikes for now
Vicream_Creator
Scratcher
100+ posts

How do you make spikes?

EpicFangirl21 wrote:

yeah all i need is spikes for now
Well “spikes” doesn't exist. Sprites that changes variables does.
Considering you already built your game with Mario having health and all:

Spike (or block/whatever) (I suggest using hitbox if they have a weird design/deco thingies)

when green flag clicked
forever
if <touching [Mario] ?> then
change [HP] by (-1) //Or broadcast DIE,...
broadcast [HURT] and wait //Risky block, I suggest using broadcast and wait .1 sec
end
end

Mario script:

when I receive [HURT]
go to x: (SPAWN) y: (SPAWN)//(You can have add-on such as animations,..)

Note:You can skip Spike script and directly make it so that it is Mario that detects touching the spike

Last edited by Vicream_Creator (Nov. 14, 2018 20:03:30)

EpicFangirl21
Scratcher
3 posts

How do you make spikes?

oh ok thanks…. but like i said im a noob and im still in the process of creating this game. is there anyway i can ask you for how to do hp and other necessities for this game to look and function properly?
Vicream_Creator
Scratcher
100+ posts

How do you make spikes?

EpicFangirl21 wrote:

oh ok thanks…. but like i said im a noob and im still in the process of creating this game. is there anyway i can ask you for how to do hp and other necessities for this game to look and function properly?
Well HP is just a random variable that you can show. You could also render hearts that disappears depending on the HP:

Heart sprites script:

when green flag clicked
set [HP] to [5]
switch costume to [Heart 5]

And then, if you already inserted the lowering HP script in the spikes:
when I receive [HURT]
wait (0.1) secs //Avoid glitches else Spikes won't have time to lower HP
switch costume to (join [Heart ] (HP)


And for basically every other game necessities I suggest copying a random platformer (Games with the aim to teach peoples scripting are always easier to copy from, I suggest using them)

Last edited by Vicream_Creator (Nov. 14, 2018 21:06:45)

CreakyRobot175
Scratcher
0 posts

How do you make spikes?

A simpler way to do it is
forever
if <> then
<touching [spikes v] ?>
end
end
[scratchblocks]
when green flag clicked
[/scratchblocks]
Oumuamua
Scratcher
1000+ posts

How do you make spikes?

_moonbun_ wrote:

...largue script... :: grey

What???
Tishmish
Scratcher
4 posts

How do you make spikes?

you can try to do this too:-make one sprite that looks like a spike,then do this to the moving sprite,
when green flag clicked
forever
if <> then
<touching [ v] ?>
go to x: () y: (0)
end
end
Tishmish
Scratcher
4 posts

How do you make spikes?

in the touching sprite make it sprite two.
Tishmish
Scratcher
4 posts

How do you make spikes?

'touching block'.Sorry!
PersRufaro
Scratcher
100+ posts

How do you make spikes?

CreakyRobot175 wrote:

A simpler way to do it is
forever
if <> then
<touching [spikes v] ?>
end
end
[scratchblocks]
when green flag clicked
[/scratchblocks]

_moonbun_ wrote:

repeat ()
forever
if <> then
if <> then
wait until <>
repeat until <>
<key [<touching color [#c6efd9] ?><touching color [#c6efd9] ?><color [#d476ff] is touching [#f203e3] ?>(loudness) v] pressed?>
play sound [ v] until done
play note ( v) for (0.5) beats
if <> then
if <> then
pen up
set pen color to [#a13c1d]
change pen color by ()
stamp
say []
think []
show
end
end
end


else

end
end
end

end

Tishmish wrote:

you can try to do this too:-make one sprite that looks like a spike,then do this to the moving sprite,
when green flag clicked
forever
if <> then
<touching [ v] ?>
go to x: () y: (0)
end
end
[/quote]
Please don’t necropost. It’s when you post on an old topic and it brings it back to the top of the forum
PersRufaro
Scratcher
100+ posts

How do you make spikes?

PersRufaro wrote:

CreakyRobot175 wrote:

A simpler way to do it is
forever
if <> then
<touching [spikes v] ?>
end
end
[scratchblocks]
when green flag clicked
[/scratchblocks]

_moonbun_ wrote:

repeat ()
forever
if <> then
if <> then
wait until <>
repeat until <>
<key [<touching color [#c6efd9] ?><touching color [#c6efd9] ?><color [#d476ff] is touching [#f203e3] ?>(loudness) v] pressed?>
play sound [ v] until done
play note ( v) for (0.5) beats
if <> then
if <> then
pen up
set pen color to [#a13c1d]
change pen color by ()
stamp
say []
think []
show
end
end
end


else

end
end
end

end

Tishmish wrote:

you can try to do this too:-make one sprite that looks like a spike,then do this to the moving sprite,
when green flag clicked
forever
if <> then
<touching [ v] ?>
go to x: () y: (0)
end
end
[scratchblocks]
[/quote]
Please don’t necropost. It’s when you post on an old topic and it brings it back to the top of the forum[/quote]
ipaddude
Scratcher
100+ posts

How do you make spikes?

if touching spike:
do stuff and respawn mario

Powered by DjangoBB