Underdog's Forum Posts

  • Hi everyone,

    I was following the tutorial "Array for Beginners" by Ramones.

    https://www.scirra.com/tutorials/307/ar ... ers/page-3

    This tuto is old and uses Web Storage that has been replaced by Local Storage.

    I was able to save the array in the local storage but I can't load it!

    Here is what I have done:

    On saveArray Button clicked ---> LocalStorage ---> Set item "01" to animals.AsJSON

    On loadArray Button clicked ---> (Array) Animals ---> Load from JSON string "01"

    I was expecting the entry text that displays what is in your array be filled by the Array loaded?

    What should I do?

    Thank you for your help

  • Oh Shinkan, thank you so much. You can't imagine how much time you just saved me

  • Hi everyone,

    is there a way to automatically crop all frames of one animations?

    Crop is really useful but I wonder if we can automatize this action?

    Thank you

  • Hi guys,

    Probably, my question was to vague.

    I would like to add a Multiplayer Turn Based aspect in my game, like a Chess Game.

    I found this tutorial

    Multiplayer Tic-tac-toe [C2][Web2py(Python)][AJAX][Cross-domain]

    https://www.scirra.com/tutorials/1062/m ... ain/page-1

    However, I don't want to be real time. I would like the First Player does all his moves and then, posts it to the "WEB" so, other Players can try to beat it.

    Depending on the result, both Players will receive rewards.

    Which 1st step do you consider me to do?

    Which other tutorial do you think I should look at?

    My Multiplayer programming skill is almost null, so any tutorial references will help me a lot.

    Even a Step by Step to look at will help me.

    Thanks again

  • Hi guys,

    In my game, I would like to give the opportunity to the Players to create challenges that they can post on a server for other Players.

    Depending on their success, they earn XP - Currency and even Legendary Items.

    Do you know if we have a tutorial that could explain how to create a Map for example and post it for other players?

    It could be anything, non necessary a map. What I am looking for is how to share game content generated by players for other players.

    Is it possible with CS2?

    Thanks!

  • robertjs3

    It works with a variable that I set to 0 before it spawns the projectile and once the animation is finished, I set it back to 1.

    Thanks again guys!

  • Hey Robertjs3,

    nice idea Robertjs3

    In the capx, I did not use this approach.

    I used a boolean for the same purpose but on my main capx and it did not work neither.

    However, I will investigate because I may use it at the wrong place. Thank you, I will double check my events, you may point something I do wrong

    I'll keep you posted guys,

  • lmchucho

    Actually, it does not work for my mechanic.

    I need to keep "For Each" because I can have bigger enemies that overlap other enemies. Therefore, I use a variable that correspond to their Y position.

    Like that, my characters can shoot the correct enemy because they are on the same Y.

    I tried to remove for each and now, my characters shoot but their projectile pass through the enemy. Which is normal because they do not match their Y position anymore.

    If I remove the variable for the Y position, the projectile will hit the enemy that is not on the same line but can overlap the Y position.

    Anyway, I really believe that there is a bug because it does not make sense why "For Each" will impact the Spawning Event even if I put a Trigger Once.

  • Duh!

    Thank you lmchucho

    it works well indeed without "For each"

    I will become crazy, I don't know why when I tried at home without the event "For each" it only works for one unit.

    Now, it is working perfectly without it

    Thank you for your time

    Cheers

  • Hi everyone,

    I looked around hours and days but I don't know if I do wrong or if Construct 2 has a bug.

    I have several units of the same instance that spawn and need to shoot one projectile once an enemy reaches their range.

    When they do so, some units (not all) will shoot more than 1 projectile.

    This is really annoying because it breaks all balancing tweaks.

    Do you have any idea of what I am doing wrong?

    Here is a short Capx I made to focus on my issue.

    Thank you for your help. I don't know how to fix this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • UI, I meant UI object which is the term we use in video game for user interface such as health gauge, radar, icons.

  • Hi Zed2100,

    yes but my issue is that I have a lot of enemies and depending on the enemy spawned, I would like to display the UI close to the edge of the screen.

    Let's say that if enemy 03 is spawned first, I would like to have it close to the edge and not 3 spots away from the edge, leaving an empty spot between the UI of the enemy 03 and the ledge of the screen.

  • Hi guys,

    I can't find a way to create an object (UI) when an enemy is spawned and is not already in the array.

    The sentence looks a bit crazy to understand so let me explain.

    For each enemy of the same instance that is spawned, I would like to have only 1 UI object that is displayed.

    Each time there is an enemy spawned, I populate the array with the name of the enemy.

    At the moment, each time that an enemy is spawned, I generate 1 UI object for it.

    I just want to have 1 UI object of this enemy because I want to have a number that corresponds to the sum of the same enemies on the UI object.

    I want to keep an array because I would like to sort the UI.

    Thanks for your help!

  • Problem Description

    If several sprites play the same animation at the same moment, and at frame X, they need to spawn/create 1 object, they spawn twice the number of objects instead of one each.

    Attach a Capx

    For Each [Character]

    [Character] is playing animation "X"

    [Character] is animation "3"

    Tigger once

    then Character spawn Object

    It works fine if all [characters] do not play the same animation at the same time.

    If they are synch, each character will spawn as many object there are characters

    Steps to Reproduce Bug

    • Step 1 Create one character with one animation
    • Step 2 Spawn object at frame X
    • Step 3 Try to have several characters playing the same animation at the same time

    Observed Result

    ____ What happens? ____

    Expected Result

    ____ What do you expect to happen? ____ Each character should spawn one object

    Affected Browsers

    • Chrome: (YES/NO) YES
    • FireFox: (YES/NO) YES
    • Internet Explorer: (YES/NO) YES

    Operating System and Service Pack

    ____ Your operating system and service pack ____ windows 8

    Construct 2 Version ID

    ____ Exact version ID of Construct 2 you're using ____ version release 178

  • Colludium, oh my god!!!!

    Your way is the correct one

    I gave it a try and I realized that my way was way too much complicated after testing yours

    I never used "For Each (by ordered)" and I guess, I will use it more often now.

    Thank you Colludium, I'm really grateful for your help.