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

#1 2009-12-05 11:37:38

TobiOlivers
Scratcher
Registered: 2009-05-20
Posts: 76

AI Help

hey,

I'm making a Legend of Zelda port and need help with enemy AI. Mostly with the Tetki's(the spiders with one eye) AI. In the NES version of The Legend of Zelda, the Tetki's jumped around the screen. They wouldn't go from one point to the other in a straight line, but jump to one point to another. If i wanted to have it glide from one point to another, i would use this:
[blocks]<when green flag clicked>
<forever>
<glide(1)secs to x sad <pick random(-240)to(240)>)y sad <pick random(-180 )to(180)>)>
<wait(0.1 )secsc>
<end>
[/blocks]
but i need them to jump, not glide.
An example: http://scratch.mit.edu/projects/TobiOlivers/789608 but i need it to be smoother and to go to random positions, not fixed ones.
Any suggestions are appreciated, thanks!  big_smile

Last edited by TobiOlivers (2009-12-05 13:16:02)


http://i987.photobucket.com/albums/ae353/NintendoTobi/Meepsig.png
I Am Meep, yes.

Offline

 

#2 2009-12-05 13:04:20

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: AI Help

Here is a short tutorial I made. http://scratch.mit.edu/projects/shadow_7283/789584 . It is pretty complicated and it is not the simplist way of doing it, but I am pretty sure it works.

Last edited by shadow_7283 (2009-12-05 13:04:30)

Offline

 

Board footer