lukezero's Forum Posts

  • Hi C2 community!

    I'm trying to find a way to detect an object within an random internal area comprised between a central object and a line composed by dashes generated by the touch of the player around this central object.

    I did this illustration below for you guys better understand the situation. If at least one of these objects stay in this random internal area, the player loses.

    I tried to make it through the Line of Sight behavior, calculating the area composed of each stroke object that makes up the broken touch and the central object, but didn't get success. <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    count_dash*distance(Central_Object.X, Central_Object.Y, Dash.X, Dash.Y)

    count_dash is a varible that count every dash spawned by the touch of the player.

    I thank you in advance your attention and collaboration. ^^

    SOLVED BY blackhornet! Link of CAPX example below:

    http://www.blackhornettechnologies.com/ ... tTest.capx

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

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

  • Try Construct 3

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

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

  • Sure, ^^

  • Master R0J0hound, can you help this padawan here? ^^