keepee's Recent Forum Activity

  • If there's any patterning or imagery on the health bar you can use a 'Tiled Background' object.. and then just reduce the width. The image will be cropped.

    If it's just a plain coloured bar, you can use a normal sprite and reduce the width in the same way. Just remember to set 'sampling' to 'point' in the project settings. (this gets rid of any blurry edges)

  • Using any of the fullscreen modes will work, including when you click on the letterboxed area.

  • The problems with the layer..

    For the 'create object on layer' action you can either enter a layer name such as "Background" (with the quotation marks) or a number like 0 1 2 3, (without the quotation marks)

    The numbers go in order so 0 is the bottom layer, 1 is the next layer up etc.

    You've input a number and mistaken it for a name.. it looks right at first glance because the layer that you want is called "Layer 0" (which is actually layer number 1)

    so anyway...

    Create object Sprite5 on layer 0 at(sprite3.x, sprite3.y-20)

    should be

    Create object Sprite5 on layer "Layer 0" at(sprite3.x, sprite3.y-20)

    but you should rename the layers to avoid confusion. And your sprites!

  • aside from posting the .capx you can check the following:

    search your event sheets for "Opacity", "visible"

    click on the object inside the project dialog, (this will select all instances), and then check the opacity and initial visibility in the object properties again (a property will appear blank if multiple instances have different things set). Also check the 'blend mode' property as well.

    if you're using shader effects, disable them one by one. Search for them in the events and disable any actions related to them.

    If it's visible in the editor but not visible when testing then i'm not sure what else it could be. You should post the .capx maybe

  • your link now 404's so I might have misinterpreted your original post.

    I wasn't using physics for them, simply X - 3 every tick

    You should check out the manual entry for Delta time ('dt')..

    but anyway, have you tried doing the same thing to the player as to the platform?

    when the player is on the platform, You can also have player X -3 every tick.

    (but read about dt before you do that)

    !

  • You might find this useful..

    This is sort of what I use for any left/right movement and it works great.. just needs a single number instance variable.

    +for each player           

              -> set player.moving to 0

         +Left arrow down          

              -> subtract 1 from player.moving

         +Right arrow down          

              -> add 1 to player.moving

         +player.moving not equal to 0     

              -> player apply force of player.speed*player.moving

    so if neither (or both!) of the keys are pressed the player doesn't move

    Player.moving becomes -1 when the left key is pressed. This ends up negating the player.speed.. causing it to go left instead of right.

    *edit: and i like this method also because the -1,0,1 variable can be useful elsewhere..

    for example, if you wanted to tilt the character sprite towards it's direction.. it's just one event:

    • > set angle to 15*player.moving

    btw, Nimtrix, you could also just place the 'every tick set false' event at the very top

    one last thing: you don't need "player: is keys" there for every single event, just make it the top level event, with everything else a sub-event of it.

  • Well as your text object shows..

    the angle() expression that is used for setting enemyhitbox.playerangle returns a value inbetween -180 and 180..

    (-180 left, -90 up, 0 right, 90 down, and 180 facing left again)

    but then in the sub-events for the actual movement, you were checking for values from 0 to 360 instead of -180 to 180

    so just need to change those values

    alternatively you could use anglediff() .. which automatically works out any inconsistent angle values.

    <img src="https://dl.dropbox.com/u/53374990/Forum/anglediff.png" border="0" />

  • because when you reach the edge of the layout you start to move away from the centre

    Enabling "unbounded scrolling" in layout properties will help you there.

  • If you right click on the area of an event containing the conditions (but not the conditions themselves) you have the option to make it an "OR" block.

  • So apparently there is this bug in javascript..

    Modulo values don't work properly with negative numbers:

    -2%10 equals -2

    when it should equal 8

    A simple work around is described on this site

    So instead of -5%4 which gives the wrong answer in JavaScript we substitute ((-5%4)+4)%4

    Not really a big deal but thought I should bring this to attention.. It'd be useful to implement if it's not too much hassle.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • sorry, I simplified the expression for ease of reading

    it's meant to be

    angle(player.x,player.y,mouse.x,mouse.y)

    If you type in "angle(" a little box should appear telling you what parameters it needs, same goes for all expressions.

  • Is the problem that you are using different player animation for each direction?

    You can have a condition for each.

    On mouse click --> spawn whip

                   etc

         [sub event]

         is anglediff(angle(player,mouse),270) less than 22.5

              -> set player animation to UpWhip

         is anglediff(angle(player,mouse),0) less than 22.5

              -> set player animation to RightWhip

         is anglediff(angle(player,mouse),90) less than 22.5

              -> set player animation to downwhip

         etc

    this condition:

    is anglediff(angle(player,mouse),0) less than 22.5

    would simply be system> compare two values.. it's basically asking if the angle is within 22.5 degrees of 0.

    There would be a way of condensing this to one event with a bit of maths and animations named simply as '0', '1', '2', '3'.. but this is an easier starting point.

keepee's avatar

keepee

Member since 6 Jan, 2012

None one is following keepee yet!

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies