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

#1 2011-02-02 14:46:10

the_storm_of_stone
Scratcher
Registered: 2011-01-22
Posts: 24

Archmage's scroller template help?

Hey, I was wondering how you get the sensor sprites to go right around the player sprite. The top, left and right ones won't go as close as they can to my own costume set, they stay in the place of the old one... Do I have to get rid of all of the first costume set?

Archmage, if you're reading this, I just wanted to say that your template is awesome  smile

Offline

 

#2 2011-02-02 14:49:14

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Archmage's scroller template help?

Just open the costumes for the sensor sprites and move them.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#3 2011-02-03 11:59:36

the_storm_of_stone
Scratcher
Registered: 2011-01-22
Posts: 24

Re: Archmage's scroller template help?

I don't understand what you mean... I've tried repositioning them, but they always revert back to their first positions.

Offline

 

#4 2011-02-03 12:10:47

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Archmage's scroller template help?

If they revert that means you were dragging the sprite or not saving the costume.

If you touch the scripts or drag the sensor sprites on the stage you are doing the wrong thing.

You need to click open the sensor sprite, go to costumes, then edit the little sensor shape costume.

Alternately, if that is too difficult, just alter the size of your character sprite until it is similar to the size of the template character sprite.

Last edited by archmage (2011-02-03 12:11:15)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#5 2011-02-03 13:01:30

the_storm_of_stone
Scratcher
Registered: 2011-01-22
Posts: 24

Re: Archmage's scroller template help?

Oh, wait, I've got it. Something odd happened with this pole I put as part of the first terrain; whenever i touched it, I fell through the ground...

Offline

 

#6 2011-02-03 13:09:25

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Archmage's scroller template help?

There is no way for me to see what is wrong without actually seeing the project at this point.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#7 2011-02-03 14:52:03

the_storm_of_stone
Scratcher
Registered: 2011-01-22
Posts: 24

Re: Archmage's scroller template help?

It doesn't matter at this point. Don't worry about it  smile  I also wanted to ask, how would you add a ducking action to the player?

Offline

 

#8 2011-02-03 15:04:08

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Archmage's scroller template help?

The same way you the rest of the animations are added. You set up a new stance, and when the down arrow is pressed you go to that stance.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#9 2011-02-05 08:25:26

the_storm_of_stone
Scratcher
Registered: 2011-01-22
Posts: 24

Re: Archmage's scroller template help?

I tried that. I used an If and Else block. The If part for when down was pressed then go into a duck, and the Else part for if it wasn't then go into the standing stance. It's the Else part that I'm having trouble with. I left it as go into stance 1 when down isn't pressed, but then I had to find a way of getting the other animations to work, because it would just stay stuck in stance 1. I nearly had it right when I said, "Else, If not up pressed or right pressed or left pressed or SPACE pressed, then go into stance 1." When I used this, it wouldn't complete the jumping animation, because you usually let go of the up key when you're in the air, right? When you stop pressing it, it goes back to stance 1... Can you suggest an easier way of making sure that if down isn't pressed then continue with all other animations as normal?

Offline

 

#10 2011-02-05 11:35:11

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Archmage's scroller template help?

The way I suggested is still the best way. I updated the original project to include ducking so you can check out the code in that project.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#11 2011-02-06 11:45:25

the_storm_of_stone
Scratcher
Registered: 2011-01-22
Posts: 24

Re: Archmage's scroller template help?

Oh, that's absolutely brilliant!  smile  Hah, shows what little I know.

Sorry to bother you so much, but I need my character to be able to die. How would I go about doing this so that the character would display an animation, then go back to the beginning of the level with one less life?

Thanks again  smile

Offline

 

#12 2011-02-06 14:01:10

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Archmage's scroller template help?

Well, health is already in the game, I just don't show it. So you first have to set up a stance for it (death), then create the condition (health<1) to activate the stance. At the end of the death stance animation you do something (like make a broadcast) to reset the game.

Again, I updated the original project to show this in action.

Here are some other things you should know:

-All stances are activated in the same area in the script
-The higher priority stances are located further down in the script
- the (if stance > 5) means that stances greater than 5 do not allow the player to move and stances above this cannot be overwitten before they finish

Last edited by archmage (2011-02-06 14:11:14)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#13 2011-02-19 10:41:43

the_storm_of_stone
Scratcher
Registered: 2011-01-22
Posts: 24

Re: Archmage's scroller template help?

Thanks a lot Archmage  smile  You've been really helpful.

Sorry I haven't been replying or anything; I couldn't get online.

Is there any way to add a y axis scroll too?

Offline

 

#14 2011-02-20 10:14:41

TVflea
Scratcher
Registered: 2010-08-14
Posts: 1000+

Re: Archmage's scroller template help?

it's the same with x only every things reversed.


-iNetMaster-'s not dead, get used to it. ! big_smile .
http://is.gd/YrQzXX

Offline

 

Board footer