Jump to content


Photo

how to make an object avoid an object


  • Please log in to reply
2 replies to this topic

#1 Fratrino

Fratrino

    GMC Member

  • New Member
  • 131 posts

Posted 16 January 2012 - 11:39 PM

how do i make an object avoid an object to get to another object?


picture example

Posted Image
  • 0

#2 Sirosky

Sirosky

    GMC Member

  • GMC Member
  • 1323 posts
  • Version:GM8

Posted 16 January 2012 - 11:45 PM

You would use mp_potential_step_object(). Read up more on motion planning here.
  • 0

#3 Ventwig

Ventwig

    GMC Member

  • New Member
  • 279 posts

Posted 16 January 2012 - 11:47 PM

mp_potential_step(x,y,stepsize,checkall)
in this case:
mp_potential_step(player.x,player.y,5 /*set speed */,false)
put in step event, make sure wall is solid, will not always work
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users