keepee's Forum Posts

  • 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)

    !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • On the creation of each sprite.. in the same event, create the text object and also set this variable:

    Sprite.TextID to Text.UID

    and then to keep each text updated:

    for each Sprite

    pick Text by UID = Sprite.TextID

    that'll single out the corresponding text object for the actions such as:

    -> set text to Sprite.Health

    -> set text position to sprite.x, sprite.y

    etc

  • Another idea would be to use the "adjust HSL" shader on each sprite and let the player pick exactly what colours.

    Easier than individual sprites but it'll makes your games framerate drop if there's too many shaders.

  • just thought i'd chime in with something relevant here..

    Ashley it can be a problem in other cases.. although the work around is simple.

    I had an event which created text and the clickable area behind it.

    In the same event I set the areas width to be the text.textwidth.. and obviously this didn't work because of what you just said.

    Anyway, the work around was just to add a "wait 0.00001" seconds just to make it set the width on the tick after the text was displayed.

  • It's the bullet you have placed outside of the layout. It's hiding behind another object.

    after 1.5 seconds, there is an event that makes it angle towards the player.

    I'd recommend creating a separate layout and just placing one of each object onto that, instead of placing them off the screen in your actual game layout.

  • It's cos you spawn a 'bullet' but then refer to 'fam_bullets' to set the angle..

    objects and families are like separate things regarding the way C2 picks instances.. so it isn't sure on what to set the angle of.

    just change

    'fam_bullets' set bullet angle of motion..

    to

    'bullet' set bullet angle of motion

  • ramones, nice..wish I thought of that.