Jump system with animation.

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 83
This is my first post so I appologize if I'ts not clear. Ok the first thing we're gonna want to do is make 4 common event. 1 for each direction.

They should look something like this.
Spoiler for:
The only thing you will have to change in each event is jump. It will be +0,-2 for up, +2,+0 for right, +0,+2 for down, and -2,+0 for left.

Now that we have all 4 directions done we're gonna add 1 more common event. This event will be set to parallel process and you can name the switch whatever you like. I used activate jump system.

This event should look like this.
Spoiler for:

Now for the final event. This one you are gonna want to put on your starting map, and make sure it is set to parallel process.

The last one should look like this.
Spoiler for:

And thats it. I hope this was helpfull.  ;)

**
Rep: +0/-0Level 83
This is great. I'm inputting it right now. It really looks like it will work. How about a running system? Even though that's probably easy, I would love to see a tutorial for the noobies.

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
Common Event > parallel process > condition switch ON at the beginning of the game.
Conditional Branch > If Player holding [whatever button] DOWN > Then Move Route Player > Change Speed to like 5
Else > Move Route Player > Change Speed to normal.

Done. It's the easiest thing ever...

*
Rep: +0/-0Level 82
There is a problem with the jump. You can jump over some walls...


**
Rep:
Level 82
What's a personal text?
Quote
There is a problem with the jump. You can jump over some walls...

Easily solved, I think... If these nifty XP terrain types remain untouched. See, in the [Database > Tilesets] you can set your Tiles some 'Terrain Tags'. Most vehicle/transport systems out there use these to determine wether a vehicle can, or cannot, cross the terrain. We can use the same for jumping, and without scripts. Check your custom scripts (if being used) to find an unused value (likely all of them, if you're not using a custom script). Set it to all 'unjumpable' tiles, such as walls. Add these listed below to the wizard576's system.

Just set two variables (say, variable Player X and Player Y) with Player current coordinates. Now, depending on player direction (common event 'jump system' in wizard576's tutorial) change the respective X or Y axis variables (use the same values you're using for 'Jump', in this case, +0,-2 for up, +2,+0 for right, +0,+2 for down, and -2,+0 for left, being X horizon and Y vertical) to match the Player's route*.

*In this sense, if the Player is moving more than one 'square' Tile, we'll need to change the two variables more than once, to replicate it's move route (use the smaller value first). If this is the case, run the check below with all different values.

Next, use 'Set Event Location' to set 'This Event' to a variable-appointed position defined by the two previously set X and Y variables (common Events pop up everywhere, so nevermind that you can't select a map ID). Now set another 'Control Variables', for any unused variable, and set it 'Character: This Event' and it's 'Terrain Tag'... Starting to make sense?  ;)
Lastly, run a 'Conditional Branch' with possible exception to determine if the Terrain Tag (the variable we just set) matches an 'unjumpable' Tag (whose value we set at the start). Run it as 'Equal to ['unjumpable Terrain Tag']', and to Exit Event processing if it's a match. If ELSE, then do execute the 'Jump' movement.

The rather simple (but extensive) procedure above MUST be run BEFORE the Jump actually happens. Also, it's rather rough. You can add sounds and effects for eye-candy or extra features under the same principles.
We're basically trying to run a check of the space covered by 'Jump' to see if it is actually passable to prevent 'jumping through walls', in case you're wondering  :P.
And if there was any part far too messed up to comprehend, do private-message me  :-*.
« Last Edit: July 10, 2009, 02:34:54 AM by Fanblue »

**
Rep: +0/-0Level 82
clear tutorial dude... though i don't think I can follow fanblue...  ;8

***
Rep:
Level 82
Kidfox70. It happens.
just a sugestion. i made a jumping system like a while ago. instead of making all those common events you could just make it all in one. if you made your jumping system like this, you can just copy and paste it all into one, the jumping activation one. just copy the the up condition brach into the player facing up condition branch...so on and so on. this way theres only one common event to worry about and you have more room to work in your data base. but with that said nice job.

p.s. as to the terrain thing, some times when you use little things like flowers or little pebbles by the edge, lets say a stream, it lets the player to walk closer to that stream, and if your looking at it in a grid sense your more in a square and no longer at the top of the square and therefore can jump closer or over things. or at least that is one problem i've found. i made a stream and at some points my player could jump over it and at others the player couldn't jump over it. i realized what it was. again other than that Fan blue has it all down pack!
I don't say bless you when people sneeze, cause i'm not God. Blessing people is his job. Lolo?

**
Rep:
Level 83
clear tutorial dude... though i don't think I can follow fanblue...  ;8

Well, basically he is saying this:
1) Set two veriables: One is the X of the player, one is the Y of the player
2) Add or substract 2 from the X or the Y, so it will be at the place the player will land on
3) Check if that tile has NOT got a certain Terrain Tag by using veriables. (I suggest you store that Terrain Tag in a veriable too, so you can always change that Terrain Tag without having to edit it a thousand times).
4) If it hasn't got the Terrain Tag, let him jump.

I am going to make the common event one square, not two. That means I can set where the player can and can't jump over, and he can set where the player can and can't jump on. Maybe he meant to add or substract 1.