Jump to content


Photo

[WANT]move_outside_solid/all to a specific object


  • Please log in to reply
1 reply to this topic

#1 pikmin4000

pikmin4000

    GMC Member

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

Posted 18 April 2012 - 04:32 PM

I am making a platform game and whenever player is stuck inside floor, game automatically pushes him out using move_outside_solid(). Now the same thing does not work with obj_ledge because it does not function correctly as a solid.

So I would like someone to create a script that pushes something out of something else in a certain direction with a max distance.

it would look like:
move_outside_object(dir,maxdist,obj)
  • 0

#2 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Retired Staff
  • 15412 posts
  • Version:GM:Studio

Posted 18 April 2012 - 05:28 PM

if you are player in collision with the block...

event player collision with block:

with(other) solid = true;
move_outside_solid(...);
with(other) solid = false;

or from the other site of the logic
event block collision with player
solid = true;
with(other) move_outside_solid(...);
solid = false;
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users