brunopalermo's Forum Posts

  • You are setting the canvas size without adjusting the objects size.

    Also, it should only happen when you choose resolution from the dropdown list, but since you never added a "On selection change" condition it happens when entering the layout.

    Note this won't solve the issue, it will only make the change happen WHEN you change the dropdown list.

    Cheers.

  • One suggestion though, don't rely too much in fixed intervals. It's better to have an enemy fire when out of range, try to approach, check range again and fire if it's out of range or hit if it's on close combat range. Otherwise you risk havingan enemy attacking the air in close combat too far away from the player.

    On any attack animation ended {
     Player is on range {
     Attack in close combat;
     } Else {
     Fire a ranged attack;
     }
    }
    

    You can add a short idle time anywhere you see fit if you want it to pause sometimes.

    For instance:

    On any attack animation ended {
     Player is on range {
     Attack in close combat;
     } Else If random number < 0.3 {
     Wait 1 second;
     Fire a ranged attack;
     } Else {
     Fire a ranged attack;
     }
    }
    

    In this second example there's a probability the enemy will stop a while before firing.

  • In that case I would use a 3D array where X is the difficulty level, Y is the Enemy ID and Z is the Attribute.

    Example (in JSON format):

    {"c2array":true,"size":[3,2,3],"data":[
     [
     [50,150,10], [75,100,25]
     ],
     [
     [100,250,25],[150,150,50]
     ],
     [
     [200,350,50],[300,200,100]
     ]
    ]}
    

    Each line is a difficulty level (Easy(line 3), Normal(line 6) and Hard(line 9)).

    Each block in a line ([50,150,10] for instance) is an enemy. In this list there are 2 enemies.

    And each item in the block is an attributes (Let's say Life, Speed and Damage for this example)

    First enemy is weaker and causes less damage, but is faster than the second. In Easy difficulty, for instance Enemy 1 has 50 life, 150 speed and 10 damage, while Enemy 2 has 75 life, 100 speed and 25 damage.

    This way, when you create an enemy just access the values in the array for the corresponding difficulty and enemy using array.At(difficulty, enemyId, attributeId).

    Let's say the difficulty is HARD and you are spawning a Enemy of the second type. Its life would be enemiesArray.At(2, 1, 0), its speed would be enemiesArray.At(2, 1, 1) and its damage would be enemiesArray.At(2, 1, 2).

    Check this example. It will ask for the difficulty the first time and afterwards it would just use the one saved. It will also list the picked difficulty and the attributes for each enemy at each difficulty.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The easiest way is saving on the cloud (Dropbox, GDrive, etc) and granting access. You can do that from the save dialog in Construct 3. Or you can save the .c3p file locally and upload it to wherever you like.

    Cheers!

  • Hahahaha. Man. I just checked your Planetotron and it's awesome! Congrats!

    Cheers!

  • dop2000 always beats me to these stuff... You're too fast, man, let me solve some once in a while. LOL.

  • Hey Vanelloppe18!

    There's this course which, among other things, guides you on how to conceive new ideas for games. It's very basic, but it will help.

    It's not free, but if you click on my invite link (active until Aug 31st) you'll get US$ 5,00 in credits...

    Also, you can check this nice article.

    Hope this helps...

    Cheers!

  • Just a suggestion...

    If the only change between modes is the enemies' life and maxlife, I would drop the groups entirely.

    Just creat e lifeMultiplier variable and a difficultyLevel variable.

    When player chooses difficulty set the difficultyLevel to the corresponding valeue (0: easy, 1:normal, 2:hard). And when you create enemies just check the difficultyLevel and set their life and maxLife to the corresponding value.

    Ex.

    Enemy "On Create"{
    Enemy Set maxLife = (difficultyLevel = 0) ? 50 : (difficultyLevel = 1) ? 100 : 200;
    Enemy Set life = maxLife;
    }
    

    You'd have far less code in your project!

    Remember to save the chosen difficultyLevel to the local storage if you don't want players ahving to choose it every time they start the game.

    Hope this helps...

    Cheers!

  • Hi Nightwatch!

    This file has one way of doing it.

    I have an interval (which here is global, but could be different for each unit) and after that interval the unit chooses one of eight directions.

    Hope this helps...

    Cheers!

  • May you share a file? It's probably too specific, so it wuld help if I could take a look at the actual code.

  • If you mean changing, for instance, a Pin from "position only" to "position & angle" at runtime, I don't think that would be possible.

    Cheers!

  • Like Fengist said, it's hard to guess the problem without a code to check. But, it may be that you are asigning string values instead of numbers when trying to set the colors. If each array is a string, like "123,45,98", you must, first convert those to numbers using int(value).

    For instance if you have "123,45,98" as a value.

    Instead of using "set color" to

    rgbEx(array.At(x,y))

    You must get each of those and convert to integer. Something like this

    rgbEx(tokenat(array.At(x,y), 0, ","),tokenat(array.At(x,y), 2, ","),tokenat(array.At(x,y), 2, ","))

    Maybe the problem has nothing to do with this, but it's a guess since I have no access to you code.

    Cheers!

  • Hey Bl4ckSh33p!

    I just updated the file I uploaded before to work without the inputbox. Also, I included a function, so, you just have to call it and pass the text to copy as a parameter.

    In this example, you can left click each of the paragraphs to copy it.

    If you want to remove the confirmation window or want to change its text, just edit the Execute Javascript action and change or remove this part: alert(""Copied the text : ""+myTextBox.value);

    Hope this helps...

    Cheers!

  • Hey dop2000! Been away for a while. Too much work. lol.

  • Done. Just download the file again.

    Regarding the direction. If you're using bullet behavior, make sure the "set angle" setting is active.