NN81's Recent Forum Activity

  • hi guys,

    is it possible to control mouse cursor from keyboard?

    I need this feature urgently...

    thanks in advance to anyone who reply..

    NB im not intersetead to make a sprite pointer similar and move it with a behavior, i NEED to take the control of the true cursor, but from keyboard instead of mouse.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello everyone,

    I would like to ask which API's use construct2 for the default Gamepad Plugin and if is possible to change them with those used here: http://html5gamepad.com/

    With the Construct2 plugin, in fact, on my gamepad D-PAD and RIGHTSTICK does not work, and left/right triggers works inverted.. But testing my controller on that site everything works perfectly..

    how can explain this?? maybe the C2 gamepad plugins API's are outdated or what else?

  • I don't really have a simpler way per say. I actually don't use the customMovement's push out. Here is the push out/solid replacement I've come up with that works much better:

    how-do-i-make-the-8-direction-behavior-slide-against-wal_p904925?#p904925

    There are a few variations and although the logic is complex it should be usable by just copying it over.

    They don't touch the speed of the object but here's a way to just measure how fast the player is moving and use that for seeing when it's stopped:

    https://www.dropbox.com/s/fuly7efud7rvd ... .capx?dl=1

    Admirable ... you are undoubtedly a pro!!

    Yours that is a job up. Works perfectly, it ALSO PASSED the test of 1/2 pixel space bug that affect the "normal" 8dir collision behavior ( player-box-collision-issue_t192298 )!!!

    Thanks a billion and so many compliments really..

    Just posting in here to remind everyone please to keep things civil - there is no need for personal attacks. Thank you everyone!

    sorry sir <img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes">

  • There's no diagonals in your capx. Anyways the idea's only fault is how far you overlap the wall depends on the speed, which may or may not be acceptable for your purposes. I'd guess in general for any wall in your game you'd put those wall sprites around them. For diagonal you may need to put two of them. Like for a diagonal going down and to the right you'd put a bottom and left sprite along the top right of the sprite.

    Yep, finally a person who understands the problem, and speech relevant/constructive suggestions.

    I was not really looking for a universally valid method to deal with the problem, but right for the game I'm working on now, where Player's speed is constant and I can handle the size of the walls to dampen the sink due to the collision of the box if If it was too fast it would overtake it. The discourse of the diagonal walls is also correct, I had already thought of superimposing the two walls.

    The only fact is that I have to fill the layout of these overlapping sprites along the walls, so I was wondering if anyone found a simpler way, that "push out action" of the "customize movement" behavior you talk you think is simpler?

  • Maybe more carefully placed walls? I haven't tried something like that.

    You can try it yourself, voilà a sample capx..

    https://drive.google.com/open?id=0BwNG7 ... GdOa21Pc2c

    the player box overlap a bit the wall, but in the game i place the invisible wall a little further towards the inside of the room, so the thing is not even noticeable.

    The problem I spoke to you is when I use sloping walls at various angles, in those cases I have not yet felt good how to do that.

  • Last I looked, the 8dir behavior collisions work like this:

    Move the object with it's speed

    if the object overlaps a solid then move it back to it's last non overlapping position and set the speed to 0

    It's a valid way to do it, but it can cause it to stop short of the solid, then speed up again to close the smaller and smaller gap. Aka the effect you are observing.

    So a more desirable behavior would be for the overlapping object to move flush against the solid before stopping.

    Maybe by not using the solid behavior, and using the push out action of the customMovement behavior when overlapping the wall sprite or just doing your own push out with events. I think there have been some other topics with examples of a push out with events.

    Another idea is to keep track if the object is moving or not over multiple frames and only change the animation if it has stayed the same over multiple frames. That should eliminate most of the flickering with the only drawback of causing a slight frame delay for animation changes. So for example if you keep track of 4 frames it could look like this:

    global number f1=0

    global number f2=0

    global number f3=0

    global number f4=0

    every tick

    --- set f4 to f3

    --- set f3 to f2

    --- set f2 to f1

    sprite is moving

    --- set f1 to 1

    else

    --- set f1 to 0

    compare f1+f2+f3+f4 = 4

    --- set animation to walking

    compare f1+f2+f3+f4 = 0

    --- set animation to stopped

    thank you very much for the great help, im actually avoiding the problem using 4 different (non solid) sprites for wall of the rooms, that system work decently, only thing is the problem with irregular wall position, for example wall at differents angle..

  • If a behavior is holding you back, then you can indeed not make a game.

    Is there something in which you can be useful apart from the chats that do not interest me?

    Because if it is the only contribution you can give, you better go for a bath.

    I have a serious problem I am not here to waste time

  • All behaviors that combine 'Deceleration' with a 'Push out of Solids routine' suffer from this.

    The object does not have instantly a speed = zero when the collision happens, it decelerates.

    It also never exactly ends up where the 'Push out of Solids routine' wants to place it, because of the deceleration.

    Ok, so i can not make my game because the behavior is badly programmed?

    Is there not a way to solve it?

  • Hi guys, I have a problem with the collision of a sprite used as a "player box".

    When I go to the walls, not always the collision is perfect. Most often stops at a few pixels from the edge, and just holding down the direction against the wall, or trying to detach me and go back to the wall, it resolves with a perfect collision. This is giving me so much trouble, is there a way to overcome the problem? I point out that the box is a perfect square with "bounding box" collision and NOT "polygon", and the walls too are perfectly square with the "solid" behavior activated.

    Every help would be highly appreciated

    finally i have discovered how to avoid this issue.

    The problem of space between Player Box and Walls, happens when dragging objects on the layout instead of placing them manually Assigning integers pixel values for x, and y position of objects.

    for example if you don't use pixel grid and you drag a wall at X 345,5 position, instead of 345, the issue occur, but if you use integer pixel not occurr

  • As mentioned, this just looks like it is setting to an idle animation when you hit the wall because the player 'is not moving', therefore it will look like the animation is skipping.

    logic is simpe, a box with 8dir behavior, and a sprite everityck set position to the box, that change animation from idle to walk if the 8dir is "on moving" inverted, or "on moving".

    look at this, is the same thing, but without pinned sprite, only a change colour animation.

  • This doesn't really sound like a bug, more of a logic problem in the event sheet for the animations. Do you mean the built-in 8-direction or are you referring to a third-party plugin of some kind? You just need to find a way of splitting out the animations, probably have when key is down/key is not down, rather than when player is not moving.

    8direction plugin due to they manner of manage collision, that when overlap a solid move the sprite some pixels forward and back few times. this is the result (notice the animation switch madly when approach the invisible solid wall):

    NB all sprites are perfectly squared box collision

    https://youtu.be/1rQY0_Ne_KY

  • any idea or workaround about to solve this issue?? i have tried lots but nothing to do, im still trouble with this..

NN81's avatar

NN81

Early Adopter

Member since 9 Feb, 2017

None one is following NN81 yet!

Trophy Case

  • 7-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

9/44
How to earn trophies