Ashley's Forum Posts

  • 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.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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!

  • The best way to do this is by writing a custom pixel shader effect, because these run really quickly on the graphics card. See Pixel Shaders.

  • Did you try putting d3dx9_39.dll in the Construct directory? If that doesn't work, you probably need a real DirectX install, which means you just can't get it to run from a USB disk on a crippled-access computer. Construct also exports the preview to the Application Data\Scirra directory, so if you can, you'll need to paste d3dx9_39.dll there so the runtime can find it too (but first the IDE has to work).

  • Makes sense, otherwise the Else, at runtime, attaches itself to the event above the toggled event as well!

    Best log it on the tracker as a bug so we don't forget.

  • This is corrected in the next build. When you change direction, the deceleration and acceleration are added.

  • Yeah, it looks like a bug that you can't drag a subanimation back out. Submit it to the tracker.

    I'm still debating if sub-animations were a good idea to implement. It's tempting just to turn them off. There's a vague case for having them for two reasons:

    • Organising animations
    • Having more complex animation structures, like "Stopped" and "Walking" animations, then subanimations for carrying different weapons/wearing different clothes/whatever. So you'd have subanimations under "Walking" like "Walking with nothing", "Walking with sword", "Walking with shield", "Walking with sword and shield". But I think this could be better done with separate sprites for the different things, and just have one generic walking animation.

    What do you think? Should we have sub-animations? People often ask what they are for (and the above two things are the only thing), so I guess it isn't intuitively obvious.

  • I just tested it, and it seems to work alright. With OK / Cancel buttons, clicking the X in the messagebox window triggers Cancel, and with just an OK button, clicking the X triggers OK. This is intentional, and Windows tells you that OK was clicked if you use the X on a messagebox with just an OK button, so it's obviously intentional.

  • Have you tried putting in a text object tracking the total object count? The runtime can give 'out of memory' errors if you continuously create objects and don't destroy them. All objects except ones marked global are destroyed when you change a layout, so if you're spawning a lot of global objects, they will still exist after you change layout.

    If you send me your .cap (to ) I can take a look and see what's going on. You'd need to provide clear instructions though and make it simple to see the problem (sometimes people send me really complicated games and say "just get to level 15, then...")!

  • Yeah, I've sometimes needed this too. Another workaround is to put the actions in an 'always' subevent, and toggle the subevent.