Interrupting MoveTo on Collision / Player Death / etc...

Non-platform specific questions.

Interrupting MoveTo on Collision / Player Death / etc...

Postby fauldran » Thu Jan 12, 2006 7:30 pm

Scenario:
I have a player character that you move using the mouse/stylus. Tap the ground he tries to walk to that point. I’m using physical response to keep the player from walking through walls. All that is working great.
Its an isometric perspective.

Question:
The player is animated by choosing an animation when MoveTo is executed (walk animation) and then choosing another animation in the Move Finish event (idle animation).

How do I interrupt the MoveTo when a collision occurs and return the player to his idle animation (by way of the Move Finish event)?

Possible Solutions:
I have tried executing another MoveTo when a collision occurs that tells the player to move to the players current position. This always causes the player to get “stuck” in the wall though.

I have also tried using To Anterior Position but I am not sure that I understand exactly how that works. I run into the same problems with it. The player either gets stuck in the wall or can be forced through the wall.

Some kind of sliding collision would be a great feature of GE.
fauldran
 
Posts: 43
Joined: Tue Dec 20, 2005 10:52 am
Score: 0 Give a positive score

Postby makslane » Fri Jan 13, 2006 4:18 pm

Tr Move To with this options:

Actor: player
Relative to: player
Position: 0, 0
Velocity: 1
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby fauldran » Sat Jan 14, 2006 8:33 pm

That seems to work fine. Thanks.
fauldran
 
Posts: 43
Joined: Tue Dec 20, 2005 10:52 am
Score: 0 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron