lukezero's Recent Forum Activity

  • Hi C2 developers!

    I tried in many ways to spawn objects only in a sprite collision area, but still didn't get.

    Now I'm using the code below, but the objects still are generated outside the collision polygon.

    System create objects:

    X: random(Sprite.X-Sprite.Width/2,Sprite.X+Sprite.Width/2)

    Y: random(Sprite.Y-Sprite.Height/2,Sprite.Y+Sprite.Height/2)

    Object isn't overlapping Sprite, then Object Destroy

    Does anyone have a better solution to solve this?

    Thanks in advance the attention and collaboration of all. ^^

    SOLVED BY MadSpy! Link of CAPX example below:

    https://www.dropbox.com/s/a2l4zbk7sfqk9 ... .capx?dl=0

  • lukezero

    Here's an idea.

    It's a good solution,

    I'm trying to implement it in my game containing a predetermined track, but he does not use this behavior (8direction).

    Thanks one more time for your great help!

  • R0J0hound, do you know how to change the direction of the character's animation walking in a eight directions game, but without having to use the behavior of eight directions?

    I've tried the delimitation of the angle and the X position, but I couldn't.

    In advance thank you for your attention and help always. ^^

  • Of course, i'll keep working on this for myself, there is still a LOT to do.

    https://dl.dropboxusercontent.com/u/39210620/Isometroid.capx

    Great job, XpMonster!

    It works very well!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Almost.

    As always - I got a "little" carried away.

    No problem, man.

    When you finish, feel free to post it here.

    Thanks again for your cooperation.

  • Actually, i didn't use any behavior too.

    That is good example of point-movement, but that's absolutely useless for isometric games (And that's exactly what i created).

    XpMonster, dude, your CAPX with the movement for isometric games ready yet?

  • lukezero

    The fact it's isometric doesn't make it any different to regular path following.

    Here's a way to do it:

    https://dl.dropboxusercontent.com/u/542 ... ollow.capx

    It just moves toward the next waypoint. At the start and when the targeted waypoint is changed the distance is calculated in a variable. As the sprite move the distance is reduced by the same amount, and when the distance variable becomes negative we know the waypoint was passed so we target the next waypoint.

    Great example, great R0J0hound, mainly because you didn't use any behavior to do so.

    Thanks one more time for your collaboration! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

  • As the first image,

    But I note that the grid is invisible on stage. Then I think both are useful for what I want. ^^

  • Alright, it's 40x26.

  • Thanks one more time, XpMonster. ^^

    The image size of the Grid is 816x473.

  • Exactly,

    Your CAPX is a good exemple and a good job, but I need something more specific, due to the format of my game.

    Thanks for your collaboration. ^^

  • These black dots in the track are the waypoints that the kid (out of the grid) gonna follow in this stage.

    As I said before, I'm using MoveTo now to do the track movement, but it isn't perfect. Maybe its a collision problem, I don't know.

lukezero's avatar

lukezero

Member since 4 Oct, 2014

None one is following lukezero yet!

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies