The Daily Click ::. Forums ::. Klik Coding Help ::. Collision out of play area?
 

Post Reply  Post Oekaki 
 

Posted By Message

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
30th August, 2012 at 30/08/2012 02:50:24 -

In my game, I have walls to keep the player from falling off of the stage. However, you can still leave the frame from the top for a little bit. My problem is that when someone jumps off-screen to the top and then moves to the side, the walls no longer work. Sorry if I'm not being clear, here's a picture:

Image

Any ideas on how I can stop this from happening?

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

hapsi



Registered
  13/11/2003
Points
  775
30th August, 2012 at 30/08/2012 09:09:06 -

Have you the frame runtime options "Handle bg collisions even in outside window" checkbox on, and in active object's properties "inactivate if too far from window" off, "destroy if too far from frame" off, and "use fine detection" checkbox on?

These options should be always on, on key active objects.

 
[Signature][/Signature]

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
30th August, 2012 at 30/08/2012 21:07:20 -

Yes, I have both of those options on.

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
30th August, 2012 at 30/08/2012 22:07:30 -

Maybe you can do something related to the player's X position, instead of collision with an object?


IF XPos ("player object") < 0
THEN Set XPos ("player object") to 0



...That might solve it.

 
n/a

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
30th August, 2012 at 30/08/2012 22:08:46 -

That's basically what I do with Counter Objects and Alterable Values when I want them to not exceed or go below certain numbers, incidentally. Hopefully the same thing works for X and Y positions.

 
n/a

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
31st August, 2012 at 31/08/2012 03:28:48 -

Thank you, smr, your solution works. It's still kinda bugging me that the method I was using wasn't working, but it probably has something to do with how MMF2 stores level data (i.e. not storing what's out of the play area). If anyone has the explanation, I would appreciate it.

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.
   

Post Reply



 



Advertisement

Worth A Click