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

#1 2010-04-14 13:06:26

littlebird2472
Scratcher
Registered: 2010-03-05
Posts: 42

platformer

I am makin a game called pokemon rpg. I released p.1 and 2. In p.3 I used the exact same scripts for the main character but my character wont move.  Why? It is a platformer type of game. Here is the script. It is ment to make the background scroll so it looks like the character is moving.  <when green flag clicked><hide>    <when I receive[ Play game] <switch to costume[ costume 2] (facing left) <go to x sad  -193 )y sad  -130) (starting position) Then another character says: new quest recieved. That works. Then the movement. <when I receive[ Play game] <forever> <if><key[ left arrow ]pressed?> <switch to costume[ costume 2] (facing left) <change{ scrollX }by(5) <end> <end> Do the same as the above (moving left) but change left to right and change by 5 to by -5 for right movement. If this works for you tell me and I will write the other scripts.


http://dragcave.net/image/MoLDl.gif Please click and help my dragon survive!

Offline

 

#2 2010-04-14 13:08:06

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: platformer

This post should be in All About Scratch...

Last edited by meew0 (2010-04-14 13:08:20)


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#3 2010-04-15 06:06:07

mathematics
Scratcher
Registered: 2009-03-01
Posts: 1000+

Re: platformer

I'm making the whole thing easier to understand.

littlebird2472 wrote:

I am making a game called Pokemon RPG. I released p.1 and 2. In p.3 I used the exactly the same scripts for the main character, but my character won't move. Why? It is a platform type of game. Here is the script. It is meant to make the background scroll so it looks like the character is moving.
[blocks]
<when green flag clicked>
<hide>

<when I receive[ Play game
<switch to costume[ costume2 (facing left)
<go to x sad  -193 )y sad  -130 (starting position)
[/blocks]
Then another character says: new quest received. That works. Then the movement.
[blocks]
<when I receive[ Play game
<forever>
<if> <key[ left arrow ]pressed?>
<switch to costume[ costume2 (facing left)
<change{ scrollX }by(5
<end>
<end>
[/blocks]
Do the same as the above (moving left) but change left to right and change by 5 to by -5 for right movement. If this works for you tell me and I will write the other scripts.

Last edited by mathematics (2010-04-15 06:06:41)

Offline

 

Board footer