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

#1 2009-06-03 15:27:26

Mozaz
Scratcher
Registered: 2009-05-19
Posts: 500+

Enemy Ship Help

I need help on my latest project. It's a space game where you are a spaceship and there are enemy spaceships trying to kill you.

I've got the script for the enemy ship to point in the direction of the spaceship and fly towards it but it's not 100% glitch free and it doesn't look right at the moment. For example, sometimes instead of pointing at the player's ship the enemy ship will fly upwards, at 0 degrees.

http://scratch.mit.edu/projects/MozazExtras/554705

I would really appreciate the help  smile


http://i33.tinypic.com/15i5fmp.png

Offline

 

#2 2009-06-04 13:09:42

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: Enemy Ship Help

I'm looking at it now. It's kinda confusing since the player ship is trying to set scrollX and scrollY values that the enemy ship pays no attention to. For now I'll just work with good old x and y.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#3 2009-06-04 13:13:12

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: Enemy Ship Help

It looks like you forgot to specify a sprite in the second (direction of [ ]) block in the first conditional of the enemy ship. If you set it to (direction of [Ship1_Dir]) it works decently. I'll keep working on a better solution.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#4 2009-06-04 13:47:19

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: Enemy Ship Help

Here is my first go at a fix: http://scratch.mit.edu/projects/halfbak … oon/556050. I was tempted to work on it some more, but I won't unless you want me to.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#5 2009-06-04 14:10:29

Mozaz
Scratcher
Registered: 2009-05-19
Posts: 500+

Re: Enemy Ship Help

fullmoon wrote:

Here is my first go at a fix: http://scratch.mit.edu/projects/halfbak … oon/556050. I was tempted to work on it some more, but I won't unless you want me to.

Omg, it works peferctly! Thanks so much  smile  I didn't see any glitches in it atall.

I will add your name in the game's credits when it's released for ure great help  big_smile

Thanks again.


http://i33.tinypic.com/15i5fmp.png

Offline

 

#6 2009-06-04 16:29:35

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: Enemy Ship Help

Mozaz wrote:

I will add your name in the game's credits when it's released for ure great help  big_smile
Thanks again.

Aw, shucks, you don't have to do that. Happy I could help  big_smile


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#7 2009-06-05 14:11:12

Mozaz
Scratcher
Registered: 2009-05-19
Posts: 500+

Re: Enemy Ship Help

fullmoon wrote:

Mozaz wrote:

I will add your name in the game's credits when it's released for ure great help  big_smile
Thanks again.

Aw, shucks, you don't have to do that. Happy I could help  big_smile

One more thing, how can I make it so that the enemy ship recognises scrolling, because I'm not that great at trig.

I can upload another project with the scrolling background if you need it  smile


http://i33.tinypic.com/15i5fmp.png

Offline

 

#8 2009-06-07 07:06:16

Mozaz
Scratcher
Registered: 2009-05-19
Posts: 500+

Re: Enemy Ship Help

Bump  smile


http://i33.tinypic.com/15i5fmp.png

Offline

 

#9 2009-06-07 07:23:55

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

Re: Enemy Ship Help

Here you go...
http://scratch.mit.edu/projects/bhz/560069

Offline

 

Board footer