justifun's Forum Posts

  • Yeah, simply draw the sprite "dodging" to the left or right, and use the play animation to fire off anytime they push the dodge button

    You can adjust the collision area of each frame of the sprite on a per frame basis, so adjust it so that its no longer in the middle where they player could still be hit like when he's idle.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Get rid of the first action in your example, and then it will only execute when the two objects are NOT overlapping

    If you haven't actually set it up yet.

    By right clicking an event condition and choosing "invert" it will make it "NOT" occur under those conditions

    eg: While not (Object.X) is overlapping with (Object.Y

  • One thing that will really help you down the road is to create one player as a container object and add all of their health/score/UI info to the container as well. It will simplify things greatly down the road for you.

    Then each player will have different different animations based on which player they are actually playing eg: if you choose the red guy, you'd play the red guy set of animations. All animations would be stored in one player object.

    Then as you guessed, assign each player a variable that would equal which player they were on the keyboard/gamepad etc.

    Only the buttons associated with the particular player would trigger the appropriate player in the game.

    now if you want to get a bit fancy and save yourself programming duplicate version of the same code over and over you can use a function to do all the work for you.

    create a function and call it "punch" lets say.

    When you Call the function, you would tell it which player send the command,

    eg: call function "punch" (1) *<--player's controller name

    This number will be used as a parameter for the function to tell construct which player should initiate the punch animation

    On function "punch" (parameter)

    if function.param(0) = 1 then

    -> player 1 play animation punch

    if function.param(0) = 2 then

    -> player 2 play animation punch

    etc.

    its kinda complicated, so lemme know if you have any questions

    use justifun to notify me that there's a reply

  • Havent looked at the specific capx, but off the top of my head here's a few things....

    System / On start of layout / Sprite / Start animation from beginning / current frame.

    is the correct usage for starting an animation.

    When it asks you in the dialog box to specify which animation by name make sure you spell it the exact same way as you named the animation when you were adding the frames to the sprite. and it should have "quotes" around it.

    Next. Click the animation name in the list of animations with the sprite sheet open and in the properties box in the upper left, make sure speed is set to something like 15

    Also make sure "looping" is set to YES

    also, each frame of the animation click it and set its own "frame speed" to something greater than 0 if its not already.

  • yes of course.

    Make sure you have both the keyboard and gamepad object added to your project by double clicking a blank area of your layout.

    Then after you've created the first event: eg: on keyboard pressed

    right click the same event and choose "add another condition" and choose gamepad on button pressed

    Then right click the event a third time and choose "make "OR" block and it will separate the two conditions into an OR statement

  • They don't usually do sales unfortunately....

    Maybe if you are lucky they will have one as part of the steam summer sale though.....

  • If you are using physics, simply set the X position to the same value every tick. So that its basically only evaluating the Y position.

  • It takes time for people to respond, no need to bump multiple times a day. Give it some time.

  • Another simple way (although not the cleanest) is to give a variable to the UI element and the player when its created eg: "owner"

    Then do a "pick all health bars"

    if: "owner = player" then

    subtract health

    It will pick all of the health bars (probably 4 max depending on your game) and then only subtract health from the one that matches the player that got hit.

    I don't think its much a performance hit.

    Its kinda like the UID method.

  • Yes you can, look here for "wall jumping"

    scirra.com/forum/topic45416.html

  • You can use Lerp to achieve this.

    Check out this example.

    Adjust the "MovementSpeed" variable to adjust how fast the object is moving while following.

    Demo

    dl.dropbox.com/u/403350/LerpTest/index.html

    Capx

    dl.dropbox.com/u/403350/LerpTest.capx

  • Not Construct specific, but still good info

    Part1:

    blog.dynamiteskunk.com

    Part2:

    blog.dynamiteskunk.com

  • Will this help?

    zeropad(number, digits)

    Pad number out to a certain number of digits by adding zeroes in front of the number, then returning the result as a string. For example, zeropad(45, 5) returns the string "00045".

  • Yeah you could simply do a quick test if a spot is taken or not by examining what's under the mouse at all times. So your game would always know if the space is taken or not before the player clicks.

    system every tick

    mouse is over "sprite"

    set global variable "taken" to 1

    if "taken" = 0 then allow player to place piece where they clicked.