@THEovstis Sure, I could make a drag and drop version. It might be a bit tricky since I haven't used drag and drop in ages, but I'll get started on it soon.
@MrTed334 Essentially, using "shot." in front of things allows other objects to change the variables of a shot object. Normally "direction=image_angle" in the player object would make the player's direction become the player's image_angle, but when you change it to "shot.direction=image_angle" now the *shot's* direction becomes the player's image_angle.
Sorry, that's the simplest way I can think of explaining it.
@TheFailedMinecrafter Yeah, it's pretty simple. Each room is essentially a level. Add new rooms to create new levels, and arrange them in the order you want when finished.
You need some way to achieve victory and move on. There could be an object that moves on to the next room when you touch it. For this make an object, add a collision event with the player object then put "room_goto_next()" in code for the action.
I hope this helps. Feel free to ask if you have more questions.
@TheFailedMinecrafter The simplest way is to make an explosion sprite and object. For best results the explosion sprite should be animated. Set the explosion object's sprite to the explosion sprite.
Give the explosion object an "Animation end" event, with "instance_destroy()" for the code. Add a "Destroy" event to the enemy object with "instance_create(x,y,obj_explosion)" for the code. Change "obj_explosion" to whatever your explosion object was called.
what the fuck!?! i have made all of this and when i tested the game it said that it will only work in pro edition.... thanks alot asshole. No its my fold, sorry its not your fold you dont write its only pro edition
@inthebox1212 He actually did mention in the video that a certain part of the code was for pro edition only, so please don't go around calling people ass holes for things that they didn't do.
@Freeminecraft000 Find the line of code that the error report mentions, locate the spot where a bracket is missing and add one in. There should be a ")" for every "(". For example, "instance_destroy(" would need ")" added on the end. I hope you understand what I'm trying to say.
Sorry to keep bugging you but i got another, how can i keep the same amount of health and ammo upon switching rooms? Like lets say I have 50 ammo. When I switch rooms it goes back to 100. How can I make the health and ammo carry on from the last room? Thanks its greatly appreciated
@Paralyzer1000 Remove the ammo and health setting lines from the control object, and make a new object that sets health and ammo. Place this new object in only the first room.
Hey another question, two actually. Im putting views in my rooms so the camera follows the player but the ammo and health stays at the top of the room. So the only way to see it is to run to the top. Can I make it follow with my character? And can I change the color of the text? Or does it need to stay black? Subscribed btw.
@Paralyzer1000 When using views extra variables are needed to draw things correctly: "view_xview[view number]" and "view_yview[vn]" give the view's position, "view_wview[vn]" and "view_hview[vn]" give the view's width and height. Try to figure out how to use these to position things correctly.
Use "draw_set_color(colour)" before drawing to change the colour. Use things like "c_red", "c_blue", etc. You can use customised colours, but there's not enough room to explain that here.
This almost works for me, I got the guy to be able to move around and look at the mouse and everything, but when I try to make him shoot, it does nothing. Please help me! (I have gamemaker Lite btw.)
@Th4Pwnz0r Did you make sure to have a Global Left Mouse Button event, rather than just a Left Mouse Button one? The Global event occurs when you click anywhere on the screen, while the other one only occurs when you click on the object, so this could be your problem.
If this isn't the issue, reply, and I'll try to figure out what else could have gone wrong.
@MegaUltraSuperDude Thanks for the help, but I got it already, I was playing around a bit and jsut used circle bullets because lines were being weird.
Although, I will have MANY questions. I have not finished watching this video, yet, but I will because I'm going to watch this step by step and add the information to my game. ^_^
Also, I'll subscribe now. :3
I really hope to see more helpful videos like this, thanks. ~Zach
@ZachX888 It should be fairly easy to add limited ammo to an enemy if you look at the ammo stuff that was done for the player. Set the ammo in the enemy's create event. Before an enemy fires a shot check to see if it has any ammo left, and make it lose ammo when it fires.
For the walls thing, have a collision_line thing for each wall. For example, the line could be "if collision_line(...,obj_wall,...)<0 and collision_line(...,obj_wall2,...)<0{".
can you make this as an drag and drop tutorial ??? :D
THEovstis 6 days ago
@THEovstis Sure, I could make a drag and drop version. It might be a bit tricky since I haven't used drag and drop in ages, but I'll get started on it soon.
MegaUltraSuperDude 6 days ago
please help me!
I have gamemaker lite, and my shot only goes right!
Thats all, great tutorial btw.
rickchardet01 1 week ago
@rickchardet01 Make sure this is in the Global Left Mouse event:
if canshoot<0{ canshoot=5 shot=instance_create(x,y,obj_shot) shot.direction=image_index shot.image_index=image_index shot.speed=16
}
If all of that is in there the shot should move properly.
MegaUltraSuperDude 6 days ago
what dose the shot. thing do
MrTed334 1 week ago
@MrTed334 Essentially, using "shot." in front of things allows other objects to change the variables of a shot object. Normally "direction=image_angle" in the player object would make the player's direction become the player's image_angle, but when you change it to "shot.direction=image_angle" now the *shot's* direction becomes the player's image_angle.
Sorry, that's the simplest way I can think of explaining it.
MegaUltraSuperDude 6 days ago
I have any error issue for global mouse its line 3 shot=instance_create(x,y,obj_shot).
ObasStan 2 weeks ago
@ObasStan Was does the error report say is wrong with that line?
MegaUltraSuperDude 2 weeks ago
@MegaUltraSuperDude Never mind ERROR in action number 1
of Collision Event with object health object
for object object0:
ObasStan 2 weeks ago
Could I make levels? If so how?
TheFailedMinecrafter 3 weeks ago
@TheFailedMinecrafter Yeah, it's pretty simple. Each room is essentially a level. Add new rooms to create new levels, and arrange them in the order you want when finished.
You need some way to achieve victory and move on. There could be an object that moves on to the next room when you touch it. For this make an object, add a collision event with the player object then put "room_goto_next()" in code for the action.
I hope this helps. Feel free to ask if you have more questions.
MegaUltraSuperDude 3 weeks ago
@MegaUltraSuperDude Thanks a lot. One more thing, could you please tell me how I could make the enemies explode when they die?
TheFailedMinecrafter 3 weeks ago
@TheFailedMinecrafter The simplest way is to make an explosion sprite and object. For best results the explosion sprite should be animated. Set the explosion object's sprite to the explosion sprite.
Give the explosion object an "Animation end" event, with "instance_destroy()" for the code. Add a "Destroy" event to the enemy object with "instance_create(x,y,obj_explosion)" for the code. Change "obj_explosion" to whatever your explosion object was called.
MegaUltraSuperDude 2 weeks ago
when the amo reaches zero I still continue to fire and it shows a negative number on top. Otherwise it works great!
LegoStarAnimations 1 month ago
@LegoStarAnimations never mind, I got it fixed XD
LegoStarAnimations 1 month ago
it wont shoot it just lays on the background
nchurc4324 1 month ago
@nchurc4324 As seen at 2:30 in the video:
Make sure the Global Left Mouse Button event has this code in it:
if canshoot<0 { canshoot=5 shot=instance_create(x,y,obj_shot) shot.direction=image_angle shot.image_angle=image_angle shot.speed=16
}
The shot speed (shot.speed=?) must be higher than 0 for it to move.
MegaUltraSuperDude 1 month ago
hey old man sorry man you got laptop too cool men nc XD
roycezkent 1 month ago
@roycezkent What.
MegaUltraSuperDude 1 month ago
it says: Unknown variable ammo
abcbadpassword 1 month ago
@abcbadpassword Did you remember to put the control object in the room?
MegaUltraSuperDude 1 month ago
Tooooo sloooooow. (sarcastic :p)
Avizura 1 month ago
what the fuck!?! i have made all of this and when i tested the game it said that it will only work in pro edition.... thanks alot asshole. No its my fold, sorry its not your fold you dont write its only pro edition
inthebox1212 2 months ago
@inthebox1212 I would recommend watching the video again with annotations turned on, specifically at around 1:30.
MegaUltraSuperDude 2 months ago
@inthebox1212 He actually did mention in the video that a certain part of the code was for pro edition only, so please don't go around calling people ass holes for things that they didn't do.
Deathbringer3557 1 month ago
Thanks for the tut. now I'm ready for LUDUM DARE
TheControllerkid 2 months ago
@TheControllerkid Ludum Dare, eh? Cool! I hope it goes well for you.
Maybe I should try something like that sometime...
MegaUltraSuperDude 2 months ago
@MegaUltraSuperDude i'm doing ludum dare right now the theme for the game is alone and i have 48 hours to do it. love your vids
TheControllerkid 2 months ago
sorry, didnt have global left mouse, dont worry about me
ShamanzSanctum 2 months ago
the shot object is only created when i click directly on the player object
ShamanzSanctum 2 months ago
so i fixed that now when i start the game it is expecting a ) what should i do plz help
Freeminecraft000 3 months ago
@Freeminecraft000 Find the line of code that the error report mentions, locate the spot where a bracket is missing and add one in. There should be a ")" for every "(". For example, "instance_destroy(" would need ")" added on the end. I hope you understand what I'm trying to say.
MegaUltraSuperDude 2 months ago
the counter clockwise thing didnt work for me :( can you help?
Freeminecraft000 3 months ago
I can make without watching dis VD!
sukkel352 3 months ago
Sorry to keep bugging you but i got another, how can i keep the same amount of health and ammo upon switching rooms? Like lets say I have 50 ammo. When I switch rooms it goes back to 100. How can I make the health and ammo carry on from the last room? Thanks its greatly appreciated
Paralyzer1000 3 months ago
@Paralyzer1000 Remove the ammo and health setting lines from the control object, and make a new object that sets health and ammo. Place this new object in only the first room.
MegaUltraSuperDude 2 months ago
Hey another question, two actually. Im putting views in my rooms so the camera follows the player but the ammo and health stays at the top of the room. So the only way to see it is to run to the top. Can I make it follow with my character? And can I change the color of the text? Or does it need to stay black? Subscribed btw.
Paralyzer1000 3 months ago
@Paralyzer1000 When using views extra variables are needed to draw things correctly: "view_xview[view number]" and "view_yview[vn]" give the view's position, "view_wview[vn]" and "view_hview[vn]" give the view's width and height. Try to figure out how to use these to position things correctly.
Use "draw_set_color(colour)" before drawing to change the colour. Use things like "c_red", "c_blue", etc. You can use customised colours, but there's not enough room to explain that here.
MegaUltraSuperDude 3 months ago
This almost works for me, I got the guy to be able to move around and look at the mouse and everything, but when I try to make him shoot, it does nothing. Please help me! (I have gamemaker Lite btw.)
Th4Pwnz0r 4 months ago in playlist Th4Pwnz0r's favourites
@Th4Pwnz0r Did you make sure to have a Global Left Mouse Button event, rather than just a Left Mouse Button one? The Global event occurs when you click anywhere on the screen, while the other one only occurs when you click on the object, so this could be your problem.
If this isn't the issue, reply, and I'll try to figure out what else could have gone wrong.
MegaUltraSuperDude 3 months ago
@MegaUltraSuperDude Thanks for the help, but I got it already, I was playing around a bit and jsut used circle bullets because lines were being weird.
Also I did use global mouse button.
Th4Pwnz0r 3 months ago
Comment removed
Th4Pwnz0r 4 months ago in playlist Th4Pwnz0r's favourites
Comment removed
Th4Pwnz0r 4 months ago
hey how would i play sounds in code? like is it something like, Play_sound? help please
Paralyzer1000 4 months ago
@Paralyzer1000 sound_play(sound)
MegaUltraSuperDude 4 months ago
@MegaUltraSuperDude thanks
Paralyzer1000 4 months ago
Comment removed
Paralyzer1000 4 months ago
Comment removed
Paralyzer1000 4 months ago
This helped me a LOT. Thanks bro =)
deltroid1 4 months ago
And thw whole vid works perfectly :D
Subscribed
ResurrectedNation 4 months ago
hey the image_angle variable works for me. Even though i have Game Maker 8.1 Lite :D
ResurrectedNation 4 months ago
Best tutorial iv ever seen..
keep it bro thanks
xGameMakerTutorx 5 months ago
Good tutorial! Although at certain parts you went REALLY fast, it was a great tutorial.
TheCromeGnome 5 months ago
@TheCromeGnome Thanks for the feedback! I'll try to slow down a bit if I make another.
MegaUltraSuperDude 4 months ago
You are like the best guy ever. :D
I'll make that game I've been wanting t make now.
Although, I will have MANY questions. I have not finished watching this video, yet, but I will because I'm going to watch this step by step and add the information to my game. ^_^
Also, I'll subscribe now. :3
I really hope to see more helpful videos like this, thanks. ~Zach
ZachX888 5 months ago
@ZachX888 I appreciate the nice comment. Feel free to ask questions if you want more information.
Sorry for taking so long to reply.
MegaUltraSuperDude 4 months ago
@MegaUltraSuperDude Oh no problem at all man! =D
This helped out SO much...
And if I want an enemy to like, say, run out of ammo, and not see me through more than 1 wall, how would I do this?
ZachX888 4 months ago
@ZachX888 It should be fairly easy to add limited ammo to an enemy if you look at the ammo stuff that was done for the player. Set the ammo in the enemy's create event. Before an enemy fires a shot check to see if it has any ammo left, and make it lose ammo when it fires.
For the walls thing, have a collision_line thing for each wall. For example, the line could be "if collision_line(...,obj_wall,...)<0 and collision_line(...,obj_wall2,...)<0{".
I hope this works and is understandable.
MegaUltraSuperDude 4 months ago
if you walking next to the wall shoot the enemy's at the other side than at you???
really nic tut...
groenvoetbal 6 months ago
@groenvoetbal Sorry, I don't understand what you're trying to say.
MegaUltraSuperDude 6 months ago