Thread: [562] NPC Directions [562]

Results 1 to 8 of 8
  1. #1 [562] NPC Directions [562] 
    Registered Member Repo's Avatar
    Join Date
    Aug 2011
    Posts
    31
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Well, in NPC.java, here's my code.
    Code:
    	public int getFaceDirection() {
    		switch(getId()) {
    	case 9713: //Npc Id
    		return 6; //direction
    	case 9711: 
    		return 8; 
    	}
    		return 1; //direction for npcs not mentioned above (like the default direction)
    	}
    The first NPC works, and is facing the right direction, but the second one doesn't change. Anything after the first NPC is ignored. How can I fix this?
    Reply With Quote  
     

  2. #2  
    Registered Member Repo's Avatar
    Join Date
    Aug 2011
    Posts
    31
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Bump. :/
    Reply With Quote  
     

  3. #3  
    Hi.

    'Mystic Flow's Avatar
    Join Date
    Nov 2007
    Posts
    7,141
    Thanks given
    256
    Thanks received
    1,247
    Rep Power
    3636
    Do System.out.println(getId()) and make sure you have the right npc id

    [Only registered and activated users can see links. ]

    Reply With Quote  
     

  4. #4  
    Mug Club


    Join Date
    Jul 2011
    Age
    26
    Posts
    1,873
    Thanks given
    509
    Thanks received
    890
    Discord
    View profile
    Rep Power
    332
    Wrong mystic

    Code:
    	public int getFaceDirection() {
    		switch(getId()) {
    	case 9713: //Npc Id
    		return 6; //direction
    	case 9711: 
    		return 8; 
            default:
                    return 1;
    	   }
    	}


    My Open Source Projects
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #5  
    Hi.

    'Mystic Flow's Avatar
    Join Date
    Nov 2007
    Posts
    7,141
    Thanks given
    256
    Thanks received
    1,247
    Rep Power
    3636
    Quote Originally Posted by TitanPK View Post
    Wrong mystic
    I was just asking for him to debug his code -_-

    [Only registered and activated users can see links. ]

    Reply With Quote  
     

  6. #6  
    Registered Member Repo's Avatar
    Join Date
    Aug 2011
    Posts
    31
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by TitanPK View Post
    Wrong mystic

    Code:
    	public int getFaceDirection() {
    		switch(getId()) {
    	case 9713: //Npc Id
    		return 6; //direction
    	case 9711: 
    		return 8; 
            default:
                    return 1;
    	   }
    	}
    Didn't work.
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Oct 2008
    Posts
    865
    Thanks given
    75
    Thanks received
    56
    Rep Power
    483
    That's because it's pretty much that same as what you have in the first post. Do what Mystic said. It's much easier to tell what's going on.
    Reply With Quote  
     

  8. #8  
    Registered Member Repo's Avatar
    Join Date
    Aug 2011
    Posts
    31
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by thedoom View Post
    That's because it's pretty much that same as what you have in the first post. Do what Mystic said. It's much easier to tell what's going on.
    I don't understand what he meant ..
    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: 1
    Last Post: 08-14-2011, 08:36 PM
  2. Replies: 3
    Last Post: 08-05-2011, 11:04 PM
  3. Best way of finding directions
    By Mrquarterx in forum Help
    Replies: 9
    Last Post: 01-10-2011, 10:08 PM
  4. Google Maps Directions :)
    By Nathan in forum Chat
    Replies: 4
    Last Post: 11-13-2010, 12:29 AM
  5. [613] Face directions
    By dragonkk in forum Configuration
    Replies: 8
    Last Post: 07-30-2010, 02:20 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •