How do I set on touch movement (advanced)

0 favourites
  • 11 posts
From the Asset Store
10 Beautiful Pokemon-like Building Pixel Art Sprite Sets
  • Issue with outside layout, outside collision zones.

    Trying to get player to move within set bounders on touch set x set y

    Tried moveto plugin, tried 8 way movement, tried bullet, tried pathfinding.

    can get to work with arrow keys but on touch overlapping occurs

    I am trying to learn how to make a Maniac Mansion Style Game.

    any advice would be great. Thanks Jeremy C.

  • Needs to be on tap (move to)

    as on hold is use to look around.

    and on touching object is use to interact with items and options.

  • Could you explain what the problem is exactly?

    In what way have you set the boundaries?

  • Could you explain what the problem is exactly?

    In what way have you set the boundaries?

    Sprite2 (solid) Lite_Gray Blocks in photos

    Player (solid)

    On tap (moveto plugin) = touch.x touch.y

    if player collision with object (player set x or y to self.x or y

    but still does not detect collision.

    if using arrows keys with 8 way on it detects the collisions and won't allow player to cross into sprite2 area lite_Gray area in photos.

    I have tried to set max.x, max.y, min.x, min.y for touch but can't move when tap.

    I have tried set player.x or y at sprite2.x or y on collision but no good. still moves past solid objects.

    I have tried bullet movement set angle to touch.x, y the player, but just kept moving past the solid objects.

    I have tried on tap stimulate control left,right,down,up (8 way movement) which works but will not move to touch.x,y with out holding the tap down. so issue is need to move until collision detected. instead on only moving a few pixels on tap.

    I have tried pathfinding but get really weird movement and still moves past collision with object.

  • Point and Click style games with Construct 2

    Ok! here is what I have fingered out so far.

    I removed all border blocks (Light_Gray)

    I created on tap borders as shown in photo below using the (MoveTo Plugin).

    To get to areas that are out side the bounds of normal walking.

    I set on tap object (door) moveto x,y where door is = to Image point top/middle of player in front of door.

    thus if objects are in the room. Tap object = moveto x,y of where player is standing near object.

    The rest of the game should be easy to recreate as look is while touching over object.

    and on touch set options like pick up, use, drop, switch, turn on, turn off.

    if setting on = false on touch object (light switch) = turn on light.

    pretty much straight forward from here on out.

    Thanks for all who tried to help me. Jeremy C.

    Best way to learn is to keep pecking away at it until you get it to do what you want it to do.

  • So what you are trying to do is this?

    on tap

    moveto x= clamp(touch.x,79,199) y = clamp(touch.y,158,199)

    This event could replace event 2-11

  • So what you are trying to do is this?

    on tap

    moveto x= clamp(touch.x,79,199) y = clamp(touch.y,158,199)

    This event could replace event 2-11

    Cool thanks that will free up a lot of events and make the game smaller

    I have been work on the over all design and fill it is coming alone great so far.

    That will come in handy. Thanks again. Jeremy C.

  • Ok! I have made the mods for 2-11 which works nice. I have set animation left - right - default. I have added open / close doors. (first 2 doors only so far.)

    With that said how would I fix the issue where player keeps walking over objects.

    I tried to create a .capx file but it will not play without all the files.

    So I will post it to arcade under misc games. for testing.

    https://www.scirra.com/arcade/role-play ... es/mm-5070

    also note I tried to set walk to points to move around stuff just looks weird.

    So not really an option.

    Needs something like move at angle to set Y then moveto destination.

    any ideas?

    Thanks again for any suggestions that might help make the movement better.

    Jeremy C

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use pathfinding instead of moveto?

  • You could use pathfinding instead of moveto?

    tried that but he kept walking in a circle for 3-6 sec before moving to mouse x, y

  • > You could use pathfinding instead of moveto?

    >

    tried that but he kept walking in a circle for 3-6 sec before moving to mouse x, y

    It should work fine if you use the correct events/actions..

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)