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

#1 2013-01-24 18:11:22

SillySausage
New Scratcher
Registered: 2013-01-24
Posts: 2

Help with dragon

Ok so if you could help it would be awesome. My problem is that when My hero kills the dragon the dragon does the death thing but then continues to fly around. I want him to die and then change scene but that would be impossible if he keeps flying around invisible. I thought of moving him back a layer. Would that work? The code is like this:

When I receieve [Attack]
if <(Dragon Health) < [1]>
 Say [ROOORGH] for (2) secs
 Switch to costume [Dragon Dead v]
 go to x: 0 y: -150
 stop script
Anybody see a fault in my code?
Ps: The colours in the scratchblock are a bit off but I think you get the jist.

Thanks!

Offline

 

#2 2013-01-24 18:14:56

Oracle1
New Scratcher
Registered: 2013-01-23
Posts: 36

Re: Help with dragon

try this

When I receive [Attack^]
if <(Dragon Health) < [1]>
 Say [ROOORGH] for (2) secs
 Switch to costume [Dragon Dead v]
 go to x:( 0 )y: (-150)
hide
 stop script

Offline

 

#3 2013-01-24 18:50:02

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Help with dragon

SillySausage wrote:

Ok so if you could help it would be awesome. My problem is that when My hero kills the dragon the dragon does the death thing but then continues to fly around. I want him to die and then change scene but that would be impossible if he keeps flying around invisible. I thought of moving him back a layer. Would that work? The code is like this:

When I receive [Attack v]
if <(Dragon Health) < [1]>
 Say [ROOORGH] for (2) secs
 Switch to costume [Dragon Dead v]
 go to x: (0) y: (-150)
 stop script
end
Anybody see a fault in my code?
Ps: The colours in the scratchblock are a bit off but I think you get the jist.

Thanks!

Fixed.

Anyway, a solution to your problem is that you could put this around the dragon'a movement blocks:

if <(Dragon Health) < [1]>
 hide
else
 Movement scripts...
end

Just to make sure, remember to have no repeat loops in the movement part of the script above, though you can have them around it.

I hope that this helps!

Last edited by ErnieParke (2013-01-25 16:44:35)


http://i46.tinypic.com/35ismmc.png

Offline

 

#4 2013-01-25 08:05:02

SillySausage
New Scratcher
Registered: 2013-01-24
Posts: 2

Re: Help with dragon

Yes! Thank you so much!!!!!!! This solved all my problems! I love the scratch community c:

Offline

 

#5 2013-01-25 16:45:23

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Help with dragon

SillySausage wrote:

Yes! Thank you so much!!!!!!! This solved all my problems! I love the scratch community c:

Well it is great; isn't it? Also, your welcome! And I hope that you're game will come along just as you want it!


http://i46.tinypic.com/35ismmc.png

Offline

 

#6 2013-02-06 21:22:01

xboxboy2003
Scratcher
Registered: 2012-07-26
Posts: 2

Re: Help with dragon

you need to switch the op. to a equal one

Offline

 

#7 2013-02-07 16:52:40

MEOWCAT34
Scratcher
Registered: 2012-09-29
Posts: 100+

Re: Help with dragon

SillySausage wrote:

Ok so if you could help it would be awesome. My problem is that when My hero kills the dragon the dragon does the death thing but then continues to fly around. I want him to die and then change scene but that would be impossible if he keeps flying around invisible. I thought of moving him back a layer. Would that work? The code is like this:

when I receieve [Attack v]
if <(Dragon Health) < [1]>
 Say [ROOORGH] for (2) secs
 Switch to costume [Dragon Dead v]
 go to x: (0) y: (-150)
 stop script
Anybody see a fault in my code?
Ps: The colours in the scratchblock are a bit off but I think you get the jist.

Thanks!

FIXED

Last edited by MEOWCAT34 (2013-02-07 16:56:25)


Wuntz a pun a tiem dere wuz a ranndumb guy. da end.
GENERATION 32: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment

Offline

 

Board footer