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

#1 2012-03-10 15:54:53

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Lives system

My lives system does not work! Can anyone help me?


Get ready for domination of:  tongue

Offline

 

#2 2012-03-10 16:02:37

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: Lives system

What is your lives system?

when gf clicked
set [lives v] to [5]
forever
if <(lives) < [1]>
stop all // or whatever happens upon death

when i receive [died v] // or whatever you use for sensing death
change [lives v] by [-1]
also you might want a
wait (0.1) secs
after changing the lives so it doesn't go down too quickly (unless it dies properly, iif you see what I mean)

Offline

 

#3 2012-03-10 16:22:53

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Lives system

We can't really say why it doesn't work if we don't know what it is.

Grr 60 second rule >:U


Why

Offline

 

#4 2012-03-10 16:39:27

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Lives system

RedRocker227 wrote:

We can't really say why it doesn't work if we don't know what it is.

Grr 60 second rule >:U

It's my Pong: Ultimate Line game... here

Last edited by coolhogs (2012-03-10 16:50:18)


Get ready for domination of:  tongue

Offline

 

#5 2012-03-10 17:22:05

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Lives system

Please use the Report system for reporting inappropriate stuff and asking for moderator activities (topic renames, topic closes, etc.) - not for asking for help on your topics.  We've got lots of helpful people on the forums that can answer your questions - not just moderators  smile


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#6 2012-03-10 17:26:36

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Lives system

Paddle2See wrote:

Please use the Report system for reporting inappropriate stuff and asking for moderator activities (topic renames, topic closes, etc.) - not for asking for help on your topics.  We've got lots of helpful people on the forums that can answer your questions - not just moderators  smile

Oh, ok, I will! Sorry!  smile


Get ready for domination of:  tongue

Offline

 

#7 2012-03-10 21:34:30

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Lives system

Bump!


Get ready for domination of:  tongue

Offline

 

#8 2012-03-10 23:35:25

Fordark
Scratcher
Registered: 2010-08-02
Posts: 100+

Re: Lives system

coolhogs wrote:

RedRocker227 wrote:

We can't really say why it doesn't work if we don't know what it is.

Grr 60 second rule >:U

It's my Pong: Ultimate Line game... here

Your game is incomplete, it's missing things such as subtracting from AI's lives. Remember to check through the scripts to fill out missing spaces.
If the lives thing is about the display:

when I receive [play']
forever
if <(lives) = [1]>
switch to costume [costume1 v]
end
if <(lives) = [2]>
switch to costume [costume1 v]
end
if <(lives) = [3]>
switch to costume [costume1 v]
end

end
You put the same costume for each life value, so the solution is as easy as selecting two costumes.
But then for the red lines...
when I receive [play']
show
forever
if <touching [dot v]?>
change [lives v] by [-1]
end
If the dot doesn't reset positions when it touches the red line, then it will still touch the red line and the script will keep subtracting lives.
if <touching [dot v]?>
change [lives v] by [-1]
broadcast [reset v] and wait
For the dot...
when I receive [reset v]
go to x:[0] y:[100]


http://dl.dropbox.com/u/34855482/Fordarksig.png

Offline

 

#9 2012-03-11 05:41:59

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: Lives system

Fordark wrote:

coolhogs wrote:

RedRocker227 wrote:

We can't really say why it doesn't work if we don't know what it is.

Grr 60 second rule >:U

It's my Pong: Ultimate Line game... here

Your game is incomplete, it's missing things such as subtracting from AI's lives. Remember to check through the scripts to fill out missing spaces.
If the lives thing is about the display:

when I receive [play']
forever
if <(lives) = [1]>
switch to costume [costume1 v]
end
if <(lives) = [2]>
switch to costume [costume1 v]
end
if <(lives) = [3]>
switch to costume [costume1 v]
end

end
You put the same costume for each life value, so the solution is as easy as selecting two costumes.
But then for the red lines...
when I receive [play']
show
forever
if <touching [dot v]?>
change [lives v] by [-1]
end
If the dot doesn't reset positions when it touches the red line, then it will still touch the red line and the script will keep subtracting lives.
if <touching [dot v]?>
change [lives v] by [-1]
broadcast [reset v] and wait
For the dot...
when I receive [reset v]
go to x:[0] y:[100]

The display can be much simpler.

when i receive [play v]
repeat until <(lives) < [1]>
switch to costume (lives) // just make sure the costumes are in the right order

Offline

 

#10 2012-03-11 12:37:50

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Lives system

Thanks to everyone! Mods close this.


Get ready for domination of:  tongue

Offline

 

#11 2012-03-11 13:05:48

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: Lives system

click the report button and ask to close  smile


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#12 2012-03-11 14:24:08

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Lives system

Closed by request of the topic owner


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer