Scale Behavior

This forum is currently in read-only mode.
  • Here's the first beta of the scale behavior as requested by Somebody. I'm fairly confident in how this turned out, so perhaps this will also be the final release.

    Scale Behavior - v0.9b

    Download Now(no example) - 98KB

    This doesn't include an example(I'll try to get around to that eventually), but everything should be pretty self-explanatory.

    First you setup your scaling animation settings in the behavior's properties. You can either choose to have this scaling animation played at the start of the object's life or start it later using the "Start scale" action. Alternatively, you can use the "Scale over time" action to do the same thing but entirely at runtime.

    All scale values are given as percentages and scale the object according to the size of the current image. So if you have an object that is 64x64, but its image is 128x128, a scale value of 200% would set the object's size to 256x256.

    Be sure to leave your comments concerning suggestions and bugs.

  • Excellent mate!!!

    I really like the ability to loop back and forth or reset, and the cosine interpolation.

    How many people will be using both those features to make their "collectables" pulsate.

    I haven't found any problems yet, but I've only just started playing with it.

    Who says we don't need shortcuts like these?

    Regardless of whether it's easy enough to do with events, this is exactly what Construct is all about.

    Nice work (and quick too!)

    Krush.

  • Awesome! Thanks, linkman! Will try to make a nice simple example as well.

    I think it has turned out great - nice, simple, quick to use. Will have to play around a little, check it out more. Try layering it, stuff like that (like pulse a little and get smaller over time).

    One little thing - in Actions there are two links to "Scale over time" - one has almost all settings, the other only settings for interpolation. Is there a limit to how many settings can appear in one link or it just ended up there?

    Evil edit: Ok, just tried layering the effect, but it always takes the first behavior. Would be actually be possible to layer them? Because that would allow for even more crazy stuff - like set one to Scale down to 1% over 5 seconds, other to pulse every 100ms, etc. Well, if it's not too much work. This is super great already.

    Extra evil edit: Also... Would it be possible to work off off the current size instead of the base image size? So you could, say, set the size to 400% and then start a behavior to scale it down to 1%? That would be really handy.

  • Neato, thanks!

  • Thanks, guys.

    The two scale over time actions was an accident. One of those is supposed to say "Set interpolation".

    As for stacking behaviors, as you point out it's not currently possible, but I'll try to throw in support for that. And about the scaling from the base image size, I really don't want to change from that. Perhaps make I could make your suggestion an optional feature, but I feel it works fine as is. I'll see what I can do, though.

  • Why does it scale from original image size rather than sprite size? If someone has a 64x64 image but they set the sprite to 32x32, they always have to remember to scale straight from 50% if they want it to scale from 32x32.

  • Why does it scale from original image size rather than sprite size? If someone has a 64x64 image but they set the sprite to 32x32, they always have to remember to scale straight from 50% if they want it to scale from 32x32.

    Not the way the behavior works. When you initiate a scale the behavior figures out what the current scale value is and scales up from that, so it doesn't matter what size the sprite is, it will always scale up from the proper size.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So if you tell something to scale to 100%, it shouldn't do anything?

  • So if you tell something to scale to 100%, it shouldn't do anything?

    Sure, if the sprite is the same size as the base image size. However, if the sprite is smaller than the base image size, it will scale up to the size of the base image.

  • Okay, I thought that may have been unintentional when I was using a sprite smaller than the base image.

  • EDIT:

    Never mind, have a nice day!

  • How do you install this plugin as it doesn't seem to be like any other plugin I have downloaded

  • Like any other plugin - extract the archive into the main Construct folder.

    Are you running Construct 2? If that's the case, this plugin won't work - it's made for Construct Classic only.

  • Very nice plugin! Actually the default Sine behavior can't be controlled by Events, only on Actions, but your plugin does exactly what I need!

    Thanks dude!

  • Hey, is there some demo on it?so that i can use it

    Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)