GauVeldt's Forum Posts

  • "custom" transitions means we'll be able to write our own transition functions? That seems like a lot of work! The examples I showed you would be enough [for me, at least], also their formulas are publicly available.

    Personally, I'd prefer if you wrote this as a purely mathematical plugin that didn't attempt to move stuff. It could be only expressions and return values in the [0,1] range, though I concede that it wouldn't be as friendly for newbies.

    The toggle to ignore movement is also a TODO item.

    There is already the function plugin if you want to write pure math functions in JS.

    PS: If you were to look in the code you'll see the transition functions aren't that scary. They just compute cosines using a bit of wizardry to translate the lerp fraction to an angle in radians.

  • I was going to make an extension that worked exactly like this, but implemented these modes as well.

    Want to do it instead of me(since you're the author of this extension and all)?

    (please don't use jquery/jqueryui, be as dependency free as you can)

    Also, in my opinion, it shouldn't even take a start and end point, 0 should be start and 1 should be end, and then you'd multiply and add to get what you want (similar to how RAND generates a number between 0 and 1, and you multiply it by the number you want to get a range)

    I had planned on adding support for custom transition functions at some point in the future. It is on the TODO list.

  • I do have a lot of fun with this PlugIn already, but I am currently thinking if it is possible to add a z-dimension? Maybe as a scaling method? It would be great, if it would be possible set a size endpoint.

    Example:

    You have an image that is 32x32 in size on x=0 and y=0. Now you like to move it to x=10 and y=50 and increease the size of the image to 64x64.

    This would make it great to develop intro animations quite easy :)

    This can already be achieved using the On Update Tick trigger condition with an action to change the object's size (see Object:Set size) using the GetTransition expression (0==origin, 1==destination).

    Edit: An actual Z axis is a foreign concept to Construct 2 as it is currently only a 2D engine.

  • It's kind of designed as a transition behavior, thus always working between two endpoints. To make a waypoint system you'd need to check which end point you are at and change the target of the next hop appropriately. If you are currently at dest next waypoint would be set into origin, if you are at origin next waypoint is set into dest. It's a slight bit of magic but not too hard to do with a pair of events responding to each of the arrival conditions. Have the actions on IsAtOrigin change destination and the actions on IsAtDestination change origin.

  • agreed...very simple but powerful indeed

    I really need to add the ignore flag so the behavior can be stacked to transition things other than movement and used for transitions on other things (eg: flashing, spinning or phasing of bullets)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • <img src="smileys/smiley4.gif" border="0" align="middle" /> <img src="smileys/smiley4.gif" border="0" align="middle" /> <img src="smileys/smiley4.gif" border="0" align="middle" />

    It works beautifully!

    I used a start of layout and for each object event, and then set the origin points and destination points relative to their starting X and Y placements, and lo and behold...

    I'd post a .capx but it uses a number of extra plugins. I was playing around with a little Mario game (as I oft do to learn how to do things) and wanted to make the bump effect that occurs on a block when you jump into it. This Ease behavior does the trick so well. I'm excited to incorporate it into my real game!

    Thanks a ton again for this!

    Another way is to use an numerical instance variable as a waypoint index and use comparison conditions to decide what to set the points to based on the value of the instance variable. This works really well if you make it its own event using the function plugin and call it in any actions (on the object being eased) that need to update the waypoints since it eliminates duplication and the potential to forget to update one of the duplicated events whenever the waypoints were altered during design. You can use the endpoint events to increment the counter then call the endpoint change actions prior to retriggering the movement action.

  • This is a really cool behavior. I was getting headaches with the sine behavior trying to make just a quick bounce, and this worked perfectly!

    However it would make it much more powerful if you could change the origin and destination points and the other attributes mid-play. Are there any plans to add actions to change the attributes? Because if not, you should totally do that! <img src="smileys/smiley1.gif" border="0" align="middle" />

    Thanks again for the behavior! Just what I needed!

    Give this update a shot:

    dl.dropbox.com/u/55284551/GauVeldt_Ease.zip

  • You have to expose them through the ACE (so as you said in your first post "make actions to set and expressions to get").

    That's the logical thing to do seing that properties are an array.

    It's on the dev's hand to expose and adapt those properties according to the plugin.

    That's what I suspected but I wanted to be sure. So expressions for getXxx access and actions for setXxx then I guess would be needed.

  • Extract from Properties

    etting property values at runtime

    >

    > In your instance's onCreate() function in runtime.js, properties are available via the array this.properties[]. This is an array of the property values. The values are in the same order as the properties were added, excluding link properties. For example, if you have two link properties followed by three integer properties, this.properties only has three elements (the three integer properties in the order they were added).

    this.properties is an array.

    The first property is accessible via this.properties[0], etc...

    That doesn't answer the question. Runtime means the game at runtime via event sheet. See previous post. Your answer is referring to the actual JS code of the plugin. I want them available in the game at runtime via the event sheet.

  • I'm not sure what you mean - have you looked at the SDK docs or the other plugins and behaviors that come with Construct 2? All the properties are right there in this.properties, available in onCreate().

    I didn't see anything in the docs about making the editmode properties avaialable to events at runtime.

    When I try to access them on the object via event sheet expressions those properties that are available in the editor (such as OriginX, OriginY etc in my Ease plugin) are not there.

  • Bump it if its been a few weeks and no one seems to have noticed the topic...

  • Is there a way to make the properties exposed in the edittime.js available at runtime via runtime.js (ie: for use in events). Or do I need to make actions to set and expressions to get?

  • I'll add access to the origin and destination properties and period to the TODO list on this. The code can already handle the case of changing origin and destination points internally but it doesn't yet expose the properties in order to allow it at runtime via set/get methods.

  • Does this plugin preserve instance variables or states of any attached behaviors?

  • Mipey

    Thanks for adding it to your plugin btw. :)

    The only problem with having it in a plugin is the obvious problem that games intended for the arcade can't make use of it.