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

#1 2012-01-19 21:08:19

CatPerson
Scratcher
Registered: 2011-12-17
Posts: 1000+

Person "dies" when health goes to 0

Is there a way I can make the variable sense when it is at zero??? Im making a hunger games Game and would like to know. thanx  smile


http://nyopoliticker.files.wordpress.com/2012/02/in_dog_we_trust_rusty.jpghttps://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSrxH2RAmte9adghivuoOhgklIlUcZUFuCAA0wFufFq-NWyZWg5http://www.buttonsonline.com/2012/obama/BO-rallysign-104.gif

Offline

 

#2 2012-01-19 21:37:55

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Person "dies" when health goes to 0

[when green flag clicked]
[wait until] < (health) == (0) >
[broadcast [die]]


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#3 2012-01-19 21:45:28

CatPerson
Scratcher
Registered: 2011-12-17
Posts: 1000+

Re: Person "dies" when health goes to 0

MoreGamesNow wrote:

[when green flag clicked]
[wait until] < (health) == (0) >
[broadcast [die]]

Cool thanx!!! X3


http://nyopoliticker.files.wordpress.com/2012/02/in_dog_we_trust_rusty.jpghttps://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSrxH2RAmte9adghivuoOhgklIlUcZUFuCAA0wFufFq-NWyZWg5http://www.buttonsonline.com/2012/obama/BO-rallysign-104.gif

Offline

 

#4 2012-01-20 10:02:27

Dets65
Scratcher
Registered: 2012-01-05
Posts: 83

Re: Person "dies" when health goes to 0

aka: <when green flag clicked><wait until> health = 0 <broadcast[die


Heh. HEH HEH HEH... BTW, your fission has been mailed. link to blacksmith collab: http://scratch.mit.edu/forums/viewtopic.php?id=106923

Offline

 

#5 2012-01-20 17:46:13

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Person "dies" when health goes to 0

Or a better idea might be
[/block]
<when green flag clicked>
<forever>
<if> <( <{ Health }> <<> any value )
(dieing script here)
<end>
<end>
[/block]
Easier to read:
when green flag clicked
forever
if health < (level at unconsiousness)
(dieing script here)
end if
end forever

Last edited by rdococ (2012-01-20 17:46:33)

Offline

 

#6 2012-01-20 19:42:55

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: Person "dies" when health goes to 0

rdococ wrote:

Or a better idea might be
[/block]
<when green flag clicked>
<forever>
<if> <( <{ Health }> << 1  > )
(dieing script here)
<end>
<end>
[/block]
Easier to read:
when green flag clicked
forever
if health < (level at unconsiousness)
(dieing script here)
end if
end forever

This, and the hunger games rock.

Offline

 

Board footer