How do I set on touch movement (advanced)

Get help using Construct 2

Post » Tue Jan 19, 2016 7:19 pm

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

Image
Image
Image

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

any advice would be great. Thanks Jeremy C.
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Tue Jan 19, 2016 7:29 pm

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.
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Tue Jan 19, 2016 9:40 pm

Could you explain what the problem is exactly?
In what way have you set the boundaries?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Jan 19, 2016 10:33 pm

LittleStain wrote: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.
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Wed Jan 20, 2016 1:06 am

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).
Image

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.
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Wed Jan 20, 2016 10:21 am

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
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Jan 20, 2016 11:00 am

LittleStain wrote: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.
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Sun Jan 24, 2016 11:49 pm

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
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Mon Jan 25, 2016 10:16 am

You could use pathfinding instead of moveto?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Jan 26, 2016 12:14 am

LittleStain wrote: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
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Next

Return to How do I....?

Who is online

Users browsing this forum: wertt22 and 6 guests