DrewMelton's Recent Forum Activity

  • Okay, so I just wanted to clean up my code a bit. I had some placeholder enemy sprites that I added to the enemy family and whatnot and was doing some testing with.

    I've since moved on to new sprites and left the old ones in just because they had some different code that I might want to reference.

    Well, I no longer need them, so I removed them from the family, deleted them from the object menu, and removed all code from the game that referenced them.

    But for some reason, the code won't work without them. There's an event that states when all the enemies are killed, that the player's turn comes back on (it's a turn based game). It works fine when there is one "new" enemy left, but with the new enemies gone, the game just doesn't do what it's supposed to.

    It works fine if I leave the old enemies in the game... even though they don't appear anywhere or have anything to do with anything.

    I just don't understand why the game won't let me get rid of them. Not a single event references them (I searched), the sprites are completely gone, the family is using just the new enemies and not the old ones. There's no reason for this!

    Please, does anyone have any ideas why this is before I smash my head through the monitor? I might be able to make a brand new family and replace all the code, but that's a lot of work. This isn't a small game. Besides, I don't want to run into this problem in the future.

  • I'm working on a party turn-based game with three heroes, and it's coming along quite well. Hopefully, I'll be able to post a screen shot in the next few weeks. I need to finish the character portraits and get some character and environment art done because I'm mostly using placeholders while I build the core mechanics.

    The HUD will be very much like Baldur's Gate, but the characters will handle more like Golden Axe 2d sprites. The environments will be isometric like a combination of both of those games.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes, it would be nice being able to select objects that are sort of hidden behind things or to be able to select a group of objects more easily.

    One of the following would be nice.

    1. Shift-selecting from objects menu as was just mentioned in this thread.

    2. Selecting all objects in a container.

    3. Selecting all objects in a layer.

    The only way I can do it now is have everything I need to select in one layer, and then draw a bow around them. Or if I just want one thing, I need to move stuff out of the way and then line them up again which can be tricky and time consuming.

  • Sweet, that's definitely a lot easier than the way I was doing it. Thanks! :)

  • Okay, so the game has multiple people on screen at once, and I need them to be in front or behind depending on where they are. Naturally, the higher it is on screen, the further back it would be. Lower objects would be towards the front.

    It's an isometric perspective sort of like Baldur's Gate or whatnot.

    Here is some code I wrote that works when 2 people overlap, but gets confused if 3 people overlap at once. So, it works half of the time.

    Basically, I don't want someone higher on screen to end up in front or someone lower on screen to end up behind someone. It breaks the perspective rules.

    Surely, there is a better way to do this.

  • I'm running into similar problems with my game. Even though my game is a bit different, the goal is the same, to have characters not just walk through each other when pathfinding.

    The problem is that I can get one person to go around the other, but it always screws over the other person.

    I've tried making them solid, which will cause someone to walk around them, but then they can't move at all.

    I tried custom obstacles being added, but I wasn't able to make any progress with that either. Maybe I should look into it more.

    I tried fooling with the path cost, but it didn't seem to do anything. Maybe I was doing it wrong though. I'm fairly new to pathfinding behaviors.

    The problem may be centered around the fact that all is well until the "path obstacle" moves. Regenerating the obstacle map is supposed to be resource intensive, and I don't know if it can be done with things are moving around.

    There are maybe a couple more tricks or workarounds I can play with. I'll try some more tonight.

  • I took a break and came back to it. I think I figured it out.

    I set up my end turn button so I could test it without moving the hero. I noticed that it tended to work better when I didn't move.

    So, I suspected the problem was that the character was still moving when the turn was set to the enemy's turn.

    So, I set up another condition that the hero's pathfinding speed had to be zero before the turn would switch over. This was actually in another part of the code, not in the picture above.

    It seems to work now. I'll keep testing it though since I still have a few things to work out with the overall code, but at least this is working as it should now.

    So, nevermind I guess. <img src="smileys/smiley17.gif" border="0" align="middle" />

  • Okay, so I'm having trouble getting the enemy to move to the target on his own.

    For testing purposes, I originally had it set up so he would move to position when I right clicked on the screen. It worked fine.

    Then, I tried to set it up so he would do it on his own. I am getting odd results.

    This is a turn based game. I want the enemy to move when his turn is active, which he does. It's just that he goes to weird places or stops halfway.

    Here is a screenshot of the problem code.

    Obviously, I would disable the code for right clicking so it doesn't interfere with my new code of him moving automatically. I just left everything un-disabled so you could read it better.

    Like I said, it works flawlessly when I right click, but always gives mixed results when automated. He just doesn't go to the right place or stops half way. I really don't know why and hope that someone with some programming knowledge may know.

    Also, I had to set up the auto code to a trigger once event or it wouldn't do anything.

    So, does anyone know how to fix it so it works automatically when it's the enemy's turn?

  • I like to use comments in other ways too. I use them to add notes and reminders, to mark temporary experiments that I might want to delete later, to remind me what variables are such as 1=yes or whatever. I might use them as a partial "to do" list so if I stop a project at night, I can come back to it and see what I was doing. I basically use them to help me keep a mental note of what each piece of code does so I can quickly scan things.

    The main goal with any project with lots of events is to make it as easy as possible to fix bugs or find what I need. It's hard enough fixing a bug in the first place. If it's buried somewhere, it can be even harder to fix.

  • Cool, thanks!

  • I'd like to have a company name or at least "something" that looks less boring than using my own name on games, but I don't know the best way to go about it. I don't hear people talk about it much.

  • I don't want to hijack this thread tough. Sorry DrewMelton

    Don't worry, it was just a quick discussion thread anyway. Ask away. :)

    Anyway, after some more experimenting, I'm probably going to stick with scale outer. At least for this game. It has slightly higher res pixel art, so I don't want to go with a lower res than around 720p. I may do some more experimenting though.

DrewMelton's avatar

DrewMelton

Member since 18 Oct, 2013

None one is following DrewMelton yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies