Thread: turn npc

Results 1 to 9 of 9
  1. #1 turn npc 
    Registered Member
    Join Date
    Dec 2010
    Posts
    30
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    i have been looking everywhere on moparscape for how to turn an npc. and nobody answered. so i knew it was time to post it on rune-server and hopefully you guys will answer my questtions. How do you turn an npc to face east, west or north because i hate it when the npc always faces south.

    BTW this is a delta 317 base

    Thanks
    - Joe
    Reply With Quote  
     

  2. #2  
    But python...

    Join Date
    Jun 2009
    Posts
    0
    Thanks given
    262
    Thanks received
    379
    Rep Power
    0
    I think it's
    Code:
    public void turnNpc(int i, int j) {
        focusPointX = 2 * i + 1;
        focusPointY = 2 * j + 1;
        updateRequired = true;
        turnUpdateRequired = true;
    }
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Dec 2010
    Posts
    30
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by Ice Cold View Post
    I think it's
    Code:
    public void turnNpc(int i, int j) {
        focusPointX = 2 * i + 1;
        focusPointY = 2 * j + 1;
        updateRequired = true;
        turnUpdateRequired = true;
    }
    i have the same code in my NPC.java but the turnUpdateRequired = true; part. i have facedirection = true; instead.

    and i dont know what to do with this void.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Dec 2010
    Posts
    30
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Bump
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Jan 2008
    Age
    28
    Posts
    1,380
    Thanks given
    76
    Thanks received
    384
    Rep Power
    962
    If you want the NPC to face north you do:

    Code:
    turnNpc(npc.absX, npc.absY + 1);
    For south you do:

    Code:
    turnNpc(npc.absX, npc.absY - 1);
    for east you do:

    Code:
    turnNpc(npc.absX + 1, npc.absY);
    and for west you do:

    Code:
    turnNpc(npc.absX - 1, npc.absY);
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Dec 2010
    Posts
    30
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by BFMV View Post
    If you want the NPC to face north you do:

    Code:
    turnNpc(npc.absX, npc.absY + 1);
    For south you do:

    Code:
    turnNpc(npc.absX, npc.absY - 1);
    for east you do:

    Code:
    turnNpc(npc.absX + 1, npc.absY);
    and for west you do:

    Code:
    turnNpc(npc.absX - 1, npc.absY);
    where do i do this in npc.java below the code? or do i do it in npchandler.java?

    and how do i make the codE?
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Dec 2010
    Posts
    30
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    bump
    Reply With Quote  
     

  8. #8  
    Banned
    Join Date
    Feb 2008
    Posts
    384
    Thanks given
    30
    Thanks received
    26
    Rep Power
    0
    npc mask... It would be in your npc updating stuff.
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Dec 2010
    Posts
    30
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by billygotshot View Post
    npc mask... It would be in your npc updating stuff.
    im new at this so i am not sure what you guys are talking about... i just want a code and know where to put it
    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. How to turn an NPC?
    By Ho H0 Ho in forum Help
    Replies: 3
    Last Post: 06-04-2010, 05:56 AM
  2. How do I turn..
    By The Godz in forum Help
    Replies: 1
    Last Post: 10-20-2008, 05:09 PM
  3. Turn around
    By Fallen Azn SinZ in forum Showcase
    Replies: 0
    Last Post: 02-29-2008, 10:13 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
  •