Zathan's Forum Posts

  • newt

    Hmm.. interesting.

    Can you teach me how to achieve that with canvas plugin?

    I downloaded the plugin today to take a look.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is a way in C2 to make something like this?

    Ps: my doubt is about doing something like this without animation, just with events.

  • I think that if you want to prototype something first in C2, you should aim to use an engine like Unity to make the official project.

    Prototype something in C2 to make it in Game Maker seems like a waste of time... both engines are made to 'simplify' the game making task.

    If you like GM, just grab it and go for it.

  • Set the Cam shake to: clamp(190/distance(Char.X,Char.Y,Object.X,Object.Y),5,1) shouId work I guess. You need to divide the shake factor at distance 1 (190) by the distance. When in doubt, check the math in excel.

    Wow, that's it!

    Thank you very much

  • If the object is not on screen, there is no shake. But if it is, start a cam shake that will growing as the char moves closer to this object.

    I have this math that I'm using in the cam:

    If 'Object' is on screen,

    Set the Cam shake to: clamp(distance(Char.X,Char.Y,Object.X,Object.Y)/190,5,1)

    It works, but is inverted. When the object is closer to the Char, the shaking magnitude is 1 instead of 5.

    How can I invert this?

  • You are welcome!

    An important note is that maybe there are best ways to achieve similar results. So, you can mess with the code and improve it!

    What I did here is setting a random X and Y location every random amount of time. This location is stored in the two variables and is based on the window size, so the footsteps will never get lost beyond the screen.

    The amount of time you can configure to fit better your project.

    Another important thing is know exactly what you want when the random time is reached and a new location is setted.

    In this case, I wanted that the footsteps turn slowly to the location.

    So, in addition to being always moving forward, the footsteps will, with the lerp action, always turn to the specified X and Y in the screen.

    Edit: Oh, I forgot.. the new location is setted when the timer reaches it's limit, but when the distance between the actual location and the footsteps is less than 30 too. This way, the footsteps will never be stopped.

  • Something like this?

    https://onedrive.live.com/?authkey=%21A ... ion=locate

    If you have any question, just ask it <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • AnD4D

    https://dl.dropboxusercontent.com/u/553 ... n.v1.7.zip

    Hello, can you try this one? I plan to release this later if it turns out stable. It has "Set Easing Parameter" action, you can try setting a and p for elastic tween. For now you can't change the parameter of bounce tween though.

    For now, it is:

    Parameter a and p for elastic

    Parameter s for back

    Parameter t is unused.

    Hey, Luna!

    Any news on a stable release? I think that this litetween is one of the most indispensable third party behavior ever..

  • dont know if its exactly this what you want

    https://dl.dropboxusercontent.com/u/231 ... earth.capx

    Hey man, that's exactly what I need!

    Thank you! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Bump

  • So.. I have an 'static' object just spinning (I will call it earth for better understanding), and other that goes on its direction (comet).

    I have this math that almost do what I want:

    When the comet hits earth:

    Set X to CenterX + cos(angle) * dist

    Set Y to CenterY + sin(angle) * dist

    But with this method, the comet don't start to rotate around earth from the impact point, but it teleports to the angle that earth is facing...

    How can I make it work properly?

  • Ok here is how I would do it. Remember there are may ways to implement it.

    Basically, you have a variable that you keep appending text to to keep track of what keys are pressed. You'll use expressions to check if the last x characters in this variable match your cheat code then do something.

    I'll add in an event to delete the leftmost character after the variable is x length, so it doesn't keep growing forever.

    https://www.dropbox.com/s/ki12vj9ylgsc3 ... .capx?dl=0

    That's exactly what I need! hehe

    Thank you very much!

  • Well first you would have to decide how you want the cheat code entered. Is there somewhere a player can type like a text box? Or if they enter the correct sequence any time it will trigger during gameplay? Is there a chat system you already have in place, or maybe a console the player can bring up to enter a code?

    It would be the "classic style", where you just have to enter the correct sequence os keys, without any text box. hehe

  • What is the best way to make possible to enter a cheat code, that would be a word, during gameplay (or in pause menu, where the gameplay is stopped, if it's more simple)?

  • fisholith

    Wow, that's an awesome explanation! hehehe

    Guys, thank you very much for all the help! It's propably the best forum ever..

    People who know what they're doing and want to help.

    Again, thank you!