dop2000's Forum Posts

  • Add all your sounds to the project with names like Sound1, Sound2, Sound3, .... Sound10

    Create a global variable SoundNumber.

    On Sprite Clicked 
    	If SoundNumber=10 : Set SoundNumber to 1
    	Else 	: Add 1 to SoundNumber
    
    	: Audio stop tag "mysound"
    	: Audio play "Sound"&SoundNumber with tag "mysound" 
    
  • Does the API key ever change? If not, store it in the php script, don't send it.

    Otherwise, you need to encrypt it:

    construct.net/en/make-games/addons/257/forge-c3-runtimeworkers

  • I believe both these addons only support runtime 2. You need to switch your project to Construct 2 runtime, in project properties under Advanced tab.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to set button animation frame in event #8.

    I have a good demo on how to save game settings (including sound on/off) in Local Storage, take a look:

    howtoconstructdemos.com/easily-save-multiple-values-in-local-storage

  • If you have questions about regex, you will have much better chances to get an answer on stackoverflow. Not many people here know regex.

  • Reset Global Variables will reset all global variables in the entire project, even in not-included event sheets. If you want to preserve some value after the reset, there are a couple of ways to do this -

    • you can make a static local variable in an event group. Static local variables are not reset.
    • you can create an instance variable on a global object (array for example), or create a dummy object (empty sprite) and set it as global
    • store it in an array or dictionary
    • save in Local Storage
  • Generate a hash in the app and send it to the script with your other data. In the script, generate the same hash and compare if both hashes match. If they don't match, don't execute the rest of the script.

    CBHash plugin (link to C3 version on the last page):

    construct.net/en/forum/extending-construct-2/addons-29/plugincb-hash-md5-sha-1-sha-39765

    Make sure to use the same hashing function in the php, if you don't know how, try searching on stackoverflow.

    .

    Example:

    You want to send player score to the server. In the app generate a hash MD5(secret_key & score)

    Send to the PHP two values: score, hash.

    In the PHP script, also generate a hash MD5(secret_key & score_received)

    Compare if generated_hash is the same as received_hash.

    Of course, the secret_key should be same in your app and in the PHP script, don't share it anywhere and don't send it with the data.

  • Also, you don't need that airspace sprite, you can use "Is Overlapping at offset" condition. Try something like this:

    On every tick
     Bird X>Nest.BBoxLeft 
    	: Bird simulate moving Up
    
     Else
     Bird Overlapping Ground at offset X=16 
    	: Bird simulate moving Right
    
     Else
    	: Bird simulate moving Down
    
  • Check "Timeout" property on Particles object. If Timeout=1 second, add "Wait 1 second" before creating a new ball.

  • Use projectversion expression.

  • Tags is the only way to do it. Play music with "music" tag, play all other sounds with "other" tag. When you need to stop all sounds, stop "other" tag.

  • You do not have permission to view this post

  • Are both bullets on the same layer? Maybe one is on a layer with a different scale and that's why it's moving faster?

    You need to upload the project to any file sharing service - google drive, dropbox, mega.nz etc.

  • I don't see any issues in the code. And you have an event that destroys the bullet if its speed >400, so bullets can not travel faster.

    Try running the project in debug mode, when second bullet is spawned, pause the game and compare both bullet instances - check that they are on the same layer, compare their speed etc. Maybe you'll find the problem.

    If this doesn't help, please share your project file. You can remove everything non-essential from it.

  • Yeah, it's a bug on the forum. You can insert the image if you edit your own comment. Or use Imgur.