|
jumping
Sept 2, 2004 18:40:34 GMT -5
Post by Xenith on Sept 2, 2004 18:40:34 GMT -5
i know what you're thinking , you're thinking this is an only rpg site, but i am still talking about an rpg so there
i need to know how to make an rpg with jumping like alundra or terranigma and yes i'm talking about an 8 directional game not a side scroller so, any thought?
|
|
|
jumping
Sept 2, 2004 23:47:03 GMT -5
Post by dwmitch on Sept 2, 2004 23:47:03 GMT -5
Well, you could have a boolean that's false until the jump button is pressed, then have it keep track of each frame of the jumping sprite to reset it to false on the last frame (earlier if you want to add extras like the movement of the cloak, which wouldn't be back to its original position until you were on the ground).
For example, in the step event you could have something like:
if (keyboard_check(vk_space)) { keyboard_clear(vk_space); jump = true; }
if (jump) { if (image_index >= 12) { jump = false; } }
And then in collision events (a hole, in this example):
if (!jump) { if (!sprite_index == Player_Fall) { sprite_index = Player_Fall; } }
Then in the step event you would have the code to execute at the end of the fall animation.
Keep in mind this is all theory. The only thing I know for sure is the keyboard check portion of the code.
|
|
|
jumping
Sept 3, 2004 0:07:52 GMT -5
Post by Xenith on Sept 3, 2004 0:07:52 GMT -5
i know about that but i'm really talking about a 3-dimensional 2d game, where you can jump off a cliff or up on top of a table,
what i really need to know how to do is make it so i can jump on top of a table, like i can walk around it, then i can jump on top and i could fall off if you could help me do that i would be set to go
|
|
|
jumping
Sept 3, 2004 0:35:39 GMT -5
Post by dwmitch on Sept 3, 2004 0:35:39 GMT -5
It's the same principle. Maybe you could add a depth modifier variable so you could have an object that would keep you from walking through the table, but still be able to drop off. I don't have all of the details worked out, but if I get time I'll fix up an example and PM you the link.
|
|
|
jumping
Sept 13, 2004 1:32:14 GMT -5
Post by Xenith on Sept 13, 2004 1:32:14 GMT -5
i put this code in to make him stop when image_single = 22 but it doesn't work and i've discussed this already at too many sites so maybe i could send it to one of you so you could test it and fix it up for me
|
|
|
jumping
Nov 18, 2004 16:27:49 GMT -5
Post by ashpaine on Nov 18, 2004 16:27:49 GMT -5
Im looking at something similar in my engine set a depth variable for your character and each object,but keep this simple:: floor is 1 ,table is 2, bookcase is 3, cliff is 4,yada yah...
when walking height is 1; if jump raise height by 1. if you land on something set its height to current object.that way you can jump from platform to platform,or jump up rocks to a cliff.pretty simple way to do it yeah. this assumes a mostly top veiw art style.oh and you can scale your sprite based on height if you want.
is this what your talking about ?
|
|