makotto's Forum Posts

  • Hey it's hard to tell from the info you provided, but I'd do two things:

    1) check the map_wall object, there may be a reason why there is no collision detected

    2) Instead of nesting the code up to 3 levels (or 10 levels), add an "AND" condition so they all can be checked in the same block

  • Pretty cool game. I like a lot the art style you chose for the game.

  • You can do this using the physics behavior (for the large and small circles).

    First set a condition to turn off gravity

    At beginning of layout -> Big Circle set Physics World Gravity to 0.

    And then apply forces to each small circle

    each tick -> Small Circle apply force towards position ( force, BigCricle.X, BigCricle.Y, Image point 0)

  • Just noticed I made a X-axis scrolling background. Here is an example for a Y-axis:

    https://www.dropbox.com/s/9o9qh7sio1gpqjc/Scrolling%20bkgY.capx?dl=0

  • I'm running the latest beta

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you want your player character to move left/right or do you want to be able to move the player on the right?

  • You need to check the number stored in "value", as the problem may be how that is calculated. Also, are you using any method to ensure it is an integer? If the number in value is a float, the "=" may never trigger and default to something.

    Also what happens if the value is between 6 and 19? What gun does it spawns?

    It's really hard to figure out what is wrong without a capx.

  • Okay, this is the way I would do it (no physics):

    https://www.dropbox.com/s/76ceo0sm6pbsnfb/clock%20no%20physics.capx?dl=0

    You can change the rotation speed in the rotationSpeed variable. Please note that the faster it spins, the more you will have to adjust the bounds for the last part of the revolution ( 358 < Sprite.angle < 359.9)

    Let me know if it helps.

  • I think you got the right idea at the beginning. Just a few (minor) changes:

    global variable Clockquarter =1

    On mouse click -> apply torque

    if object.angle > (90 * Clockquarter) -> Clock set torque to 0

    Add 1 to Clockquarter

    if Clockquarter > 5 -> Set Clockquarter to 1

    We only write one comparison by multiplying 90 times the variable Clockquarter (which changes from 1 to 4) , the first time will compare to 90, the second time to 180 ( 90 * 2 ) and so on. If Clockquarter is larger than 4 (that means the clock did a full revolution), we set it to 1 again.

  • [quote:2lqts6av]But then, That would leave less creativity in what I am doing. It is supposed to be that it randomly chooses a number and set it as how "pixelated" that object is. Unless you expect me to add a couple of hundred different animations for each possibility, there should be an easier way?

    Okay, that is new constrain you did not mention on the original post. The first issue is that, as far as I understand, it is not possible to change the size of the collision poly during run time (if I'm wrong on this, can anyone please let me know?).

    By the way, it is hard to give you an answer without a capx. This may work: disable collisions in the sprite that gets pixelated, and pin a transparent sprite to it (position and and angle), at beginning of the layout. then at each collision:

    on collision -> set variable temp to a random number

    apply pixellate with temp as parameter

    set [invisible sprite] height to a size based on the pixellate parameter

    set [invisible sprite] width to a size based on the pixellate parameter

    pin [invisible sprite] to [pixellated sprite] (position and angle

  • The effect will only change how your sprite is displayed, it won't change its collision box.

    One way to implement your idea is to add a second animation (using the same sprite), and changing the collision box of the second animation to match what you need.

    The event will look something like this:

    On collision -> Set Sprite animation to [second animation]

  • You can use text variables to capture the sequences (one per sequence). Once clicked each button can append its value to the variable, e.g. On Button1 clicked -> Append "1" to SequenceVariable

    So, if a player makes the first sequence BTN4, BTN3 and then BTN2, BTN5 your SequenceVariable will be "4325"

    Once you have all the variables, sort them (this way "4325" will be sorted to "2345") and compare.

  • For any floating point number: random(2)

    If you only want integers floor( random(2) )

  • Disabling global gravity and applying downward forces is the way to go. Write some code to re-balance objects that rotate or receive other torque.

    If Sprite1 is NOT between -5 and 5 degrees --> set Sprite1.Angle to 0

    Also add values to the angular dampening and density of the object that may rotate, the higher the values, the less rotation you will see. Hope this helps.