I am making a ninja game for those of you who don't know. It's a 2d platform game and in this game I want my character to have a grappling hook (GH). The GH is going to model the grapple in the Tenchu game series, only a little different. The GH I want will lock on to predetermine spots on the level. The player will be able to select which one of these spot within his view by pressing left or right. Only the spots within the degrees of 35 and 85 will selectable. Once locked on the player will shoot the GH and it will reel him in just like in Tenchu or like Batman. Could anyone point me into the right direction? I've downloaded the double hook shot program but since it's not commented it is very confusing to dissect.
Hello guys! I'm New! -- I've been new for a year now...haha
I haven't played those games, do you mean like the hookshot in the Zelda series where the player wouldn't be affected by gravity while reeling in, or do you want it to be more realistic so the player starts to swing while reeling in?
Sort of like the Zelda hook shot but with a side view not the top down. The player would not be affected by gravity during that time. But if the player hit an obstacle or a enemy during the time he is being reeled in then the GH would be destroyed and he will have to try again.
Hello guys! I'm New! -- I've been new for a year now...haha
Peblo Custom ratings must be 50 characters or less
Registered 05/07/2002
Points 185
30th June, 2008 at 16:32:37 -
Oh, mine?
A simple way to do a reel in would be to have an active object (reel.active) that has a bouncy ball movement that always looks toward the hook. Then when reeling in, set the reel.active to the player position once, turn a flag on that makes the player stay with the reel.active, and it'll have the same effect.
OR you have to use a bunch of math.
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath
Well in that case you can do it the "easy" way. The most efficent way would be to use trigonometry, but I'm not to good with trig, though I know there's some good articles on it.
You can do it with the ball movement too, but that could get buggy since you have to switch between platform and ball movement. You're best off using the trig.
Okay I don't like the ball movement Idea. And then again I don't know trig at all. I found the Trig formula that I needed in the article that you provided me. Are there any other documents that will help me along?
Hello guys! I'm New! -- I've been new for a year now...haha
Even with the explanation of what GH was I still kept reading it as "guitar hero". Which reminds me, does the UK have guitar hero? Is it the same setlist? Anywho, on topic... Logig, depending on the style of game, Chansey made this really AWESOME chain engine that would be good for grappling hooks. It's not the actual hookshot, but it would make a cool looking chain. Ever play Goof Troop for the SNES? It's like that one attack the final boss does. It evenly distributes chain links between two spots. It's awesome. If you can't find it, I could upload the code... But I guess that's off topic.
so what you mean is when the player has the lock on with the GH then to set the vertical value to a number to make him go up? That sounds like it could work but I want the player to be automatically reeled in. Sorry for not stating that. I'm using the platform object so what i am thinking is that I can pause the movement of the player and then position him 5px closer to the GH location, relative to himself course.
I am having trouble with the Lock on points for my Grappling Hook. I'm using the advance math object to get the angle of each lock on point compared to my player. I have it so that when the player is within a certain angle of the lock on point that it will turn on an internal flag. The problem is that when i do this all of my points flags are turning on and off at the same time. I know this is more of an object handling issue but for some reason it's not working. I set at the start of frame to Spread the value (ID) to all of the lock on points but MMF2 still toggles the flag at the same time.
Hello guys! I'm New! -- I've been new for a year now...haha
I have a Lock Point Object. This the the object that the player's crosshair will lock onto if the lock point is at a certain angle from the player (30-80 Degrees)
Each of these Lock Point objects has an internal flag that will turn on and off depending on the angle
Once the Player goes into the Grappling hook mode they will be able to select which Lock Point they will hook on to.
Here lies my current problem. When I press left I have the cross hair chooses it's target going to the left subtracting from a Lock Point ID value. and When I press right I do the reverse. If the Value goes below zero I just set the number to 1 but when I try to go the opposite way I have no number to refer to as the number of lock points will change in each level. So does anyone know how to grab the last number of a spreaded value? **Note** This spreaded value changes depending on when I enter the grapple mode. so a simple Number("Lock Points") will not do.
Hello guys! I'm New! -- I've been new for a year now...haha
So basically your not looking for the last number. you just add until you pass the amount of points. but the trick is that when you select one that is not available to instantly add the number to skip it. going all the way through until you get back to the beginning. Sweet thanks a lot Sketchy
Hello guys! I'm New! -- I've been new for a year now...haha
I'd say use Marvel Forever's method and make your own custom. Here's the thing you'd need to do though. Make sure that Gravity has its own grouping in the events. Then when the GH is over a background and the button is pressed, instead of using Y position, make a custom movement specifically for the grappling hook activate, and turn off the gravity group until the GH action is complete to assist in the creation of such a movement. Make the character look at the grappling hook and move towards it when the button is pressed and hook is over the background. That way you get both Y and X movement and it should swing him against the wall and reel him up.
Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?
I'm currently trying to figure out how to get it to swing. I think I'm going to need some sin/cosine and distance math for that. And I don't know how to do either, so expect a question from me soon.
Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?
Actually, i have a tutorial somwhere on my pc. I may have gotten it from here, but then i got bout everything available on here (almost everything). If i cant find the original tutorial link then i'll upload it maybe this weekend or next monday.
All platforming problems can be mostly solved here: