npc

  1. T

    Need help stopping an NPC at the middle of a path

    So i've been following this tutorial on NPC paths : and successfully made the base obj as in the video. Here's the code(path related only): obj_NPCBase: <CREATE EVENT> //Path Target = instance_create(x,y,obj_target); Path = -1; <STEP EVENT> if(Path != -1){ dir =...
  2. S

    NPC Following Help

    Currently, I'm trying to have an NPC follow my current player character but am having difficulty implementing it. My code seems sound, but when I test it, the NPC simply stands still (but responds to other actions, such as implementing the text bubble that appears above their head). This code...
  3. Dr_Nomz

    Legacy GM Is it possible to save a path mid-way through? (Data Structure method)

    If I use a data structure (ds_map/list/grid) to save data, and an NPC is in the middle of a path, is it possible to save the position of the path the NPC is on, and then load it in WITH the NPC resuming it's path? I'm using path_position and path_start btw.
  4. C

    GMS 2 NPC object good practice

    Hi all! I'm quite new to this so I appreciate all feedback. I'm currently trying to figure out how to best approach having numerous NPCs with varying importance (more important -> more features), different dialogue, etc. I had originally thought to create one generic NPC object and create ini...
  5. TheRBZ

    Legacy GM [SOLVED] Object that follows in the Player's previous footsteps

    I've been looking through the manual to find a way to make an object follow the player while avoiding solid parts of the room, but I couldn't find a reliable way. The context here is I have an NPC that needs to follow the player. I thought about having the game remember the player's vsp...
  6. KyleRansford

    GMS 2 How Does the Instance Creation Code Work?

    I have objects like, Sign Posts, Chests, NPC's etc, that can all have different actions. Instead of having multiple objects of the same type (Heart Chest, 1up Chest, etc.). Can I use the Instance Creation Code (when you double click on an instance inside a room) to specify what I want in the...
  7. N

    Legacy GM Need tips for NPCs

    So in my game, I want to make NPCs that will walk around the town, but I want them to specifically stay in the town and not wander out of it. I also want to make them say something if you press near them (their text will be displayed with a dialog box at the bottom of the screen with an...
  8. Dr_Nomz

    GML Is it possible to have an NPC move away from/closer to an object? (mp_grid)

    I would like to make my NPCs be a few pixels from the walls, but closer to certain other ones based on their positioning using mp_grid, is this possible? Or can they not enter the grid at all if it has a wall object in it? Basically I'm asking how flexible I can make the grid system.
  9. Dr_Nomz

    GML [SOLVED] Could this cause a memory leak? (mp_grid_add_instance in Step event)

    So recently my NPCs were acting stupid by clearly ignoring an open door and trying to walk around it, or worse yet, walking THROUGH a closed door, since the above code was in the create event of the grid object. I fixed this just fine, but I want to ask this to make sure this won't cause...
  10. Dr_Nomz

    GML Good NPC path finding?

    EDIT: Using this guy's tutorial instead: But it doesn't move in a straight line when moving diagonally. Personally, though this code works "alright", I would really prefer a better system. Any suggestions?
  11. Dr_Nomz

    GML [SOLVED] NPC slightly phases through walls?

    I have a good path finding AI that allows an NPC to move pretty well: ///STEP if !place_meeting(x,y,obj_Character){ move_speed=5 mp_grid_path(global.grid,global.path,x,y,obj_Character.x,obj_Character.y,true) path_start(global.path,move_speed,"",true); if...
  12. Dr_Nomz

    GML How do I make the NPC move with this walking code? (TDS)

    So I have this walking code, which looks a little like this: ///create run_speed = 10; ///step if keyboard_check(ord("W")) { var i=run_speed; while !place_free(x,y-i) i--; y-=i; } if keyboard_check(ord("S")) { var i=run_speed; while !place_free(x,y+i) i--; y+=i; } if keyboard_check(ord("A")) {...
  13. Dr_Nomz

    GML I want to make NPCS - where to start?

    I'm finally ready to add some NPS to my game! :D Where do you recommend I look for good tutorials on this sort of thing? Because I'd like to experiment with a few different AI types (moving around, having particular behaviors based on certain conditions, attacking, etc.) and I need some...
  14. C

    GML NPC Cutscene?

    So I'm recreating Undertale for the sake of practice, but im changing it to the time chara fell down. Everything is going well so far and i fixed my last problem (i think) But now i want chara to walk into the second room, take a few steps, and then have a cutscene start where asriel starts...
  15. C

    How to Update Creation Code Variables (arrays) During Run Time

    Hello, I'm having trouble updating some variables for my npc's talk code. I set the data for the variables within the creation code so I can use one npc object for all the npc's in the game, but when I make certain changes, the variable won't update to reflect the change. Here's how it works...
  16. Gun_Goose

    GMS 2 Question about changing tiles overtime

    Hello, I am working on an RPG and I am using a tile system from collisions. I was planning on placing my collision tiles under the NPCs, so that I would not be able to walk through them. The problem is that I have several NPCs change location through the course of the game. Once my NPCs...
  17. Y

    the funniest about testing your game

    the funniest thing about testing your game is when you try die but your npc seem to avoid you
  18. E

    Graphics Adding character busts to NPC dialogues

    Hello, does anyone know how to add a character bust to a NPC's text box when they talk? It should look like a visual novel/like this: (I don't own this image) Thank you so much!
  19. D

    How do you make an NPC that turns at you Mother 3 style in GameMaker?

    So, recently me and my friend made a challenge where you make any kind of mechanism of Mother 3 in GameMaker, right? So, i have just got the idea of making that NPC mechanism where it will looked at you in any direction with an 8 directional sprite. And this is the part where i struggle a LOT...
  20. Turkish Coffee

    Legacy GM Before making huge rooms,

    Hi, I have a question about huge rooms. The thing I'm curious about is, if I have like 10k x 256 room for example, and I procedurally generate this room with creating ground objects, plants, parallax backgrounds, trees, NPCs with AIs that always do something, would that cause fps drops? It...
Top