Collision side?

Game Editor comments and discussion.

Collision side?

Postby DilloDude » Thu May 11, 2006 10:27 am

I'm wondering, is there a way to find the side of the acto you are colliding with inside the event? I already have two collision events: top side and any side. But in any side, I want a way to find if the side was left, right or bottom (not the top). Is there currently any way to do this? Because I don't want to add another two collision events.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby makslane » Thu May 11, 2006 12:47 pm

Test the direction between event actor and collide actor:

double dir = direction(x, y, collide.x, collide.y);


More:
http://game-editor.com/forum/viewtopic.php?t=1797
http://www.game-editor.com/docs/script_ ... #direction
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby DilloDude » Fri May 12, 2006 7:54 am

Good Idea!
Though it wouldn't work on tiles...
But most of the things I need if for aren't tiles.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest