Thread: How to change npc face direction

Results 1 to 3 of 3
  1. #1 How to change npc face direction 
    Registered Member
    Join Date
    Dec 2010
    Posts
    195
    Thanks given
    9
    Thanks received
    8
    Rep Power
    1
    Hello all i have a problem I followed the how to change standing npc face direction but i cant make the npc look to the north it keep watching to the south

    Here is the code

    Code:
    if (npcs[i].walkingType == 0) {
        switch(npcs[i].npcType) {
            case 494: // banker
            /** 
            * absX and absY of a specific npc you want to change face direction, 
            * if you want all the npcs of the same type to  face 
            * the same direction remove it
            **/
            if(npcs[i].absX == 3256 && npcs[i].absY+1 == 3418) { 
    
            /** 
             * this turns the npc 
             * +1 to absX makes the npc face east, 
             * -1 to absX makes it face west. 
             * +1 to absY makes it face north and 
             * -1 to absY makes it face south.
             **/
                npcs[i].turnNpc(npcs[i].absX, npcs[i].absY+1); 
    
             }
    	  break;
    
             default: // applies to all npc who are only standing, remove if not needed
    	  npcs[i].turnNpc(npcs[i].absX, npcs[i].absY+1); 
    	  break;				
        }
    }
    Please help rep or whatever for the helper
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Mar 2011
    Posts
    1,226
    Thanks given
    245
    Thanks received
    475
    Rep Power
    294
    Because you are facing the same direction with default and the banker:
    Code:
            case 494: // banker
            /** 
            * absX and absY of a specific npc you want to change face direction, 
            * if you want all the npcs of the same type to  face 
            * the same direction remove it
            **/
            if(npcs[i].absX == 3256 && npcs[i].absY+1 == 3418) { 
    
            /** 
             * this turns the npc 
             * +1 to absX makes the npc face east, 
             * -1 to absX makes it face west. 
             * +1 to absY makes it face north and 
             * -1 to absY makes it face south.
             **/
                npcs[i].turnNpc(npcs[i].absX, npcs[i].absY+1); 
    
             }
    	  break;
    Code:
             default: // applies to all npc who are only standing, remove if not needed
    	  npcs[i].turnNpc(npcs[i].absX, npcs[i].absY+1); 
    	  break;
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Dec 2010
    Posts
    195
    Thanks given
    9
    Thanks received
    8
    Rep Power
    1
    Quote Originally Posted by TheLife View Post
    Because you are facing the same direction with default and the banker:
    Code:
            case 494: // banker
            /** 
            * absX and absY of a specific npc you want to change face direction, 
            * if you want all the npcs of the same type to  face 
            * the same direction remove it
            **/
            if(npcs[i].absX == 3256 && npcs[i].absY+1 == 3418) { 
    
            /** 
             * this turns the npc 
             * +1 to absX makes the npc face east, 
             * -1 to absX makes it face west. 
             * +1 to absY makes it face north and 
             * -1 to absY makes it face south.
             **/
                npcs[i].turnNpc(npcs[i].absX, npcs[i].absY+1); 
    
             }
    	  break;
    Code:
             default: // applies to all npc who are only standing, remove if not needed
    	  npcs[i].turnNpc(npcs[i].absX, npcs[i].absY+1); 
    	  break;
    What should it be to make it work ?
    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. [Hyperion] Npc face direction
    By Risk It in forum Help
    Replies: 0
    Last Post: 12-29-2011, 11:45 PM
  2. Change standing npc face direction
    By hayzie in forum Tutorials
    Replies: 52
    Last Post: 08-01-2010, 11:10 AM
  3. Replies: 2
    Last Post: 11-12-2009, 04:07 AM
  4. npc face direction
    By R0cky 0wnz in forum Requests
    Replies: 6
    Last Post: 06-17-2009, 12:49 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
  •