LittleStain's Forum Posts

  • By the way, it's LittleStain, not LittleStuart.. lol..

  • I'm not sure why you do something completely different from my example.

    As far as I know, I only used one global variable, but if you like this better, just roll with it..

  • C2 can make many nice things, but if you'd like to make a real ebook, readable on e-readers, here's a free program:

    Sigil

  • I wasn't able to open LittleStain's file since it was made with a Beta version of C2, so maybe you already have a solution you like. If not here is a 2 line solution.

    Basically I have the system check every tick to see if the angle between the sprite and the mouse is within a range that I specify. If it is I update the angle of the sprite. So as the mouse moves out of range the angle of the sprite is no longer updated and left at the last angle instead of snapping back to 0 as in my previous example.

    Haha, you've just proven myself and aphrodite wrong.

    We were concerned the negative angle wouldn't work as expected, but seeing your example it does.

  • Why not transform this font into spritefont using SpriteFontGenerator ?

    Resizing the window could have unexpected effects when doing it with estimations, so I'd not recommend that.

  • You could create a variable KeyDown.

    and add an action to A is down and D is down to set the variable to 1

    add an on any key released at the top of your inputs (so all events below will overwrite if necessary), give it the action set variable to 0

    add an event if variable is 0 set CustomMovement speed to 0

    This is probably not the best way, but it will work for now.

  • Only way I can think of to do this is when using spritefont.

    Normal fonts are handled by the browser and could differ.

  • Your else statement is in the wrong place.

    It only reacts to the A is down. If A is not down the else statement takes over.

  • Here's an example to get your creative juices flowing. It's far from perfect and there are many other and probably better ways to get this done, but this might help you in the right direction:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess you could use the condition "is overlapping at offset"

  • If you want to connect two instances of the same sprite, you should make it very clear which two instances you want to connect. This is a question of picking the right instance in your events.

    There are many ways of picking, so it all depends on what you are trying to achieve.

    Once the second sprite is picked you can reference it by UID inside the eventsheet.

  • Capx using the code Aphrodite suggested:

  • Would it work to use if the platform-sprite is overlapping the transparent sprite (I would take away the solid behaviour) platform - set vector x?

  • I'v been out of programming with construct for a while, but if you replace the system "pick all brick" with system "for each brick" you should be fine, I guess..

  • > Aphrodite,

    >

    > Just thinking out loud: Wouldn't using startangle+degrees for max and startangle-degrees for min solve that issue?

    >

    Not sure, since I think C2's angle logic passes from 0 to 350 and not to -10 for exemple (not 100% sure about that), so if you clamp it to -10, it'll never clamp it

    However, by using angle() I think you should be able to go through:

    I suggest using a function with One parameter:

    On call Function "Normal_Angle" : Set return value to Angle(0, 0, cos(Function.Param(0), sin(Function.Param(0))

    Set angle to : clamp(Function.Call("Normal_Angle", Self.Angle), Function.Call("Normal_Angle", Min_Angle), Function.Call("Normal_Angle", Max_Angle))

    Where Min_angle and Max_Angle are the limit angles, that should work even if C2 changes it's way to interpret angles I think, not tested

    Yeah, guess you're right. I believe last time I tried something with clamp and angle I made sure that in the calculation the startangle was considered to be 180 and did the calculation from that, so the clamp would always be returned between 0 and 360. And calculating it back to the desired ingame angle.

    I've been out of C2 for a while, so stepping back on the bicycle ..