YetAnotherSuperhero's Forum Posts

  • Thanks, but the start velocity is not always 0 the player could change when the sprite is turning.

  • Hi, I've been playing with Construct 2 and I need some help with my math.

    In my game You tell a sprite to rotate to a specific angle.

    When the sprite starts it speeds up until it reaches a max speed then slows down so it will not overshoot the desired angle.

    I've tried anglelerp but it starts of instantly then slows down, so that doesn't work.

    I think if I knew how to get the current turn speed and know how many degrees it would turn before it slows down to zero, then I could do the rest.

    So if it's turn speed increases by 1/sec:

    (Both these values start at 0)

    Acceleration = 2

    TurnSpeed AngleTurnedTo

    2          2

    4          6

    6          12

    8          20

    10        30

    12        42

    14        56

    16        72

    18        90

    20        110

    So if I could know the equation for this. I think I could make it work.

    Any help?

  • I have a problem...

    When I scale a layer the touch coordinates are off. If I set a sprites position to Touch.X & Touch.Y when the layer is zoomed, the sprite is not where I'm touching.

    Is there something have to do?

  • Awesome! I didn't know that! I'll give it a shot.

    Thanks!

  • About two years ago I asked if you could evaluate an expression from an INI file. So the INI file would say something like:

    Damage=5+(PlayerScore/100)

    What I'd want to be able to do is replace the string "PlayerScore" with a variable (The player's score is this case, or could be his health or whatever) and calculate it out so if the player' score is 200 his damage would now be 7.

    Could someone write a plugin for this?

    I'm sure you could do this (without a plugin) with Python, but I'm less-than-stupid on that. :(

    Thanks all.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm trying to figure out how to give a sprite the image of a program's icon.

    Is there a way to do this?

  • I can't figure out how to setup a Hex Grid.

    I have a tiled background with a hex grid and I want a sprite (the mouse cursor) to snap to the grid. If it's a simple square grid it'd be easy.

    But my mind is failing me for a hex grid.

    Any help?

  • Is there a way to change a line in a list box to some new Text?

    All I see is "Set Line Data" which does not do this.

    So Line 2 reads "Hot" and I can make Line 2 Read "Cold"

    Thanks

  • Is it possible to get the loopindex from a Repeat action?

    I tried

    Repeat 3 times

    Set Text.Text to Text.Text&Str(LoopIndex) (Text.Text starts at "0")

    and I get 0-1-1-1

    so,

    0

    then -1

    again -1

    again -1

    Shouldn't it be 0-1-2-3?

    How can I do this?

  • It appears that pixel-perfect collisions are not working correctly.

    Is this right? Or is my mind not right?

  • If anyone is interested I figured it out:

    RGB(Max(510*Abs(Cos([ANGLE]))-255, 0), Max(510*Abs(Cos([ANGLE]+120))-255, 0), Max(510*Abs(Cos([ANGLE]+240))-255, 0)) [/code:xnwb0n3t]
    
    Thanks for the help.
  • Thanks, I'll look at that.

    But just to clarify, the Sat & Val are always 100. I just need to retrieve the RGB with the HUE being the only changing variable.

    Is there a simpler way? (preferably without using Python?)

  • I know I can do that, what I need is to find out the rgb from a hue.

  • I need to change the color filter of a sprite, based on HUE or even any range of number (i.e. 1-1000).

    I know I can do this with the HUE shader effect, but my netbook doesn't like it, and I'd like to stay away from pixel shaders (for performance)

    How can I get RGB from a range of numbers?

  • Thank you!

    That does it.