1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

forced back/ pushed OnBlock

Discussion in 'Development' started by Alex, Nov 6, 2017.

  1. Alex

    Alex Spider Jockey

    Messages:
    28
    GitHub:
    Bichwha
    Im interested to know if theres a way to code a publicfuntion on whenever a player walks to a certain area they would be pushed back.
     
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    please use development for coding help
     
  3. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    Please show proof of a previous attempt
     
  4. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    I'd use either PlayerMoveEvent or a task and check if the player is in the area. If he/she is, then use Player->setMotion() to push him/her back.

    Edit: Fixed a typo and added a link
     
    jasonwynn10 likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.