linkman2004's Forum Posts

  • No. It would be quite a large undertaking, so I don't think it's likely to happen.

  • This places the sprite in the same starting position. How do you figure the angle to start for its current position?

    How do you mean? The angle to start is specified when you first grapple on. Those first two values are simply added to the 'angle' and 'speed' values every tick. The first expression increases the speed proportionately to the steepness of the 'angle' value, while the second expression increases the 'angle' value by the 'speed' value.

  • I don't think qarp is necessary, but it does use a small bit of math. For a basic grapple hook all you really need are three variables; 'distance', 'angle', and 'speed'. When your grapple first latches on you set the 'angle' value to the angle between the grapple point and the character and set 'distance' to the distance between these two points.

    Every tick that the character is latched, add something like this to 'speed':

    180 * cos(GUY('angle')) * TimeDelta[/code:2twkufci]
    Then, add this to your angle value: 
    
    [code:2twkufci]GUY('speed') * TimeDelta[/code:2twkufci]
    After that, it's a simple matter of setting the position of the grappling object to:
    
    [code:2twkufci]X: GrapplePoint.X + cos(GUY('angle')) * GUY('distance')
    Y: GrapplePoint.Y + sin(GUY('angle')) * GUY('distance')[/code:2twkufci]
    
    If your character first grappled onto something at a 45 degree angle from the grapple point, he would swing endlessly between 45 and 135 degrees; at 10 degrees, between 10 and 170 degrees; etc...
    
    [url=http://dl.getdropbox.com/u/917406/grappleHOOK.cap]Simple pendulum example[/url]
    
    I hope this helps with the basic concept to some degree.
  • It depends on how complex you want it. For example, if you want your current speed to be transferred to your swing speed upon grappling, it takes a bit of complex math. However, a simple going back and forth is rather simple. I'm currently working on an example of the former.

    EDIT: Also, just thought I'd mention; I don't think I have my original example anymore, but it was kind of crappy anyways, so it needed to be redone.

  • It may look like it's returning values all over the place, but when used to move stuff it works just as well as using the FPS average.

    Example CAP

    NOTE: If your refresh rate isn't 60, just change the value in the second action to whatever your refresh rate is. I didn't feel like making an FPS counter thingy.

    EDIT: Of course, if you plan on doing something other than consistent movement with this, feel free to ignore me.

  • If you think that TimeDelta is inaccurate, you should post a CAP file demonstrating this.

    The difference in accuracy between multiplying by TimeDelta and multiplying by (1 / FPS) is incredibly small.

  • .98.9

  • Glad I could help.

    Love the little guy, by the way.

  • Any chance of a variable blur mask?

    The available mask's work pretty good, but variable would be awesome for depth of field.

    You could probably pull something off with an animated spite, but vram would shoot through the roof.

    The blur mask already supports variable blur based on the red channel of the image. The more red the blurrier it is.

  • That would go in the event sheet editor. Equations don't work anywhere outside of conditions and actions. The proper place to implement it would be in your "Key is down" events. There you could set the proper animation as well as the speed with the equation I gave you.

    Anyways, I went ahead and whipped up a quick CAP illustrating all the things you've asked about so you could see how it can all go together. It shows the mirroring of the sprite, the sliding, and the animation speed.

    Platforming examples

    I hope all of this has helped you.

  • Standard Windows controls are always drawn on top since they're not rendered through DirectX. I think they're going to be rendered in DirectX in Construct 2, but that's a long ways off.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The animation speed is a simple matter of finding the ratio between the current value of VectorX and the object's maximum floor speed. So, set the animation speed to something like this:

    abs(Sprite[Platform].VectorX) / Sprite[Platform].MaxFloorSpeed * AS
    
    NOTE: 'AS' is just a placeholder and should be replaced by the maximum speed at which you want the animation to play.[/code:2yjrbm54]
    abs() will return the value you specify as a positive value even if the original is negative.  This will ensure that the animation speed is never a negative value.
  • Do you want the character to be able to face the opposite direction he's in while sliding? If that's the case, you'll have to do things a little differently. Instead of checking the X speed, check which key is currently depressed. If the right arrow is down, set the angle to 0, if the left arrow is down, set the angle to 180.

    For the sliding, you'll need to check to make sure that neither right nor left is down. You can do that by negating the condition, which you do by right clicking a condition and clicking "Invert condition". As a subevent to that, check if the player is currently walking -- the platform behavior actually has a condition for this. If it is, set the player's animation to the sliding animation.

    I'm probably explaining this poorly, so here's a CAP file showing what I'm talking about: Sliding

    As for the "Or" condition, you can sandwich it between two conditions. If either of them equate to true, you're event will trigger.

  • I would say the DS

    alot of good games. I really dont know anything good for the Itouch off the top of my head. DS has hotel dusk trauma center,

    Phoenix Wright

    , chrono trigger and many other games.

    This.

  • It's going to the level 1 layout, I think you might have the layouts mixed up, though. The level 1 layout has ten bricks while the level 2 layout has only 1. Could that be the problem?

    Also, a suggestion. You should set the collision mode on your menu sprites to bounding box so the mouse doesn't have to be right over the text to be clicked.