Pages: 1 2
Topic closed
Hi guys, I'm making an Adventure game for my friend who has returned to the internet.
He loves cows, so I decided to make him a CowAdventure game. The basic idea of it will be a cow escapes from a boring old farm, and gets trapped in adventure. The things I need helping with (by helping I mean recommending what scripts to use) these things:
- How to make a sprite Jump
- How to make it have health (i know this has something to do with variables) and lose it if it falls off the platforms
-How to make it land on platforms that are above the ground instead of going past them
-How to make backgrounds move along as the cow progresses, so it's more of a big background than the usual size (but you only see part of it until you get to the end of the bit you can see)
Please help, will be much appreciated =]
Offline
To make it scroll, try this: Learn Scrolling Now!.
To make it jump, download any platformer and search the scripts. Here's one: Cube Guy 2 - Wrong Dimension
To give it health, change the variable by -1 every time something bad happens, such as touching the color red or falling onto the bottom of the screen.
To work the platforms, click the second link; it'll tell you how as well.
Hope that helped!
Offline
Hmm... try this link: SuperSprite CastleSiege!
Look at SuperSprite's scripts for the one that makes him jump.
Offline
Look at scripts 12 and 13... they work together. Number 12 controls the falling, and number 13 controls the jumping. Try the project as well.
Offline
Ahh found it. Thanks alot mate! thats 2 things covered =]
Had a look at you're projects btw, they are awesome.
So do you know how the platforms work? Do I look at one of yours?
Offline
Oh and also, with the jump thingy, what I've got to jump is:
When Uparrow Pressed
if background of stage = 1
if touching colour white
repeat10
change y by 6
Thats for uparrow to jump, then for right arrow to go right i have
When rightarrow pressed
point in direction 90
if on edge bounce
change x by 10
Now when I press Up and Right, it only goes up but not across and up?
Offline
JaredxD wrote:
So do you know how the platforms work? Do I look at one of yours?
No, because it's not the right style.
Just download any classic platformer and examine the scripts! Here's a brief explanation:
Every platform has a specific color coating on the top.
The playing sprite has a color on their feet.
The player continuously falls if their feet are not on a platform.
The player will not fall if the feet color is touching the platform color.
..........................................
I'm not good at explaining this stuff, but hopefully it helps.
Offline
Hi last thing!, I have made a sprite to scroll, like it says (in ur scrolling project), the scripts the same as the one's you have there(for the scroll script), that all works n stuff, but how do I actually get the main sprite that moves around the scenes to move on from where you can see? it just runs into the wall and doesn't go further? do I need to do something to the sprite that's moving? Or do I need to do something with the background? Please help xD
Last edited by JaredxD (2009-11-17 01:46:23)
Offline
JaredxD wrote:
Thanks a mega-ton Chris!! That's helped alot and it is now working!
Lol I am in you're debt. =]
Forget the debt; I was glad to help.
Offline
JaredxD wrote:
Hi last thing!, I have made a sprite to scroll, like it says (in ur scrolling project), the scripts the same as the one's you have there(for the scroll script), that all works n stuff, but how do I actually get the main sprite that moves around the scenes to move on from where you can see? it just runs into the wall and doesn't go further? do I need to do something to the sprite that's moving? Or do I need to do something with the background? Please help xD
Hmm... I'm a bit confused. If the sprite changes its X Position, delete the script. Otherwise it'll smack into the wall, and it won't scroll properly.
A scroller works by having the sprite remain stationary, and the platforms move by as you push the left and right arrow keys. Change the ScrollX rather than its X.
Sorry if I didn't explain it well; I'm not so sure what happened. Maybe you could word it differently?
Offline
Ok, the scripts to move left and right for the sprite that moves along backgrounds is:
When Left Arrow Pressed
Point in Direction -90
Move 12 steps
When Right Arrow Pressed
Point in direction 90
move 12 steps.
The ones for the scroller are the same as you'rs, but Im not sure what I need for the sprite that jumps and all to move along from where you can see,
Offline
JaredxD wrote:
Ok, the scripts to move left and right for the sprite that moves along backgrounds is:
When Left Arrow Pressed
Point in Direction -90
Move 12 steps
When Right Arrow Pressed
Point in direction 90
move 12 steps.
The ones for the scroller are the same as you'rs, but Im not sure what I need for the sprite that jumps and all to move along from where you can see,
Delete the player's scripts. The only thing you need is the background to move; the player stays stationary except for jumping (and falling), which is along the Y axis.
Offline
JaredxD wrote:
So how do I make the background move?
Extend the scrolling sprites so they look like full backgrounds.
JaredxD wrote:
And whenever I press green flag my stage moving script disappears?
You delete the scripts for the player. All it should be able to do is move up and down, while the sprites scroll around him; it gives the illusion of actual moving.
Offline
I don't understand... I deleted the scripts for the player, but the scroll sprite still disappears when I press green flag
And I've made the scroll sprite real big, but how Do I actually get the background to move?
Last edited by JaredxD (2009-11-18 02:19:34)
Offline
The background should be moving to always be moving to (variable name)x and y. (think this is how it works) This variable changes whenever you press left and right, giving the illusion of moving. Really all that is happening is the background is moving with you. Check out Archmage's projects for an example of this. Have you tried setting the variables to 0 first and moving the main sprite to that position?
Examples:
http://archblogger.wordpress.com/2008/11/06/make-a-game-like-super-mario-world-demo/
http://scratch.mit.edu/projects/archmage/635312 http://scratch.mit.edu/projects/archmage/145760
Last edited by fullwall (2009-11-18 03:47:25)
Offline
Topic closed
Pages: 1 2