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

#1 2008-04-17 21:58:00

viper650
Scratcher
Registered: 2008-04-04
Posts: 36

scrolling and enemy sprites

when you make a scrolling game how do you make an enemy character stay in one spot while everything else moves. My enemy wont go off screen when i move away.

Offline

 

#2 2008-04-18 01:28:14

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: scrolling and enemy sprites

I did it by having a variable to track how far along the "scenery" my character was, and adding that variable to the location of any enemies.  Then Hiding the enemy if the variable was big enough to put them off-screen.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#3 2008-04-18 08:48:44

viper650
Scratcher
Registered: 2008-04-04
Posts: 36

Re: scrolling and enemy sprites

Can you post that so i can get an idea please?

Offline

 

#4 2008-04-24 15:10:00

alexdz
Scratcher
Registered: 2008-04-09
Posts: 6

Re: scrolling and enemy sprites

pleeeeeeeeease HEEEEEEEEEEEEEEEEEEEEEEEELLLLLLLLLLLLLLLP!!!!!!!!!!!!!!

Offline

 

#5 2008-04-27 19:38:08

stevii
Scratcher
Registered: 2008-01-19
Posts: 10

Re: scrolling and enemy sprites

i had a problem with that but i just made edges

 
|\------/|
|        |
|   /\   |                     Smile, Your pants are on fire.
|_/   \_|

Offline

 

#6 2008-04-27 19:45:19

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: scrolling and enemy sprites

I just said like : [blocks]<when green flag clicked>[/blocks]
                       [blocks]<forever>[/blocks]
                       [blocks]<set x to( <{(( ((scrollx  <+>(( 480 <*> number ))  )) <+>100  ))= )) }>[/blocks]


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

Board footer