KFC's Forum Posts

  • If you want a countdown, you can set a variable on 3 and, using the "Every x seconds" condition, subtract 1 from the variable every second.

    Now you can use that variable to show the 3, 2, 1, go countdown with your sprites or plain text.

  • Thanks, I'll try to make the best use of it.

  • ramones

    I tried that but the plank would randomly spin when positioned to mouse x, y.

    E Bear

    I'm not sure if I understood, but that wouldn't solve much.

    On the other hand, you gave me an idea.

    What if I would keep that initial instance (usually I would have it destroyed) and rotate that as the player chooses the angle at which to spawn the new object. With that the initial object would be at the same angle as the spawned object would need to be.

    UPDATE: apparently the current angle of the initial object doesn't matter, but the initial angle.

    It would be really nice to have a "at angle" option in the Create object action.

  • The user can actually change the angle of the object on a per 10� basis, and select from several differently shaped objects.

    So the only solution would be to have up to 36 different mathematical expressions per shape, right? I think I'll try a different approach for my problem. :P

    And I don't even want to it try with the canvas plugin, it won't end well.

    Thanks for the reply.

  • On mouse click I create a new instance of an object with physics enabled at mouse x and y. The object is a plank 125 by 25, and the initial instance is set horizontally at 0� angle. (collision mask set to bounding boxes)

    The problem occurs when I want to spawn the same object at 270� vertically next to a wall. The created object gets pushed away as the initial instance was at 0� and only after its created changes to 270�.

    The event goes as following:

    On Left button clicked

    ->Create object Plank

    ->Plank set angle to x degrees

    Is there a way to overcome this problem?

  • You could use the Wait action.

    If CONDITION

    -> Toggle Boolean/variable

    -> Wait x seconds

    -> Toggle Boolean/variable back to original

    That way you will be able to use the variable to execute an action for a set amount of seconds.

  • Is there a way to check if an object is in its entirety inside another object?

    Or to check if every single pixel of one object is colliding with another object?

  • In the image editor, at all time the X axis is highlighted, or actually the put at the start of the value. Selecting a polygon point and pressing Delete on the keyboard only removes the number on the x axis and moves the point to the left.

    The bigger problem is that right clicking on the point and clicking Delete doesn't do anything.

    I guess I'll need to put a reminder to change my collision polygons with the next release :P

  • You could pause the game when the cursor leaves the window of your game, but if you clicked outside the game would need input from the html page in your case.

    Also worth mentioning, if the window (or tab) is not in focus, the game automatically pauses.

  • Thanks a lot for building this but when i try to open it, it shows this

    https://dl.dropbox.com/u/79020893/New%20project1/error.PNG

    The r90 isn't the latest version ?

    r90 is the latest stable version, r91 is a testing version.

    You can download it here.

  • j1k I just downloaded and installed v0.6.18 of node.js few days ago and installed socket.io without any problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not sure if this is a bug or I'm just failing to understand the logic behind it.

    When I'm using the or block, after clicking the sprite, its size decreases by 10 pixels, but after the wait action it does not increase back to its original size

    <img src="http://i297.photobucket.com/albums/mm206/KillerFromCro/notworking.jpg" border="0">

    Using two different sub-events makes it work normally.

    <img src="http://i297.photobucket.com/albums/mm206/KillerFromCro/working.jpg" border="0">

    EDIT: tested by mouse click

    CAPX

  • Do you want every instance of the same object to move differently or that every object has its own movement?

    EDIT:

    So if you want the objects to maintain their speed while "bouncing" you just need to edit their Y movement when colliding with top and bottom boundaries and their X movement if they collide with left and right boundaries.

    So lets say one object is moving 100,-100 pixels per second. When it collides with the top boundary just make it move at 100,100.

  • You need to have at least two different conditions. Right click on the event and you'll see the "Make 'or' block" option.

  • I guess what you'd have to do is compare the x and y distance between the character and the mouse when clicked and then figure out what's the optimal combination of movement directions to get to that position.

    So for instance, your character is at 0,0 and you clicked at 100,100 obviously you're character will be moving with the SW direction (at 135?).

    Now if you want to get from 0,0 to 100,50 you'd use 135? direction to get your y to 50 and for the rest of x use the 90? movement.

    Hope this idea helps and if anyone has a better solution I'm sure they'll post it here.