Jump to content


Photo

Ignoring solid


  • Please log in to reply
3 replies to this topic

#1 lars141

lars141

    GMC Member

  • GMC Member
  • 716 posts

Posted 04 August 2011 - 07:59 PM

Hey

In my game you can pick up an enemy and walk while holding it in front of you.
When you're not holding an enemy, the enemy can jump around, and bounces when it needs to bounce.
But when you're holding an enemy, it's supposed to ignore the solid wall, yet it doesn't. It gets stuck.
It's still using his move_contact, while he's not supposed to.
I've searched the GMC and only found
place_meeting()
, and making the wall non-solid.
The player needs this though, or else I can code the whole engine from scratch.

If there's no way, can you guys think up an alternative?
  • 0

#2 Jakyl11

Jakyl11

    GMC Member

  • GMC Member
  • 3109 posts
  • Version:GM:Studio

Posted 04 August 2011 - 08:08 PM

you could switch the enemy object out with a temp object while he has it held.
then when he drops or does whatever, it changes back to the enemy.
  • 0

#3 zehevi

zehevi

    GMC Member

  • GMC Member
  • 637 posts
  • Version:GM8

Posted 04 August 2011 - 10:08 PM

By having a collision event with solid object you cannot ignore it, the other object will get stuck.
You might want to change that wall object to other - non solid wall, while the player is grabbing an enemie.
of course the ideal state is checking for collision with non solid wall, means to rebuild the collision checking, but that is your call.
  • 0

#4 lars141

lars141

    GMC Member

  • GMC Member
  • 716 posts

Posted 05 August 2011 - 12:47 AM

So I got 3 ways;
  • Create a temp enemy
  • Replace walls
  • Rewrite engine

I can't just make a temp enemy, I have to start (most of it) all over again.
I'll try replacing walls tomorrow, though I'm not sure how I'm going to do that.
And I really, REALLY prefer, not having to rewrite my whole engine. It took me a lot of time.

EDIT: Unless you could help me with that?

Edited by lars141, 05 August 2011 - 12:51 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users