/// code of the spawner/player Step Event: // check for any input var actionButton = keyboard_check_released(vk_space); // if any input is there, spawn a rocket if (actionButton == 1){
// spawn a rocket and give it an inital direction, angle and speed var rocket = instance_create_layer(x - 80, y - 95, "Instances", obj_Rocket_Vanilla); rocket.direction = 180-35; rocket.image_angle = 180-35; rocket.speed = 3;
} ////// code for the rocket Step event:
direction += 1.2 * sign( angle_difference( point_direction(x,y,obj_Enemy.x, obj_Enemy.y), direction)); image_angle = direction; /////// code for the rocket Collision with the target/enemy: // create explosion on impact instance_create_layer( x,y, "Instances_Effects", obj_Explosion); // destroy self instance_destroy(); // destroy the enemy/target instance_destroy(other.id);
How can I do this but have the missile keep going forward in one direction if it misses the target? I basically want only the missile's y coordinate to follow the target's y, while the x moves forward based on hspeed. That way if it misses it keeps going in one direction. Every single "follow" function uses both the x and y, so I can't figure out how to adjust them to only follow one of either. Thanks in advance, you seriously have the quickest and easiest tutorials around!
@@DrJurdenPeterbergsteinlerwitz I know it's game maker, although the functions he has seem completely different than my own, I have GM 2.3.4 , is this game maker studio?, how do they differ?
@@tylermaccallum3529 Oh, well... I didn't even realize he switched programs! It looks almost identical to Photoshop, except for the icon/logo. As for GM / GMS I am pretty sure they're the same. I've actually never heard of just GM. It's always been GMS for me. For his functions: 1upIndie often uses his own custom made functions/scripts. However, I didn't see any custom functions in this video. Which function are you talking about?
Hey 1up, can you make a tutorial on how to make the new move_and_collide function work with a tile layer and tile map created by code instead of in the room editor?
That sounds like fun from the guy shooting the missile, not so sure about the receiver though. I never actually played Gta online or the last iteration. Dunno, Rockstar games are not my cup of tea. I can't get into those games... The last one was Vice city and I only did stunts or go on a rampage and then quit out of boredom@@mrnobody7600
OMG!!!, I just discovered this channel. I LOVE GML!!.. wish I had have found this earlier.
Made my day, thank you sir.
Glad to hear you enjoy the content/engine. No need to be formal, we are all indie developers and on equal fooding.
这个正是我需要的,虽然我已经解决了这个问题。但是看了你的实现,我也有收获。
我很高兴您自己解决了这个问题,并且我仍然能够为您提供一些帮助。
/// code of the spawner/player Step Event:
// check for any input
var actionButton = keyboard_check_released(vk_space);
// if any input is there, spawn a rocket
if (actionButton == 1){
// spawn a rocket and give it an inital direction, angle and speed
var rocket = instance_create_layer(x - 80, y - 95, "Instances", obj_Rocket_Vanilla);
rocket.direction = 180-35;
rocket.image_angle = 180-35;
rocket.speed = 3;
}
////// code for the rocket Step event:
direction += 1.2 * sign( angle_difference( point_direction(x,y,obj_Enemy.x, obj_Enemy.y), direction));
image_angle = direction;
/////// code for the rocket Collision with the target/enemy:
// create explosion on impact
instance_create_layer( x,y, "Instances_Effects", obj_Explosion);
// destroy self
instance_destroy();
// destroy the enemy/target
instance_destroy(other.id);
Very cool tut!
Thanks mate! 2nd part incoming this week.
don't forget part 2! :P
I am not, it is incoming, I am just currently fixated on things that need my undevided attention.
Very cool! Will await for part 2
Imcoming, but there are other videos in the pipeline which need to be done before this one.
this is amazing
Nice video 1up.
Thanks for watching!
amazing!
A very easy and efficient solution, thank you!
You are more then welcome!
dude, i love you
Ehm, thanks mate!
How can I do this but have the missile keep going forward in one direction if it misses the target? I basically want only the missile's y coordinate to follow the target's y, while the x moves forward based on hspeed.
That way if it misses it keeps going in one direction. Every single "follow" function uses both the x and y, so I can't figure out how to adjust them to only follow one of either.
Thanks in advance, you seriously have the quickest and easiest tutorials around!
You mean a limited lock on for one target and once it misses if flyes away?
Basically yes@@1upIndie
Amazing, what program are you using for this tutorial though?
by that I mean , is it an odlre version of game maker.. ? your art features look way better then what i have lmao
@@tylermaccallum3529 It's GMS2 and it tells you the version top right on his screen.
@@DrJurdenPeterbergsteinlerwitz I know it's game maker, although the functions he has seem completely different than my own, I have GM 2.3.4 , is this game maker studio?, how do they differ?
@@DrJurdenPeterbergsteinlerwitz oh no sorry man, I meant at 3;40 when the program switches
@@tylermaccallum3529 Oh, well... I didn't even realize he switched programs! It looks almost identical to Photoshop, except for the icon/logo.
As for GM / GMS I am pretty sure they're the same. I've actually never heard of just GM. It's always been GMS for me. For his functions: 1upIndie often uses his own custom made functions/scripts. However, I didn't see any custom functions in this video. Which function are you talking about?
Hey 1up, can you make a tutorial on how to make the new move_and_collide function work with a tile layer and tile map created by code instead of in the room editor?
Hm, you mean for random/premade generation? That topic can be a simple 2 min to hours of video content.
@@1upIndiehaha yeah
i love you
Ehm, thanks!
maravilhoso
reminds me of metal slug
Are you crawling through my entire video catalog? Hope you find there what you are looking for (and thanks a lot for the trust in subbing).
@@1upIndie yes I am going through your vids for fun since you make cool stuff
Having ptsd from gta online rn
Hu? Not sure what you mean to be honest, please elaborate if you can.
@@1upIndie bro have you never played gta online? The moment you step into a public lobby you get targeted by a homing missile lol.
That sounds like fun from the guy shooting the missile, not so sure about the receiver though.
I never actually played Gta online or the last iteration. Dunno, Rockstar games are not my cup of tea. I can't get into those games... The last one was Vice city and I only did stunts or go on a rampage and then quit out of boredom@@mrnobody7600
"Promo sm" 🤭