Infinipede's Forum Posts

  • 6 posts
  • Yes, that's what I meant. If it's still not working, either post the project, or you can add Browser.Log actions to log what's going on in the console. Log each function call and the params going in. You should be able to follow where the code is going.

    Logging it to the console did the trick, thank you! Turns out while trying to overhaul movement, one of the behaviors I changed caused an error with the monster object. Now it spawns everything including the placeholder image just fine. :)

  • Rather than using "Pick last created", it would be safer to have spawn() pass in the UID of the created object, and then "pick by UID" inside the function (and subsequent functions). Then you are guaranteed to have the right object.

    You don't show what else is in spritegen() but the previous chose() means it's 50/50 if the Breed=Weinerkorg.

    Would that be done by setting the return value to Monster.UID and pick by UID using that return value?

    and yeah, I considered that (I made a placeholder sprite and it's only a Weinerkorg) figured it wouldn't have broken the functions in the way I'm currently trying to fix. I changed it regardless.

  • SOLVED, thanks!

    So I somehow broke something when changing some functions last night and now everything I worked on is borked :(

    I have this code - a set of functions which create an instance of a Sprite object, Monster, which is in a container with an instance of StatMods, in its own dictionary object.

    Function "spawn" randomizes StatMods and sets some instance variables in Monster based on parameter 0.

    It then calls function "statinit" when applies the former values to the latter.

    This all worked wonderfully initially! I made an event sheet that inherited this one and made a button that called "spawn" with param0 as "Muddikorg", and it worked just fine.

    Then last night I must have changed something that ruined it. All I remember adding is this:

    (calling spritegen is at the end of statinit.)

    I looked at the c3 updates to see if anything there could have done this but I don't believe so.

    This is a huge downer for me so any help is appreciated!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks! This isn't working exactly how I'd like (the image mask seems to snap to the lines of the grid, rather than within the tiles themselves..?) I think I might be able to tweak it to my liking. I'll let you know how it goes.

  • From the Manual entry on Tile Movement it doesn't seem like diagonals are currently possible:

    https://www.construct.net/en/make-games/manuals/construct-3/behavior-reference/tile-movement

    You could make your own tile based movement using tween though. It would allow for diagonals

    Ah, that really sucks. It's odd that they wouldn't have that, given a lot of tile-based games nowadays allow for diagonal movement.

    I suppose I could try using tween though. How would you go about that? i did a bit of testing wrt moving the image itself and it uh, starting skipping around the map like a nutcase. moving 4+ tiles at a time.

  • So, I want my game to have 8-directional, tile-based movement, where each step is counted as part of a turn, and the characters move the length of a tile in a single movement. Think roguelikes like Tales of Maj'Eyal, or movement in tactical RPGs like Fire Emblem or the newer Shadowrun games.

    I've managed to do 4-direction tile & step based movement, and also partially finished the turn tracking aspect of it with variables.

    Unfortunately I'd REALLY like my characters to be able to move diagonally, and 8-directional movement behavior doesn't seem to play nice with tile/step movement.

    The other problem is my enemies need to be able to pathfind to the player in a tile-based environment, following the same rules as the player, and the pathfinding behavior also doesn't work nicely with tiles and steps.

    This seems like the kind of thing that someone would have solved already, though I know Construct isn't used as often to make this kind of game... searching through the forums I found nothing that helped me. Could anyone give me a hand with getting these types of movement working together?

  • 6 posts