Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Lightsaber glitch
- MustashManStudios
-
35 posts
Lightsaber glitch
I am making a lightsaber combat mechanic, and here is the code for particles.
when I start as clone
go to player saber
point in direction of player saber
repeat untill touching enemy saber (move 10 steps)
show
next costume
point in direction -179 to 180
repeat 10
move 10
delete clone
The Problem is it does not show when touching enemy saber, but when i have it forever show it works, but you can see the particles moving up the hilt.
Any ideas why?
Help me please its here https://scratch.mit.edu/projects/669374433/
You are my only hope
when I start as clone
go to player saber
point in direction of player saber
repeat untill touching enemy saber (move 10 steps)
show
next costume
point in direction -179 to 180
repeat 10
move 10
delete clone
The Problem is it does not show when touching enemy saber, but when i have it forever show it works, but you can see the particles moving up the hilt.
Any ideas why?
Help me please its here https://scratch.mit.edu/projects/669374433/
You are my only hope
- mistafl00py
-
51 posts
Lightsaber glitch
When you hide a sprite, it's unable to sense other sprites. To get around this, simply use “set ghost effect” instead.
- MustashManStudios
-
35 posts
Lightsaber glitch
Thank you so much, I knew that when hidden it loses its sensing, I just forgot because I was in a rush. Thanks!
- mirrorknight01
-
5 posts
Lightsaber glitch
Thank you so much, I knew that when hidden it loses its sensing, I just forgot because I was in a rush. Thanks!
Also if you set ghost effect to 100 it will act same as it is hidden so make sure to set ghost effect to 99 instead.
- Jlerpy
-
1000+ posts
Lightsaber glitch
Thank you so much, I knew that when hidden it loses its sensing, I just forgot because I was in a rush. Thanks!
Also if you set ghost effect to 100 it will act same as it is hidden so make sure to set ghost effect to 99 instead.
I don't think that's true.
*tests*
That is indeed incorrect. Sensing works fine at Ghost 100.
- Jlerpy
-
1000+ posts
Lightsaber glitch
So yeah, if you give it a
that works great.
I'd also suggest, before the repeat until move, putting in a single move of about 50, which jumps the particles past the hilt. This means they won't spark if the other lightsaber manages to touch the hands or the hilt, AND speeds them up so there's not as much of a lag between the blades touching and the sparks appearing.
then after the collision detection, a
that works great.
I'd also suggest, before the repeat until move, putting in a single move of about 50, which jumps the particles past the hilt. This means they won't spark if the other lightsaber manages to touch the hands or the hilt, AND speeds them up so there's not as much of a lag between the blades touching and the sparks appearing.
- Discussion Forums
- » Help with Scripts
-
» Lightsaber glitch