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

#1 2008-08-25 17:51:52

thewhiteknight
Scratcher
Registered: 2008-08-23
Posts: 10

Please help me (Enemy Question)

for those from the shooting question, yes, same guy. Anyway, I need to know how to make enemies come at me. here is the layout


:= wall
G=Shooter/player
+=where I want the enemies to come from



:
:                  +
:                  +
: G               +

and i probably want it to be like a swarm of them, but one enemy at a time can be fine,

Offline

 

#2 2008-08-25 18:11:05

dingdong
Scratcher
Registered: 2007-08-09
Posts: 1000+

Re: Please help me (Enemy Question)

ummm... to me it looks like an overworld so it would be:

[forever]
[point towards {player}]
[if <(distance to {player}) < (100)>]
   [move (5) steps]
[else:]
   [put the shooting for enemy here]

if its scrolling convert [move (5) steps] to:

[change scrollX by ( ( (sin of (direction)) * ((speed) * (-1) ) )]
[change scrollY by ( ( (cos of (direction)) *((soeed) * (-1) ) )]

Last edited by dingdong (2008-08-25 18:11:30)


http://img851.imageshack.us/img851/2829/superanbanner.png
click the image for my music

Offline

 

Board footer