Newbie Question about sprite movements.

Get help using Construct 2

Post » Wed Oct 16, 2013 7:12 pm

@maxdilbe in construct2, when you select new project there is an example of move to mouse.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
53
S
16
G
8
Posts: 6,157
Reputation: 19,744

Post » Wed Mar 12, 2014 5:41 am

@Yann How can I avoid the sprite getting collapse when the Touch.X, Touch.Y is the same spot as Collision.X, Collision.Y on the Diablo Like Movement? For example, if the character arrives to the place being touch, then the sprite alternates between up/down or left/right. I guess it does not know which one is the right direction. Is there a way to have it with an offset? I tried modifying the Set Position under Is Moving, but it didn't work.

Thanks!
B
8
S
3
G
1
Posts: 135
Reputation: 2,209

Post » Wed Mar 12, 2014 6:30 pm

@gfigueroa
you could do something like
Code: Select all
+ System: distance(touch.X,touch.Y,character.X,character.Y) < speed * dt
        -> set character to (Touch.X,Touch.Y)
+ else
        -> move (I don't remember how the character is moved though :D)
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sun Mar 16, 2014 2:19 pm

@Yann Thank you so much! this gave me a starting base... I will post the result if successful :) !!!!
B
8
S
3
G
1
Posts: 135
Reputation: 2,209

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests