Ashley's Forum Posts

  • It rounds down. Construct allows a floating-point value 0-100 for opacity (which is more sensible for the end user than 0-255). When you set opacity to 40.3, it multiplies it by 2.55, rounds it down, and stores as an integer (= 102), then when you next retrieve it, it divides by 2.55 and returns a float (= 40). This is one of a few annoying design mistakes which is difficult to correct, but will be sorted out in the next major revision of Construct (some way off).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It looks like it should work, but opacity has a rounding problem which might affect this. Because opacity is really stored as an integer 0-255, Construct's opacity values (0-100) will round to about the nearest 0.4. This can affect timedelta'd stuff involving opacity. You can either store the opacity in a private variable and set it from that, or (much easier) use the Fade behavior which does not suffer this problem.

  • Can you post a little .cap file which just has XAudio2 trying to play a .mp3 on start of layout from AppPath & "myfile.mp3", and if it doesn't work, upload the .cap and .mp3 somewhere so I can take a look?

  • The crash detail seems to include something about accessing the internet. Have you tried disabling automatic update checks? Change UpdateCheck=1 to UpdateCheck=0 in Construct.ini (C:\Documents and Settings\<username>\Application Data\Scirra) to disable.

  • XAudio2 can play WMA too, have you tried that?

  • Welcome back Good holiday?

  • Some upcoming composers are willing for their compositions to get used anywhere they can just to spread their work around and improve their portfolio. You could try finding a composer with some tracks online, and just ask them if you can use their work in your game with credits. (Make sure you tell them if it's a free project, or offer them royalties otherwise)

  • You could try informing the WINE project that WINE doesn't work with Construct. They might be able to fix it then.

  • XAudio2 has always been able to play music just fine for me... when you're loading a music from file, are you sure the filename exists? You could try AppPath & "myfile.mp3" and it'll load it from the same directory as the .exe/.cap.

  • When you create two objects in the same event, both are picked, so a 'set private variable' action will modify both of them, not just the last created one.

    Try creating them in separate iterations, eg:

    + For "i" from 1 to 3

    -> Create object

    -> Set variable to loopindex

  • Compare values: random(100) is less than 33

  • Download 0.98.6 now!

    Construct 0.98.6 has been released, with the usual batch of bug fixes, changes and additions. There's some cool stuff in this build. Don't forget you can support the project either by contributing to the Wiki or making a donation via the front page.

    Full changelog:

    Picture editor

    • [ADD] New style for setting hotspots and action points: rather than moving the point you move the image. Makes editing the hotspot across several images a LOT easier (thanks Shviller!)
    • [ADD] Arrow keys now move hotspot and action points one pixel at a time for fine precision
    • [CHANGE] Opacity has been removed from the colour mixer and put in the tool settings, named as 'Flow'.
    • [CHANGE] With the rectangle and ellipse tool, the tool settings alpha1 and alpha2 let you control the opacity of each colour allowing you to create a gradient from transparent to solid etc

    Event sheet editor

    • [ADD] Added categories to object types. You can set a category in the object properties. Later we will have tabs at the bottom which you can click like in the insert object dialog, and perhaps the ability to right click an object and change its category there and then in the event wizard. Currently only the first screen of the event wizard uses the category system.
    • [ADD] New 'expand all' and 'collapse all' to groups right click popup
    • [FIX] Crash changing objects via double clicking icons
    • [FIX] Mouse wheel scrolling lag when openning an event sheet from project bar
    • [FIX] 'Invalid argument' errors that sometimes come up when you click the scrollbar in event sheet editor
    • [FIX] Intellisense is now case insensitive, also updated intellisense to recognise the newest system expressions
    • [FIX] Adding a new private variable or global variable within the event wizard caused it to default back to the first variable when OK is clicked

    Event Wizard

    • [ADD] If you double click in the object panel for the quick expressions, but miss the objects, you get the first step in the ExpressionWizard
    • [ADD] Object panel now includes families
    • [ADD] Intellisense now includes families
    • [ADD] System object: 'Is layer visible' condition
    • [FIX] Scrolling parameters no longer leaves artifacts etc
    • [FIX] Event wizard looks correct under different themes
    • [FIX] Object button parameter now remembers last family or attribute, and if you click the button it automatically highlights them. Also, attributes no longer have icons (it was stealing icons from objects)

    General

    • [ADD] Application properties (under Advanced): new Minimum FPS property. When TimeDelta'd applications get very slow (ie. 5fps) things can jump a long way per frame causing problems. With a minimum FPS set, when the framerate falls below that value, TimeDelta keeps returning values as if the framerate were still the minimum FPS. This means your game basically slows down at very low framerates, so objects don't jump a long way every frame.
    • [FIX] Object selector is now properly resizable
    • [FIX] When adding objects in the Family Manager, the object selector does not show families/traits
    • [FIX] A crash when you clicked preview and you happened to have some conditions to a behavior you had deleted
    • [CHANGE] Adding containers/objects now uses the new object selector dialog
    • [CHANGE] 'UID' and 'OID' removed from Common properties. These turned out to be internal IDE handles and they don't relate at all to the runtime values, so they were useless

    Animation

    • [FIX] Can now longer set the frame speed of a frame to 0 (which caused an infinite loop)
    • [FIX] Pingpong now handles the 'repeat' thing. However, this may be changed later
    • [CHANGE] You can now use decimal values for animation speed for more precise control

    Plugins

    • [ADD] Canvas: 'Grab Layout' option expanded from off/on to off/after drawing/before drawing. 'After drawing' was the old 'On' option, grabbing the layout after the canvas has already drawn itself. It allows for frame-feedback shaders when the opacity is not 100%. 'Before drawing' grabs the layout before the canvas has drawn itself. This allows you to apply an effect to the entire display drawn so far (ie. multiple layers). This allows for lots of new shader possibilities, such as using Greyscale to make the entire display monochrome, even when using lots of layers, which was previously difficult to achieve.
    • [ADD] Minimap: opacity actions/conditions/expressions
    • [ADD] File: For Each Directory/For Each File conditions
    • [ADD] Private variables to Tiled Background
    • [ADD] Sprite: Pick closest/farthest conditions
    • [FIX] Tiled background: crash when lost device and had texture loaded from file
    • [FIX] File object: does not crash if you use 'Load file to string' and the file doesn't exist
    • [FIX] Sprite: Play animation now resets the repeat count so if you animation repeats 5 times it will repeat 5 times
    • [FIX] Sprite: a random crash in animations which could occur if an animation finished and stopped playing and then u used set animation frame and resume
    • [FIX] Sprite: Animations are now saved correctly using the quickload/save actions
    • [FIX] Object pairing bug in the following objects: RTS, Turret, Balloon, Box, Canvas, ParticleSpray, Sprite
    • [FIX] The condition 'Evaluate' was evaulating things incorrectly
    • [CHANGE] Sprite: A new sprite defaults its size to 128x128 instead of 120x120
    • [CHANGE] Better layout editor representations of button, listbox

    Behaviours

    • [FIX] Platform: Made more changes to how platforms are handled. You should now be able to run up a slope and go through a platform. Hopefully its now all 100% perfect!
    • [FIX] Platform: The "Allow down button" option now saves properly
    • [CHANGE] Platform: To jump down through a platform you now have to hold down the down button and hit jump
    • [CHANGE] Platform: Reversing direction has acceleration and deceleration added.

    Runtime

    • [FIX] Debugger: still listed instances from a container if you destroyed a container, and crashed if you clicked one of these nonexistant entries.
    • [FIX] Switching to windowed mode with caption disabled doesn't bring the caption back
    • [CHANGE] VRAM expression: can now be used as: VRAM("usage") (show total VRAM allocated), VRAM("textures") (show texture VRAM usage), VRAM("targets") (show engine/render targets VRAM allocated). Without a parameter shows total VRAM. All values are approximate.
    • [OPT] Optimisations for large games with many objects.
  • thanks, that seems to only affect one at a time though, if a larger object that covers more than one object overlaps them, only one is affected..

    I don't understand. Do you have a .cap?

  • There's an even simpler way.

    + Always

    -> Set object opacity to 100

    + Mouse is over Sprite

    -> Set object opacity to 50

    Events are read in top to bottom order, so they all have 100 opacity, except for the one under the mouse. "Mouse not over object" won't be true and won't run until the mouse isn't over any of the object, hence the problem.

  • You should run the debugger and look at the sprIvoRobotnik object. You can see exactly what's happening. The minute you start the application, because it is created on the first layout and has a platform movement, it starts falling. Really really far, down and down, until it's also going really fast. So as soon as you get to your layout it's probably going fast enough to pass through stuff.

    Deactivate the platform movement on the first layout, then activate it on the layer where you can actually start controlling him.

    Secondly, and the debugger also shows this, sprIvoRobotnik is being positioned by the Start object left over from the first layout. Because it's global it still exists, and Start.X and Start.Y just so happens to refer to that one, off the bottom of the screen, instead of the second one you placed on the layout. To get around this, you can destroy the first start object on the first layout on start of layout, or simply delete it from the layout editor - it still exists on the other layout, so it won't destroy completely. However, since you're going to be adding more levels and positioning start markers differently on them, I would suspect you really dont want other start markers from other layouts hanging around, so don't make it global. That also fixes it, since non global objects are destroyed when you move away from the layout.

    Remember, if things are going wrong, get the debugger out!