Gmoney's Forum Posts

  • I would go for 'On Touch End' as well.

    Here's an example.

    https://www.dropbox.com/s/sxoqkckfz5dvc ... .capx?dl=0

    I've added Power; so that longer you hold, further the ball will travel.

    By the way, there's no built-in swipe action in C2. Please visit the following pages to learn more about how to make the swipe action or multi-touch working in C2

    how-do-i-add-touch-swipe-gestures_t165358.

    https://www.scirra.com/tutorials/4973/m ... t-controls

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow! Amazing work, heyguy! <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    Here's a modified example file.

    https://www.dropbox.com/s/sv1548ioge8r5 ... .capx?dl=0

    Player character no longer travels off screen, and it disembarks once the spline path travel ends.

    This is how I have fixed the issue

    1. I found obj_ziplineSpline had a bullet behavior enabled. I tried disabling the bullet behavior, and it stopped traveling to the right after reaching the last spline path.

    2. I unpinned both Player and Playerbox after waiting for 5 seconds and re-pinned Player to Playerbox.

    Again, amazing job, heyguy! <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    This is so far the best zip line,roller coaster, barrel and path finding move example I've ever seen. Great job!! <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

  • Oh, that's great!

    You're always welcome, dimitriosfl. (Thank you..!!)

  • I always give text objects some little more extra space for issues like those.

    Here's an example.

  • Check out this example file.

    If you pin this way, the object won't go out of sync. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    https://www.dropbox.com/s/z8zjgrq5om1j8 ... .capx?dl=0

  • You're welcome, dimitriosfl. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    I have created a new example with added features.

    1. Red UFO will give 1 point.

    2. Green UFO will give -1 point.

    3. Blue UFO will give -1 point.

    4. Player has less than 5 seconds to shoot down UFOs, because they'll disappear on their own after 4 to 5 seconds.

    https://www.dropbox.com/s/reh8j7g3xpvz1 ... .capx?dl=0

  • You're welcome, johnkx.

  • You're always welcome, Aquanex2. Please continue to ask anything when you need an assistance. I'll be there.

  • But i have managed to find a solution, Id post it but i cant simply paste onto here for some reason.

    Oh, ok. No problem. It's good to know that you've found a solution.

  • Hi.

    On start of layout i want to randomly spawn 1 out of 3 sprites, stay for random 5-10 seconds, then destroy it and instantly spawn again 1 of the 3 sprites an so on.

    I also want ONLY 1 of the 3 sprites to be on screen at any given time.

    Im sure its something very simple but i struggle for 3h now and getting no results.

    Thanks in advance. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Check this example game I made for you, dimitriosfl.

    https://www.dropbox.com/s/vr84dgx18m4fd ... .capx?dl=0

    This is what's happening in the game

    1. There are 3 UFOs; Red, Green and Blue.

    2. Only one of three are randomly spawned in every 3 to 5 seconds upon destruction.

    3. UFOs can be destroyed by Player's plasma projectile or when it goes out of the layout screen.

    4. When you press [Space], you'll be able to shoot a projectile to destroy UFOs.

    5. When a UFO gets hit by the Player's bullet, it will explode.

    6. Player can freely move around on the map but limited to the layout.

    7. Only one UFO will spawn per screen, and the next will spawn only when the previous one gets destroyed.

    Technical explanation

    1. Double click the UFO sprite.

    2. Notice there are 3 animation frames.

    3. Notice animation speed is set to 0.

    4. Frame #1 is Red, Frame #2 is Green and the last frame is Blue.

    5. Go to Event Sheet and look at Line 1.

    6. It says Set Frame - random(3).

    7. This means we're requesting Construct 2 to spawn a random UFO out of 3 possible choices. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

  • You're welcome, Scap. Also remember to check out server based game making (using Firebase) threads and tutorials for Construct 2 as well. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    how-do-i-link-multiplayer-with-firebase_t179538

    https://www.scirra.com/tutorials/5015/g ... h-firebase

  • I'm so sorry Gmoney! I've made a mistake! I wasn't very clear to begin with, my fault. So I'm making a retro pixel art game and the environments are made mostly entirely from tilemaps. I forgot the mention that and I thought that the code we'd brainstorm on here would probably be applicable as "On collision with Tilemap" somehow. Obviously, that's not the case here and would need entirely different code taking into account the tilemap . Sorry for your trouble <img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarrassed">!

    I guess I would need some sort of code that says Creature:On Collision with Tilemap and specifically checks if it's hitting the "side" of an individual tile on the tilemap? Is that something that's possible to do? I think I need to use some sort of bounding box expression to check if the player collides with side wall, yes? I just had a thought but I'm not sure if it'll work. Need to actually try it. I can give the creature an 8 way direction behavior(or platform behavior) and when the creature is left or right from a wall, mirror the animation?

    Oh, no problem at all, heyguy. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    Tilemap can be solid, so it won't be a problem using this code.

    I tested it with a tilemap based wall, and it seems to be working.

    But occasionally the bullet's bounce pattern broke and the object seemed to have bounced around with a mind of its own. <img src="{SMILIES_PATH}/icon_e_confused.gif" alt=":?" title="Confused">

    https://www.dropbox.com/s/x5rktv3kkbt4h ... .capx?dl=0

    I guess I would need some sort of code that says Creature:On Collision with Tilemap and specifically checks if it's hitting the "side" of an individual tile on the tilemap? Is that something that's possible to do? I think I need to use some sort of bounding box expression to check if the player collides with side wall, yes?

    Yes, that's possible 100%.

    Please look into the capx file I made above. The file has two tilemaps; Tilemap and Tilemap2.

    Notice the bounce is only affecting Tilemap2 as per events, meaning the ceiling and the floor can have Tilemap1 with a solid behavior.

    The objects will still bounce, but they'll only turn their faces around when they're hitting the side walls (Tilemap2).

    I can give the creature an 8 way direction behavior(or platform behavior) and when the creature is left or right from a wall, mirror the animation?

    I'll experiment with that as well, because bullet's unpredictable bounce is randomly breaking the bounce patterns.

  • I've tried using WebGL's 'Replace Color', 'Set color' and 'Adjust HSL' effects to change my game object's color settings, but found it's best to just use pre-made image files.

    Also, it seems you need to use an absolute color when modifying WebGL effects. <img src="{SMILIES_PATH}/icon_e_confused.gif" alt=":?" title="Confused">

    viewtopic.php?f=147&t=123505&p=878382

    viewtopic.php?f=146&t=76577&p=633697

    Here's my example on using pre-made image files to change my object's color.

    https://www.dropbox.com/s/bx6m0kg98mpo3 ... .capx?dl=0

  • Yes, because the Localstorage plugin will save data just the way how our usual save games are stored.

    However, if the data is saved locally, they'll disappear once user deletes cache. (I'm not sure if cache is the correct term, but locally saved game files always disappear whenever we go to web browser's privacy section to remove cache and other details.)

    That means the user will have to start from the beginning again, after the local files get wiped out.

    If the game is going to be an epic scale, I would recommend you to store the data remotely on a server, so users can access their saved data no matter what happens to their local save files.

    Setting up a remote save feature will need other things such as finding a good web hosting provider, setting up a database, handling configurations, etc.. though.

    And that's a.. completely different beast. <img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very Sad">

    https://www.scirra.com/tutorials/4839/c ... sql/page-1

    local-storage-through-mobile-browser_t165787

  • Fixed. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    Now the enemy objects can bounce off and face the correct direction without having to overlap the barriers.

    What I've done was, I've created another object named 'Player' and pinned 'obj_gravity' on it.

    (Oh, I picked a 'Position only' setting for the pin, by the way.)

    Then I made the obj_gravity to face the correct direction upon encountering a situation of 'between 90 and 270' or 'not between 90 and 270' -- of Bullet Angle of Motion.

    This was one tough one to resolve. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    https://www.dropbox.com/s/479t5rl9658vh ... .capx?dl=0