Download Construct 2 public preview 43
Link to release 42
New this build: time scaling and five new behaviors!
Time scaling is as per Classic. If you haven't used it before, you can create slow motion effects by setting the time scale to 0.5 (half speed). It's also great for making a pause function - set the time scale to 0 and everything stops, but events are still running.
A new time scaling feature for C2 is you can set individual object's time scales. For example, you can have the entire game go in to super-slo-mo (time scale 0.2), and keep your player on normal time (time scale 1.0). The whole world is going slow but you can run round at full speed!
Four of the new behaviors are pretty straightforward, but there's also the custom movement. This is a fairly basic version of the Classic one but hopefully should cover essential features. I'm afraid it's also not well tested - Davo wrote the original in Classic so I'm not familiar with the code, and haven't tried everything out yet. Try it out and let me know if you have any problems or if there are glaring omissions.
Here's a little demo using the custom movement to make an asteroids type space movement: custom movement demo.
Image editor on the way, honest!
Changelog
- [Feature] Time scaling. New system actions: Set time scale, Set object time scale, Restore object time scale. New system expression 'wallclocktime', which is the game time unaffected by any time scaling that may have happened (the ordinary 'time' expression increments at a different rate if the time scale is not 1.0). New object expression 'dt' to return dt at the object's own time scale.
- [Add] 'Custom movement' behavior. Trimmed down version of the Classic behavior.
- [Add] 'Scroll To' behavior, which automatically scrolls to an object. If added to multiple objects, it scrolls to the mid-point of all those objects (the average of their positions). Also has a 'Shake screen' action.
- [Add] 'Destroy outside layout' behavior, which simply destroys the object if it leaves the layout area.
- [Add] 'Bound to layout' behavior, which stops the object leaving the layout area.
- [Add] 'Wrap' behavior, as per Classic, makes objects reappear on the opposite side of a layout when they leave.
- [Add] Array: 'For Each element', as per Classic
- [Fix] Previewing with Firefox sometimes opened different tabs with "C:\Documents", "and", "settings\..."
- [Fix] Error messageboxes during export/preview sometimes opened under the main window which was confusing - now they're always on top
- [Fix] Mouse object: detecting clicks/mouseovers on objects on a parallaxing layer did not work
- [Fix] Using shift+enter to write a multiline comment didn't expand the comment to be big enough to fit all the text