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

#1 2008-04-24 03:32:29

datsuper7
Scratcher
Registered: 2008-04-15
Posts: 13

Enemies in scrolling games

How do I make a bad guy appear on one of the scrolling platforms.
I've tried everything but then he just appears on every screen!
Please help!
Thank You

Offline

 

#2 2008-04-24 05:05:18

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Enemies in scrolling games

You must have a scrolling variable of some sort, maybe called ScrollX or something like that.  Find the values of ScrollX when you want the enemy to be visible and set up script on the character something like this:

[blocks]
<when green flag clicked>
<forever>
<if><< <( <{ ScrollX  }> <>> xxx )> <and> <(  <{ ScrollX  }><<> yyy )> >>
<show>
<else>
<hide>
<end>

[/blocks]

where "xxx" is your minimum value and "yyy" is the maximum value of ScrollX you want the enemy to appear.  I'm no expert on platform games, so maybe there is a better way out there, but I think that would work.

Last edited by Paddle2See (2008-04-24 05:07:40)


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer