Game Maker Studio 2 Easy Grappling Hook Tutorial
Вставка
- Опубліковано 27 сер 2017
- Thank you for watching & have fun learning!
Full source code and courses www.codingmadesimple.com/
Follow me on twitter for updates / realtutsgml
Let's create a very simple yet very fun and effective grappling hook system in your own video game. If you have any questions or errors in your project feel free to comment and let me know! I will try to answer everybodys questions.
• Game Maker Studio 2 Ea...
I apologize to my headphone users, I've had trouble with the audio in both ears. This issue will definitely be fixed next tutorial. Enjoy!
Oddly enough I can hear in both sides just fine when I lower the volume. My headphones are really weird and will usually do the opposite.
RealTutsGML info comes through loud and clear. Worry about speakers when you do a dynamic audio tutorial !🤣 excellent tut btw
but my left ear really enjoyed this
Wondering if you could make a tutorial that covers a grappling hook that works like a pendulum.
So you can swing from side to side to get momentum for when you release the mouse button, like a rope.
It would also be neat if you could make a followup to this, that fixes some of the issues currently present.
With the system as it forks for now, you can draw a line through objects, which for testing purposes is fine, but would be better, if you had a sort of "Line of sight" system.
You can also draw lines a good 10 or so pixels away from the actual solid objects. This looks odd and is of course not intentional. But a fix for this would also be appreciated ;)
You can also literally pull yourself through other objects and essentially be stuck inside...
Thanks a lot for the tutorial though ;)
my left ear enjoyed the video =) thumbs up
i actually love you. one of the best tutorials for rope swinging
Good timing! I sketched up a character that will have a grappling hook mechanic just the other day and was going to be my next project. Thanks man!
Perfect for my spiderteen game! thank you!
THE PERFECT TUTORIAL !!! Thanks
Just played Silver Grapple and I wanted to make a game with a grappling hook, this video helps a lot.
Not really
Abu Gbak You can modify the code to be better
Very cool, my dude!
WOW!!! Really cool!!!
Great tutorial! I noticed a small little bug though. If you grapple to a block and keep holding down the left mouse button to remain grappled: If you descend and collide with a surface that cannot be grappled, the player will bounce back up. Not sure if that's what you intended but I figured I would point it out. :)
I would love to see a great platformer tutorial from you!
Did you ever figure out how to fix this?
i think i figured out the issue.
if(active){
gravity = 0.1;
x += (mx - x) * 0.1;
y += (my - y) * 0.1;
}
For this part of the code the plus(+) and equal(=) signs became switched when i entered it. After switching it back around to y+= instead of y=+ it fixed itself.
Maybe that was the issue you encountered?
Thanks for the tutorial. was Brilliant. Would you be able to do a tutorial for a grapple swing. For example My character is running, then jumps off edge, Grapple hook shoots out at 45 degrees and the character swings at the momentum he was running. But doesn't retract.
Thanks again.
4 years later and now this is OUR code.
It was an awesome tutorial but i used a different collision and it works fine but when after i grapple once the charter would glitch into the platforms and only my and then my controls would not work
thank you for gamemaker video
great video! but i want to use a sprite for the rope, so i can add an endcap sprite, if there is a tutorial out there, please can you tell me what to search for
Hear that ladies? I'm a stud. ;)
lol
how would you translate this system into more of a hook shot type thing? The player fires an object and then once the object collides, the player is pulled to the object.
Superb Tutorial! it save me a weekend of time! Wondering if you could make make a tutorial for hookshot or claw shot like the one in legend of zelda in 2d. It would make an awesome platformer. reply please. :)
can you please make a video on moving platforms and by players should be able to select a platform and move so the character can move along that will be really great and if possible using this grapple can we shoot
Can't we draw a line which changes it's shape according to the position of player w.r.t (mx, my)?
I was wondering how to code a friction based platformer. Where your player is sliding to stop and making slanted platforms that he slides down even when he isn't moving?
Small problem, my character falls though the floor and cancels out the collisions for the platforms. how do i fix that?
So I came to this after I did the movement of shaun spaldings tutorial and kinda mixed the two, for some rease the grapple entirely ignorest my collisions, PLEASE HELP.
hmm... interesting time to come out LOL!
the fact this guy made a platformer engine in 7 minutes
I'm such a stud
Not sure if this will even be answered, but for some reason when I tried this, my character ignores collision with the world around it and the grappling hook is applied but the character falls.
i have the message
"unexpected syntax error"
at 11:18 at the end of the tutorial someone has an idea please ?
I've been trying to figure out how to make a similar mechanic for a while, but rather than having the player hang from a string, I intended to have the hook hit the wall and stop moving, at which point the main character starts heading towards the hook and the hook disappears when touched by the player, resulting in the player falling back down. To do this, I have the objects oGrapplinghook, oWall and oPlayer. This is the code I used for Ograpplinghook:
IN THE CREATE EVENT:
global.contact=0
IN THE STEP EVENT:
if global.contact=1 {
oGrapplinghook.speed=0;
}
if place_meeting(x,y,oWall) {
global.contact=1;
}
if place_meeting (x,y,oPlayer) and place_meeting(x,y,oWall) {
global.contact=2;
}
if global.contact=2 {
instance_destroy(oGrapplinghook);
}
...and for Oplayer, I used this code:
IN THE CREATE EVENT:
global.contact=0;
IN THE STEP EVENT:
if global.contact=1 {
oPlayer.speed=60;
oPlayer.direction=point_direction(x,y,oGrapplinghook.x,oGrapplinghook.y);
}
if global.contact=2 {
oPlayer.speed=0
}
However, for whatever reason, when oGrapplinghook hits a wall, it doesn't stop as soon as it gets there, but rather travels most of the way through the wall and then stops, at which point it's followed by oPlayer which does the same thing. Could anyone tell me why this is?
how would i make it as a pickup item?
Is this game maker and what programming language are you using? Awesome video
This is Game Maker Studio 2 using GML (Game Makers scripting language) Thank you!
Does it work in the old version of GameMaker like 1.4.
Yes it does!
dude can help me? i write the colition code, and when i try it the player falls and pass through the bloqs, and i check everyting of the tuto and i find no clue (X . X) what it can be? please help
sorry my bad i didnt put solid mass XD
I wish you could explain more... I have no idea what place_meeting is or the creation code for rooms are. Next tutorial please explain more for beginners please.
Great suggestion, I'll make sure to cover these topics better in my future tutorials
my right ear has been left out of this experiance
somebody please explain 11:25 in depth. I don't understand it.
Ok, how about creating a grapple object and by pressing a certain button, it hooks to the nearest grapple object
you could have global variables like global.hookspot (where the hook attaches) and then just have the player move towards global.hookspot but this is just a theory
I already found a solution look at my project: ua-cam.com/video/6lKEoKx0UPc/v-deo.html
how about a dashing mechanic?
I would really like to see how to make the player bunnyhop
arent u that guy who participated in jonas' wowie game jam
Can you translate it in gamemaker 1.4 just for some reason please
Coding and gml basically didn't change. A few functions did, and a few were added, but it's mostly the same. Should work for 1.x.
link is broken
11:47 "fasten" lol...
Can you make that in java
Andrija Adamovic Balkan? And yes, you can.
Oops didn't see it there lol
This isn't working for gms 1...
Plz help
7;46
You are a gennius
sorry, i´m portuguese
welp
im gonna make a game, Where you have a Grappling hook, But if you Hit it on a Red Block, It Bonces off, And Can Squish your player
Its cool, but not really a grappling hook. When i think of grappling hooks, i think of spider man. Looks cool though, might use it in the future with some tweaking. I like it, but its not really grappling hook imo.
attack on titan
That is the exact reason I'm watching this
Very cool, my dude!