Xavier's Recent Forum Activity

  • You can easily solve this by adding and inverting the audio condition: is tag playing. You will need to assign a tag to the audio, for instance call it music1. You need to add this tag on the action that plays the audio and on this condition. That way if the audio with this tag is already playing, it won't start it again.

    You can learn more about the audio object and tags here: https://www.scirra.com/manual/109/audio

  • Take a look at these threads, maybe they can help you:

  • Instance variables would be one way: https://www.scirra.com/manual/73/instance-variables

  • Make sure the tiles are not set to global in the object properties. Otherwise the problem might be in your events if you are creating the tiles manually.

  • You probably need to add the "trigger once while true" condition, otherwise it keeps repeating this event every tick and picking a random instance every time.

  • You need to use the action Simulate Control instead of changing the angle.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The game already has movement behaviors, that's why I asked. Did you try those? Specially the 8 Direction behavior. You can simulate the controls with whatever keys you want.

    Are you using the latest version of C2? Does that error happens with all browsers? It doesn't happen to me.

  • Is there a reason why you are using your own method for the movement?

    About the animations, the problem is that you are setting the animation to neutral every tick with an event inside the MeMovement group. This probably worked before because you had the events arranged in a different order, but since you have this one first, it takes priority over the events that control the other animations. If you don't want to change the order, just create a condition on the neutral event that says "if keyboard key D isn't down" and repeat this condition for each movement key.

    For the bullet, you need to create an instance variable on the character (call it player_angle for instance), and when you push a key to change direction, change that variable to the right angle (if you push D, set the angle to 0, if you push S set the angle to 90...). Then after you spawn the PBullet, change it's angle to the player_angle instance variable.

  • Yeah, Else seems to work. Instead of the onOffToggle = 1 use and else condition.

  • I've run into this problem a few times, I think basically both events are run at the same tick so the switch is turned on and off instantly. A quick solution is to add a wait action of 0.01 before changing the variable.

    It's also important to check the "Static" box for the local variable if you use local variables for this, otherwise the value is resetting every tick.

  • Yes. You need to use the random() expression, you would use it like this: round(random(2,4))

    The round expression will round a number, so if you get 4.2, it will show 4. More on: https://www.scirra.com/tutorials/77/nat ... onstruct-2

    You should create an action at layout start to set the instance variable for the blocks to round(random(2,4))

    Modify the numbers as you see fit.

  • Maybe you can find something useful here:

Xavier's avatar

Xavier

Member since 16 Dec, 2011

Twitter
Xavier has 7 followers

Trophy Case

  • 13-Year Club
  • x2
    Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies