RayKi's Recent Forum Activity

  • Hello everyone, how are you today?

    In the game I'm currently developing there's this enemy that shoots projectiles upwards, and it's apparently working fine. The character keeps his idle animation until the player is on sight, then the character changes to the shooting animation and at a certain frame of the animation the upward projectile is created.

    However in this new stage I'm building I set a bridge for the player to cross, and under it I placed a lot of this enemies that shoots upwards. And as a result, some of them notice the player at the same time, start the animation at the same time, but the projectiles however are not created for every instance of the enemy.

    So, is there something wrong in my code? or is there a limit for the amount of objects that can be created at the same time? Or is there any kind of limitation in construct2 when it comes to comparing several frames of several objects? Anyone knows anything about that?

    Thank you very much for your attention

  • Give the locations and the objects different IDs. Just add a variable to the object with the name ID or any other thing like that.

    Base your spawns and locations on the ID's you gave your objects.

  • Looks awesome

  • Really beautiful =0

  • There's a behavior called LOS, or Line of sight. Check some tutorials about this, it'll help you a LOT to do this game

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Unless they're running from the right to the left, on which case the camera should follow the one with the least X value

  • Instead of following the nearest, Just compare the x of both character every tick, and set the position of the camera to whatever character has the biggest X value

  • Well, you can do that in two different ways.

    If the player is overlapping the object you can compare player coordinates with the object coordinates and with this determine if the player is by the side of the object or above it or whatever.

    However doing this requires a lot of testing and your game my get little buggy depending on the size of the sprites and speed they're moving.

    The other way is to create invisible and objects and attach them to the visible object. Note that these invisible objects should be smaller than the first one, and they should be at least 1 or 2 pixels beyond the are of the visible one.

    So you will check the player collisions to the invisible objects instead of the visible one. If the player collides with the invisible object attached to the left side of the visible one... then the player is colliding on the left.

    This will make your codding easier and the game will run smoothly and with less bugs, whoever creating too many objects on a single layout will slow down your game performance

  • You can set the max and min value of the slide bar to whatever value you want, so set the min value to -20 or -30 I don't know exactly, and the maximum to the same thing.

    Not that 0 is the original volume of the sound or song you're playing so set 0 to the maximum of the slide bar depending on what you want to do.

    If you play a song on the start of every layout, a song will be played every time you change layouts, but this doesn't mean the song that was playing previously will stop.

    To avoid to songs playing at once, on the start of the layout, on the same condition that you start playing the song, create a event to stop playing the song that was playing previously.

    Just because the song is mute doesn't mean it's not playing.

  • Well, to make the arrows work a replaced the "on tap gesture" condition with the "is touching", and it work just fine.

    Now for the double tap scale rate, it's not working at first because every tick you set the scale of the object to the size set on the slide bar, so when the object is resized due the double tap it always go back to the slide bar size.

    However when I disabled the every tick code line it still didn't work because for some reason the double tap is not changing the value of your variable.

    Sorry for not being able to help any further

  • Create a variable with the amount of time you want it to last.

    Create a function that every tick will subtract a value from this variable.

    I suggest you to subtract to this variable the value of " 1*dt "

    dt means Delta Time and it will make the game subtract 1 every second independent of the player's computer frame rate.

    Now create a condition that when the variable value hits 0 will call the function "go to layout" if you want to change layouts, "set group active" if you want an specifically part of your code to be executed, or whatever other event that you want to happen as soon as the count down reaches 0.

    If you want the count down to appear on the screen use a text object and set to every tick to chance it text to the value f the variable.

  • 1st create a variable with initial value of 0.

    As soon as the player collects the key set the value of this variable to 1.

    At the event that opens the door add a new condition to check the value of variable.

    For instance:

    Player on collision with door || Go to Layout

    Variable = 1 ||

RayKi's avatar

RayKi

Member since 25 Feb, 2014

Twitter
RayKi has 98 followers

Connect with RayKi

Trophy Case

  • 10-Year Club
  • x5
    Popular Game One of your games has over 1,000 players
  • x3
    Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

15/44
How to earn trophies