The Daily Click ::. Forums ::. Klik Coding Help ::. Multiple collision thing
 


 

Posted By Message
This thread has been locked by an administrator

Shawn Wolfram



Registered
  15/08/2003
Points
  435
30th September, 2005 at 17:55:09 -

I know it's possible to make it so certain things happen when you collide something with an object on a certain side, for instance a door, if you run into it from one side it blocks you from that side and the other side does vise versa. I am retarded, so explain.

 
http://www.myspace.com/gidek = Myspace is for fags.

<fag?

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
30th September, 2005 at 20:04:10 -

A common way of doing this is to use 'detectors' there are other methods but this is a pretty simple way. Basically, if you were making a Mario clone you could make a detector which is just an active object (rectangle or square usually) and in the code always set it's position to the bottom of Mario. Then you just test for collisions with the detector to detect if something collides with the bottom of mario (such as jumping on an enemy).

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Shawn Wolfram



Registered
  15/08/2003
Points
  435
30th September, 2005 at 20:46:27 -

But what if it's a moving object? Like a door that opens.

 
http://www.myspace.com/gidek = Myspace is for fags.

<fag?

kjarom



Registered
  08/06/2004
Points
  805
30th September, 2005 at 23:47:18 -

Ok, first, make 2 red lines that have a width of 2 and their heights are equal to the door's height.

In the Event Editor, do this:

+Always
-Set position of (Line 1) to X Left of (Door)
-Set position of (Line 2) to X Right of (Door)
-Make Line 1 invisible
-Make Line 2 invisible

+Player collides with Line 1
-Stop

+Player collides with Line 2
-Stop



...that should do it.

 
You now rockin wit a pro

Shawn Wolfram



Registered
  15/08/2003
Points
  435
1st October, 2005 at 01:39:37 -

ha ha... uh... I'm thinking in terms of top down style, not platform... so the door kind of swings open... so yeah.

EDIT: A Good example of what I'm talking about is Jouni's The Darkest Night. I think the demo is still on this site if you check, that's basically what engine I'm going for.

Image Edited by the Author.

 
http://www.myspace.com/gidek = Myspace is for fags.

<fag?

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
1st October, 2005 at 05:12:09 -

So you want it to be a double hinged door that opens boths directions depending on which side you run into it from?

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Shawn Wolfram



Registered
  15/08/2003
Points
  435
1st October, 2005 at 11:17:56 -

Never thought of doing that, but yeah, I guess a door that does that, that would make things easier gameplay wise. So, can you tell me a simple code that I could mess with a bit?

EDIT: What I have right now is two objects. One is the top half of the door, the other is the bottom half. The both have several animations that run together, and those are Stopped(Closed) Opening (To the south), Open, Closing.

Image Edited by the Author.

 
http://www.myspace.com/gidek = Myspace is for fags.

<fag?

Shawn Wolfram



Registered
  15/08/2003
Points
  435
1st October, 2005 at 16:19:16 -

Nevermind dudes, I figured it out by myself cause I'm a fucking genius.

 
http://www.myspace.com/gidek = Myspace is for fags.

<fag?

Shawn Wolfram



Registered
  15/08/2003
Points
  435
1st October, 2005 at 22:49:30 -

I fucking know, isn't that fucking wild!?

 
http://www.myspace.com/gidek = Myspace is for fags.

<fag?

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
2nd October, 2005 at 07:10:52 -

Administrative Message: This topic has been locked.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy
This thread has been locked by an administrator



 



Advertisement

Worth A Click