dop2000's Forum Posts

  • Did you buy a game template (source project file), or an exported (compiled) game?

    If you have a project file, you need Construct software to open it and change images.

  • Wait 0 is to wait one tick. Objects are pasted at the end of the tick, so you can't save the image immediately after pasting..

  • You can put a DrawingCanvas object in that position and paste all objects onto it. To scale down the image, you need to move it to a sprite:

    DrawingCanvas paste everything..
    Wait 0
    DrawingCanvas save image
    Wait for the previous action to complete
    Sprite load image from URL: DrawingCanvas.SavedImageURL
    

    If you want this image to be accessible on another layout, you will need to set Sprite object as global. Or save image in one layout and load it into sprite in another, but I'm not sure it will work.

  • Set bullet angle of motion to angle(object.x, object.y, touch.x, touch.y)

    .

    Or you can set "Set angle=yes" in Bullet properties and use action "Object Set angle towards position (touch.x, touch.y)"

  • It may be a bug, try logging a bug report:

    github.com/Scirra/Construct-3-bugs/issues

  • There may be a hundred different reasons why this happens.

    Check the events where this variable is used, make sure you are not dividing by zero, not running infinite loops etc. Run the project on computer, check browser console for errors. If nothing helps, consider posting your project file here.

  • If you run the game in debug mode and check variables, you will see why.

    The MVarVolume becomes "-Infinity" at the lowest setting. You can change the formula to prevent this from happening:

    max(log10(unlerp(MusicSliderBack.ImagePointX("start"),MusicSliderBack.ImagePointX("end"), MusicSlider.x))*20, -100)

  • Here you go:

    dropbox.com/s/c8k4lbkpnacd18b/UnsuranceCapx_2.capx

    I fixed your loader layout and music slider, you can do the same with the effects slider.

    EDIT: I changed a few events in AudioSliders, please re-download the file.

  • "for each instance" may not be bad if you don't have too many instances and not running this event on every tick.

    Generally, try to avoid events that are not triggered, i.e. run on every tick.

    Break your code into separate event sheets and groups. (EDIT: Sorry, didn't notice that you've already done this). Don't include unnecessary event sheets. For example, in your game layout don't include an event sheet from the main menu layout.

    Use Inspector in debug mode to identify which sheets/groups are using most CPU. Try temporarily disabling big parts of your code and see if this improves CPU usage. When you find most CPU-hungry events, rewrite them.

  • The order of events in your project is not right..

    Here is how I usually do this:

    In the loader layout (Titles) you need to wait for "Loader layout complete" event before doing anything else.

    When this event is triggered, I read all game settings from Local Storage. Instead of storing each value separately, I put them all in a dictionary, see this simple demo. After loading the dictionary, you can extract values to variables, if you want, see this screenshot.

    When settings are loaded (or not exist and default settings are used), only then I set audio volumes and start playing music.

    You don't need to load settings again, so don't do this on start of every layout.

  • Ashley I'm reading this tutorial on loader layouts in C3, and it says:

    Is this true? Is it possible that loader layout may sometimes be skipped in mobile apps and web games?

    I often use loader layouts to read data from local storage, request files with AJAX and decide which layout to load next. If loader layout is skipped, this will break my games...

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think it's an outdated information. It also says loader layout is not shown in mobile apps, which is not true.

    I'm pretty sure loader layout is shown every time you run the game, even if its files have been cached on disk.

  • Repeat 10 times
     Create Enemy
     Set Enemy health to int(random(100,200))
    

    If it doesn't work for you, please post your code or project file.

  • I promise I'll think of it :)