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

#1 2012-04-04 14:28:08

ScratchOS
Scratcher
Registered: 2012-03-20
Posts: 53

Enemies?

I am making a 2d RPG game that is played by looking from above, ie: Pokemon or Final Fantasy 1

It is real time combat, so the enemies are suppose to move towards the player.

How do I do this?

I tried this:

when gf clicked
forever
point towards (player)
move (2) steps
But it seems to be causing the enimies to circle the enemy when it moves... Please help!

Offline

 

#2 2012-04-04 14:38:30

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Enemies?

I'm unsure what your problem is, but if it's what I think it is then this should help:

when gf clicked
forever
   glide [x] secs to x: (x position of player) y: (y position of player)


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#3 2012-04-04 14:51:28

ScratchOS
Scratcher
Registered: 2012-03-20
Posts: 53

Re: Enemies?

that doesn't seem to work very well  sad

Offline

 

#4 2012-04-04 16:39:40

SplatKirby
Scratcher
Registered: 2012-03-22
Posts: 100+

Re: Enemies?

You could use

glide to x: (?) y: (?)


http://gifninja.com/animatedgifs/205654/well-this-is-awkward.gif

Offline

 

#5 2012-04-04 23:05:16

technomaniac
Scratcher
Registered: 2011-08-15
Posts: 94

Re: Enemies?

I think the gliding scripts would cause enemies to glide straight to the player.
How about

when gf clicked 
point towards [player]
move [x] steps
if touching [player]
  stop all

Last edited by technomaniac (2012-04-04 23:05:49)

Offline

 

#6 2012-04-04 23:06:33

technomaniac
Scratcher
Registered: 2011-08-15
Posts: 94

Re: Enemies?

technomaniac wrote:

I think the gliding scripts would cause enemies to glide straight to the player.
How about

when gf clicked 
point towards [player]
move [x] steps
if touching [player]
  stop all

Sort of crude, but I hope you get the idea. I've not tried it, it's just a guess based on your problem.

Offline

 

Board footer