Added: 11 months ago
From: MegaUltraSuperDude
Views: 3,618
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (61)

Sign In or Sign Up now to post a comment!
  • can you make this as an drag and drop tutorial ??? :D

  • @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.

  • please help me!

    I have gamemaker lite, and my shot only goes right!

    Thats all, great tutorial btw.

  • @rickchardet01 Make sure this is in the Global Left Mouse event:

    if canshoot<0{ canshoot=5 shot=instance_create(x,y,obj_s­hot) shot.direction=image_index shot.image_index=image_index shot.speed=16

    }

    If all of that is in there the shot should move properly.

  • what dose the shot. thing do

    

  • @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.

  • I have any error issue for global mouse its line 3 shot=instance_create(x,y,obj_s­hot).

  • @ObasStan Was does the error report say is wrong with that line?

  • @MegaUltraSuperDude Never mind ERROR in action number 1

    of Collision Event with object health object

    for object object0:

  • Could I make levels? If so how?

  • @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 Thanks a lot. One more thing, could you please tell me how I could make the enemies explode when they die?

  • @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_explo­sion)" for the code. Change "obj_explosion" to whatever your explosion object was called.

  • when the amo reaches zero I still continue to fire and it shows a negative number on top. Otherwise it works great!

  • @LegoStarAnimations never mind, I got it fixed XD

  • it wont shoot it just lays on the background

  • @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_s­hot) 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.

  • hey old man sorry man you got laptop too cool men nc XD

  • @roycezkent What.

  • it says: Unknown variable ammo

  • @abcbadpassword Did you remember to put the control object in the room?

  • Tooooo sloooooow. (sarcastic :p)

  • 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 I would recommend watching the video again with annotations turned on, specifically at around 1:30.

  • @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.

  • Thanks for the tut. now I'm ready for LUDUM DARE

  • @TheControllerkid Ludum Dare, eh? Cool! I hope it goes well for you.

    Maybe I should try something like that sometime...

  • @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

  • sorry, didnt have global left mouse, dont worry about me

  • the shot object is only created when i click directly on the player object

  • so i fixed that now when i start the game it is expecting a ) what should i do plz help

  • @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.

  • the counter clockwise thing didnt work for me :( can you help?

  • I can make without watching dis VD!

  • 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.

    Also I did use global mouse button.

  • Comment removed

  • Comment removed

  • hey how would i play sounds in code? like is it something like, Play_sound? help please

  • @Paralyzer1000 sound_play(sound)

  • Comment removed

  • Comment removed

  • This helped me a LOT. Thanks bro =)

  • And thw whole vid works perfectly :D

    Subscribed

  • hey the image_angle variable works for me. Even though i have Game Maker 8.1 Lite :D

  • Best tutorial iv ever seen..

    keep it bro thanks

  • Good tutorial! Although at certain parts you went REALLY fast, it was a great tutorial.

  • @TheCromeGnome Thanks for the feedback! I'll try to slow down a bit if I make another.

  • 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 I appreciate the nice comment. Feel free to ask questions if you want more information.

    Sorry for taking so long to reply.

  • @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 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.

  • if you walking next to the wall shoot the enemy's at the other side than at you???

    really nic tut...

  • @groenvoetbal Sorry, I don't understand what you're trying to say.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more