MessMess's Forum Posts

  • Thanks for the other suggested solution.

    That's one of my favorite things about coding - there are almost always multiple ways to solve a problem.

    At the moment, I'm coding a puzzle game and actually coding it sometimes feels like I'm solving puzzles. :)

  • Really fun game.

    I got eaten by a snake. :)

    It reminded me of the branching adventure books I used to read and love as a kid.

    Congratulations on your success with it.

  • The above solution mostly worked, except the default tile movement controls let you hold down an arrow key and keep moving - which prevented the end of move action from triggering.

    So, I had to turn off the default controls and then add this:

    And, now, I think everything is working as I hoped.

  • Thanks everyone for your help so far, I think I finally figured out a pretty easy solution.

  • do you mean you want to move the tile background?

    and have a way of triggering next movements?

    Just explain game a bit and then i should be able to help.

    Radkampfwagen

    No, I don't want to move the tile background.

    I have a Sprite Object named "Player" with a TileMovement Behavior. I can then use the arrow keys to make him move. This works great.

    However, this will be a turn-based game, so I want to be able to limit the number of squares the player can move each turn.

    In addition, after each tile movement, I would like to be able to do some other tests.

    So, I just need someone to show more or link me to an example, where I can trigger an action after a TileMovment is complete.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the link. I'm still stuck though. I'm not sure why this is so confusing to me.

    I can't seem to figure out how to write the event and action that will trigger after a tile movement has occurred.

    Does anyone have any examples of this in action I can take a look at?

  • I just did a search and can't find anything on "GridTarget".

    It seems like there should be some action I can trigger, when a tile movement has taken place, but I can't find it.

    If I had that, then I could easily setup a variable to track how many times I've moved and, subsequently limit movement.

  • I have an idea for a turn based game using TileMovement.

    But, to do the idea I have I need to be able to limit the movement of player each turn and I also want to do an action after each movement.

    What's surprising me is when I look at the actions under TileMovement I see: "can move" and "is moving", but nothing for "has moved".

    What is the best/easiest way to:

    - Limit movement per turn?

    - Trigger an action after each movement?

    Tagged:

  • I just tested this with a few different prompts and it actually was kind of helpful (especially with easier questions).

    I could definitely see this helping beginners get started with their projects.

  • lionz, "Copy Picked" works perfectly and was super easy to do - thank you so much!

    fedca, Thank you for your suggestions too. Even though I don't think I need them for this specific problem, I will still look into those for my future needs.

  • Do you have a link I should look at for (polymorphism)? I've never even heard of this and I'm very curious.

    Does anyone have a link showing this passing of a UID in action?

    I've been searching, but I keep finding old examples that link to with old doc links (that are dead) or old dropbox examples that have long since been deleted.

  • Thanks, but I'm still not sure how to use ObjectTypeName in the Function. Here is the sample code:

    If I don't use the function (seen in this first shot) it references the correct object correctly:

    If I do use the function (seen in this second shot) it doesn't work:

    What I ultimately want to do is much more complicated than this one line function, so I definitely want to make the function work.

  • I'm trying to make a simple function that will let me show pop-up text when my mouse moves over an object.

    For this example, I have three objects: Blue, Green, and Red and they are all in the family PopUps.

    When MouseOver on the family PopUps is true it calls the function: PopUp

    Inside that function PopUp, I need to know which of the three objects the mouse over when the function was triggered and I'm not sure how to pass that information into the function.

    Thanks for any help.

    Tagged:

  • This community is so amazing!

    Thank you so much for the answer and then taking the extra time to write and share the sample code with me.

    It's the perfect solution to my problem.

  • I have an Object named "Player" with two behaviors TileMovement and Wrap.

    Moving "Player" around the screen works great. But, when he goes off one side of the screen, he has to be fully off before he will appear on the other side of the screen.

    So, it takes two arrow pushes to move him from one side of the screen to the other and I would like it to take one (as he goes off one side he should be appearing on the other).

    I realize I could write code to instantly move him from one side to the other, but then I would lose the animation that is happening as he moves from tile to tile (sliding off the screen and then onto the screen).

    Does anyone have an example or suggestion on how best to do what I would like to do?

    Update: Currently my tile size is 120 x 120 and my player object is 120 x 120. I just changed the player size to 119 x 119 and that will mostly solve my problem - it goes from one side to the other directly - it just doesn't animate it happening at the exact same time. If someone has a suggestion on how to do that, I would love to hear it.