else's Forum Posts

  • That does help! Thanks very much indeed.

    EDIT: Actually, it seems I can't use integers as keys in a dictionary... Perhaps I could do it with an array instead?

  • I'm trying to randomise certain words within dialogue so they will change each time the text object is displayed. As an example, a character might say:

    "I'm a (carpenter/smith/doctor) from the (city/coast/mountains)."

    One of the words in brackets will be randomly chosen each time.

    I can think of a couple of long-winded workarounds to achieve this but I'm wondering whether there's a quick and easy way that I'm overlooking. Ideally, I guess I would like to be able to set a global variable to a random bit of text in the same way that it can be set to a random number. So I could have a variable called 'occupation' and set it to something like this: choose(carpenter,smith,doctor). Then I could reset it each time after use. I know that exact way doesn't work but maybe there's a similar function?

    Thanks in advance for any help.

  • Thanks so much! After posting, I figured out the 'mouse x and y every tick' method but your second suggestion is much smoother and more elegant. Much appreciated.

  • I have a sprite which plays its default animation correctly when I place it in the layout but when I set this sprite as the mouse cursor it isn't animated. I must be overlooking something...

    Thanks in advance for any advice.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Many thanks! Yann and retrodue - your tips worked great. I restored it from the backup file in the end. Excal - I've learned a valuable lesson!

  • In the middle of creating an entry for Ludum Dare, everything was going well. Then without warning I get this message (linked below) informing me of a failure to open the project. I had changed nothing since being able to open it perfectly previously. I've tried restarting everything. Can anyone please advise me if there is a way to salvage my work?!

    imgur.com/cchFI1y

  • That's great! Thanks very much.

  • I'm sure this is embarrassingly obvious but I can't work out how to check if the player has typed a particular word (like in a spelling game). Do I have to do it key by key? I'd like to have a large selection of words that can be randomly displayed one by one on the screen and the player then has to type them within a time limit.

    All advice greatly appreciated.

  • It's okay - I figured it out! I just set a variable to player.angle when the key was pressed then had the facing set to that variable while the key was held down.

  • I'm sure I must be overlooking a simple way of doing this. I'm making a top-down shooter with 8-way movement but I'd like for the player to be able to use a particular key to lock the facing. In other words, when they are holding down that key they will still be able to move as normal but their facing will be locked at the angle it was when they pressed the key, effectively strafing.

    Any help would be greatly appreciated.

  • Perfect! That worked just right. Many thanks

  • Another real beginner's question...

    I'm trying to arrange it so that when a player is hit by a bullet his death animation plays but it's driving me mad because it only ever plays the first frame. I have it set so that on collision with the bullet, the bullet will be destroyed, the controls disabled and the player's animation set to 'death' (a sequence of five frames) but only the first frame of this animation ever plays.

    What could I be doing wrong?

  • Thanks so much! I feel a bit silly now for failing to see that - I actually used a similar timer for something else yesterday...

    These forums are great for a beginner like me. I really appreciate such helpful and prompt feedback.

  • I'm making a very simple arm-wrestling minigame as part of something larger and I've got it working fairly well. It's just a case of speed-tapping the space bar to win. The opponents score increases all the time but I'd like for it to increase much faster if the space bar hasn't been touched for a couple of seconds. What the simplest way of doing this (essentially, detecting that a key hasn't been pressed for x amount of time)?

  • Thank you both! That's exactly what I needed to know.