dop2000's Forum Posts

  • See the official "Blend Modes" template, you can find it in C2 too.

    Put the scope and a large black sprite on a separate layer. Change the blend mode on the scope. Make sure to enable "Force own textures" on the layer.

  • To make certain traits more rare, all I've done is added more of the same options to the column

    I suggest using the probability tables feature of AdvancedRandom plugin. You can define multiple values with different weights. To make things easier, you can store the entire probability table as a JSON string in the array. I prefer adjusting the weights so that they all add up to 100%. For example:

    [[5,"Super-Abundant"],[20,"Abundant"],[20,"Rich"],[30,"Common"],[25,"Barren"]]
    

    Use AdvancedRandom.weighted expression to return a random value. In the example above, "Super-Abundant" option will have 5% chance to be picked.

    You can store such probability strings for each planet type.

    Although I would suggest using a JSON or multuple JSONs instead of the array. In many cases JSON is much more convenient to work with in C3. You can come up with a good structure which will be easy to read and update. It can be something like this:

    {
     "Ice": {
     "RichnessChances": [[5,"Super-Abundant"],[20,"Abundant"],[20,"Rich"],[30,"Common"],[25,"Barren"]],
     "HabitableChance": 10,
     "Resources": "ice,water,glass"
     },
     "Desert": {
     "RichnessChances": [[1,"Super-Abundant"],[10,"Abundant"],[20,"Rich"],[40,"Common"],[29,"Barren"]],
     "HabitableChance": 30,
     "Resources": "sand,iron,copper"
     }
    }
    
  • no insted of blury i want it to be dark black or black sorry for too much

    Just use a different effect, or cover the screen with black sprite.

  • I tried with the bullet... but the movement becomes random... sometimes it goes up a lot and sometimes the ball goes down... I want it to move at the same height, at the same distance, and at the same speed.

    On collision with the ground, set bullet speed to a fixed value and bullet angle of motion to 270 degrees. It will go up, then drop down again with gravity.

  • It's easy to do with Bullet behavior. Give it gravity and set "Bounce off solids=on".

  • What is "side scroller" behavior? I've never heard of it.

    Check that you are spawning projectiles on the correct layer with 100% parallax

  • With so many different conditions it's tricky to make such code work corectly. Also, OR-blocks in Construct are difficult to work with. I would suggest changing the entire thing like this:

    On every tick
    For Each Button 
    
    .. Local variable activate=0
    
    .. Player overlapping button
    .. OR Boulder overlapping button : Set activate to 1
    
    .. Enemies animation "IceGiant" NOT playing
    .. Enemies overlapping button : Set activate to 1
    
    
    .. Enemies animation "IceGiant" IS playing
    .. Button has LOS to Enemies : Set activate to 1
    
    
    // And now you check if the button should change its state
    .. Button is activated
    .. activate=0 : Button set activated to false, play sound
    
    .. Button is NOT activated
    .. activate=1 : Button set activated to true, play sound
    
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's because you are using the "Wait" action wrong and picking the same one instance! See my screenshot.

  • If you want to delete 5 sprites in the order from nearest to furthest with a small delay between them, try changing the code like this:

  • Is this loop nested under some parent event? You need to explain the task.

    The code you posted will destroy only one SpritesA instance at a time. Even if there are 100 sprite instances on the layout, the loop will repeat 101 times, but every time it will be picking the same single instance - closest to (0,0).

    Then after 0.07s delay it will destroy this one instance 101 times :)

  • Loading remotely is easier for for future edits because base game remains the same however if for web including the file in the project makes it harder to see then the effort would be worth it.

    If it's a web game and you have access to the server where it's hosted, you can simply update the json file, without re-uploading the entire game.

    Loading json from the same server should be more secure.

  • Press F12 in preview and check for error messages in Console tab.

  • No need to use an addon, there is now an official Cryptography plugin in C3.

    But 100% protection is still not possible, this will only make the job a bit more difficult for hackers.