eli0s's Forum Posts

  • I don't think you can do it with the Fade behavior.

    Use opacity with events:

    Add an instance Boolean Variable to your object( i'll name the object "myOpaqueObject"), for example "opaque" and set the default value to true

    Add an instance Number Variable, for example "FadingTime" and set its value to something appropriate (I'll use 120).

    In the event sheet create two conditions that check and decide if the object should be opaque or not.

    For example:

    If myOpaqueObject is overlaping with "something" ===>myOpaqueObject | Set opaque to True

    If myOpaqueObject is not overlaping with "something" ===>myOpaqueObject | Set opaque to False

    Then add the events that will control the fading, depending on the booleans true/false state:

    If myOpaqueObject is opaque ===> myOpaqueObject |set opacity to self.Opacity + 1 * FadingTime * dt

    If myOpaqueObject is not opaque ===>myOpaqueObject | set opacity to self.Opacity - 1 * FadingTime * dt

    By multiplying with 120 and dt you are ensuring that the fade will last 2 seconds regardless the frame rate of the game. Use multiples of 60 for every second you wish to add (for example 60*dt will last 1 second, 120*dt will last 2 seconds, 180*dt =3 seconds and so forth...) You can effectively control the FadingTime with events (actions/instance variables/set value) to change the fading time.

  • +1

    I would love to see Spine some how integrated in to Construct.

  • You welcome!

  • Something like this?

    http://www.eli0s.com/Tests/Floater.capx

    You need to play around with the sine values until you find something that you like. Lot of sine behaviors with different variations will result an "organic" randomness.

  • I'm glad it worked!

  • I have noticed the same behavior just very recently. In my case I wanted after an animation finished to play a new animation mirrored. For some reason (I confirmed it in the debugger), the last tick of the last frame of the first animation was mirrored, even if the mirror was not the first action of the "on animation finished" event. This happened every time.

    My workaround is to add a 0.01 wait before the mirroring action.

    So, in your case try this:

    =>On "DropAnim" finish:

    • System wait 0.01 seconds
    • Set animation to "Falling" (play from...)
  • My guess is that you are able to zoom (change the scale of the layout) but the scaling doesn't happen at the point that you want, but rather from the center of the screen, thus offsetting your sprite and perhaps resetting your scale level..?

    That is what my experience when I was fiddling with a similar concept, only it also involved parallaxed layers that were scaling from the 0,0 coordinates and not the current scrollx, scrolly position and it was a mess!

    I just don't get how Constuct handles the 2Dish world when it comes to simple things like that. I wish there was a real camera system and world coordinates for positioning, scaling and depth perception.

    Oh well, not only I wasn't helpful but I mumbled too much

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You're welcome!

  • Well, I won't pretend that I understand the math neither

    In your case, since you want a full circle divided into 12 frames the expression that works is the following: int(12*(1+Archer.a/360)+0.5)%12

    Here is an example, I added some movement and arrow firing functionality just for fun. What interests you are the the 2 first events.

    http://www.eli0s.com/Tests/LunatrapArcherExample.capx

    I hope that helps!

  • There is a much simpler (with fewer events) way to do this, although I don't know if it's less CPU intensive.

    Unfortunately, I don't remember where I found this example, so I can't give credit to the original creator. I think what he or she manages with 2 events is simply brilliant!!!

    Here is the example, almost as I had found it, I believe I'd striped it some point and click movement functionality and kept only the angle related math.

    http://www.eli0s.com/Tests/AngleSimple.capx

    And here is my adaptation on a tower that uses the sprite's frame number (instead of animations) as a variable in order to change the visual result.

    http://www.eli0s.com/Tests/AngleTower.capx

  • Yes, I am experiencing the same stuttering problem that you mention on my own tests, with a platforming game in mind. I only tried Firefox and Chrome on PC though, no other devices, but since even a very simple scene with a few events seems to cause stuttering, my guess is that less powerful devices will render similar results.

    In my experience, Firefox delivers almost half the frame-rate of Chrome, the second being almost constantly fixed at 60 fps. Almost. And there I believe lays the problem:

    For some reason, every few seconds Chrome drops one or two frames below 60 and that results visualy as stuttering. I don't remember if that was always the case with Construct 2, I haven't using it lately and with all the stuff that had being added and with internet browsers updating all the time, I feel kinda lost.

    In your game (by the way, I really liked what I saw, great job!) the stuttering is most noticeable at the beginning when the scrolling speed is low, after a few speed-ups I couldn't really notice anything.

    I feel like this problem needs to be confirmed and if so addressed as a priority, in fast moving games with delicate controls it really distracts the experience.

  • Hey, welcome

  • As I understand, you can only associate the left, right, middle buttons and the mouse wheel (up, down) with a condition/action. I guess that with online games this should be sufficient and perhaps the 4rth and 5fth mouse buttons might even cause problems with the internet browsers, because they are most commonly used for "go back"/"go forward".

    But for PC games with the node-webkit I believe that the two additional buttons offer more versatility and game-play options to the game designers and to the players. I for sure try to use them on every game that I play and get particularly frustrated when the game developers won't give me the option to remap controls to these buttons (I use the XMouseButtonControl).

    Is it possible ( Ashley ) to add the additional thumb buttons as an condition in construct 2?

  • I have also noticed this with the jump thru behavior. On lower frame rates (slow machines) the player (witch has the platform behavior) falls thru the object that has the jump thru behavior.

  • If you don't save the image and just exit the sprite editor, do you see the sprite inside the layout view?

    Can you post your capx file?