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

#1 2011-01-28 16:12:27

youngeinstein
New Scratcher
Registered: 2011-01-28
Posts: 1

How do you make people attack

How do you make it so that when a sprite in a certain costume hits some one there life goes down.

Offline

 

#2 2011-01-28 16:22:17

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: How do you make people attack

do you have a variable? if yes,
<when green flag clicked>
<forever>
<wait until> << <touching[ enemy ] <and><( [costume # of enemy] <=> 2 (attack costume) )> >>
<change{ health }by( -1
<wait until> << <<  <not> <touching[ enemy >> <or> <<  <not><( costume # of enemy <=> 2 )> >> >>

Offline

 

Board footer