Thread: [718] How do i let NPC's Face specific Directions?

Results 1 to 6 of 6
  1. #1 [718] How do i let NPC's Face specific Directions? 
    Registered Member
    Join Date
    Feb 2013
    Posts
    88
    Thanks given
    0
    Thanks received
    6
    Rep Power
    12
    Hello,

    I'm making a brand new home location also with alot of shops.
    All the NPC's With those Shops have Custom names, example: "Hunter Store", "PvP Store", "Donator Shop"
    So it would be way easier to find wich shop has what kind of items...

    Unfortunatly i also would rather my NPC's not facing to the wall... Is there any guide/tutorial/snippet that can help me out?
    I would like to face most of my NPC's to East but if possible also some to South,

    Thanks, - Blexx
    Reply With Quote  
     

  2. #2  
    The stupid noob


    Join Date
    May 2011
    Age
    26
    Posts
    2,227
    Thanks given
    2,447
    Thanks received
    1,100
    Rep Power
    852
    Code:
    public void setNextFaceWorldTile(WorldTile nextFaceWorldTile) {
    		if (nextFaceWorldTile.getX() == getX()
    				&& nextFaceWorldTile.getY() == getY())
    			return;
    		this.nextFaceWorldTile = nextFaceWorldTile;
    		if (nextWorldTile != null)
    			direction = Utils.getFaceDirection(nextFaceWorldTile.getX()
    					- nextWorldTile.getX(), nextFaceWorldTile.getY()
    					- nextWorldTile.getY());
    		else
    			direction = Utils.getFaceDirection(nextFaceWorldTile.getX()
    					- getX(), nextFaceWorldTile.getY() - getY());
    	}
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Feb 2013
    Posts
    88
    Thanks given
    0
    Thanks received
    6
    Rep Power
    12
    Okay thanks, So here's the noob in me... Can you give a little bit of instruction? like how to face them East or North where to exactly place this etc?
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Feb 2013
    Posts
    88
    Thanks given
    0
    Thanks received
    6
    Rep Power
    12
    Not Completely solved yet... Any Instructions from anyone please? =)
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Feb 2013
    Posts
    88
    Thanks given
    0
    Thanks received
    6
    Rep Power
    12
    Bump
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jul 2009
    Posts
    146
    Thanks given
    5
    Thanks received
    1
    Rep Power
    1
    Quote Originally Posted by Blexx View Post
    Hello,

    I'm making a brand new home location also with alot of shops.
    All the NPC's With those Shops have Custom names, example: "Hunter Store", "PvP Store", "Donator Shop"
    So it would be way easier to find wich shop has what kind of items...

    Unfortunatly i also would rather my NPC's not facing to the wall... Is there any guide/tutorial/snippet that can help me out?
    I would like to face most of my NPC's to East but if possible also some to South,

    Thanks, - Blexx
    Add it on entity.java under
    public WorldTile getNextFaceWorldTile() {
    return nextFaceWorldTile;
    }
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 13
    Last Post: 02-07-2017, 11:21 PM
  2. Replies: 5
    Last Post: 02-06-2013, 10:39 PM
  3. [613] Face directions
    By dragonkk in forum Configuration
    Replies: 8
    Last Post: 07-30-2010, 02:20 AM
  4. Replies: 1
    Last Post: 06-15-2010, 05:20 PM
  5. make npcs face certin directions (iclarity)
    By Burn_out in forum Snippets
    Replies: 13
    Last Post: 10-21-2009, 08:28 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •