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

#1 2012-09-10 19:28:59

bird12345
New Scratcher
Registered: 2012-08-17
Posts: 10

How to get sprites to attack another sprite.

Can you please help.

Offline

 

#2 2012-09-10 22:29:59

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

Re: How to get sprites to attack another sprite.

You'll need to be more specific.  You seem to be asking for some kind of AI, which can range from very difficult to relatively simple depending on what exactly you want the sprites to do.


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

Offline

 

#3 2012-09-11 17:33:49

bullelk12
Scratcher
Registered: 2012-05-26
Posts: 100+

Re: How to get sprites to attack another sprite.

There are several ways depending on what you want.

Hand to hand combat:     Simply have the enemy forever point towards your character and move 2 steps. Then have it where if the enemy is touching your character then broadcast 'attack' wait .5 seconds (this last part is to make sure the enemy doesn't broadcast attack 50 times per second) then on the character make a script saying: when I recieve attack change health by -1. If health is < 0, hide.

Last edited by bullelk12 (2012-09-11 17:34:09)


http://mag.racked.eu/cimage/i6000/Achievement++get%21/Scratcher+love+minecraft%21/mca.png

Offline

 

Board footer