Thread: NPC Help

Results 1 to 3 of 3
  1. #1 NPC Help 
    Registered Member
    Join Date
    Sep 2012
    Posts
    31
    Thanks given
    5
    Thanks received
    1
    Rep Power
    11
    So i have a problem with Max here I have changed his Render Animation to be mining, and have him stop his Animation when talked to and he Restarts the Mining animation when the area is reloaded. My problem is he does not turn back to face the rock after talking to him so when you come back hes mining nothing. Is there a way to get him to turn back and reface the rock? I have the methods npc.faceEntity() and npc.faceObject() but i have no clue how to use these as faceEntity only lets me put npc in the parenthesis and faceObject only allows me to have null in the parenthesis. He faces the right way on server restart though as in NPCSpawning.java he is set to face North.

    Also this RSPS isnt loaded with the newer Max NPC in 830+

    Media:
    Attached image
    Attached image
    Reply With Quote  
     

  2. #2  
    Everything is Corrupt
    Corrupt's Avatar
    Join Date
    Oct 2020
    Posts
    115
    Thanks given
    15
    Thanks received
    36
    Rep Power
    63
    not sure if this would help, but you can set in the npc handler a closeinterfaceevent like :

    player.getDialogue().startDialogue("Max");
    player.setCloseInterfacesEvent(() -> {
    npc.faceObject() or whatever the function is in your server.
    });
    Living in a Corrupted World

    Attached image
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Selseus's Avatar
    Join Date
    Aug 2017
    Posts
    386
    Thanks given
    11
    Thanks received
    73
    Rep Power
    84
    There's a function you can apply to npcHandler that notes their direction when spawned and when you close/break interfaces with said npc, npc will return to original direction it was facing when it was spawned.

    Try the above suggestion, if that doesn't work I can fix it super fast for you, just lemme know.
    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. npc help [508]
    By 0v3rc0m3 in forum Help
    Replies: 0
    Last Post: 02-04-2009, 01:51 AM
  2. how do i make train on npc help:)
    By e for ever in forum Help
    Replies: 1
    Last Post: 01-28-2009, 08:22 PM
  3. __ NPC Help Needed __
    By coder sal in forum Help
    Replies: 2
    Last Post: 01-25-2009, 01:02 AM
  4. NPC help
    By PasiipaZ in forum Help
    Replies: 1
    Last Post: 11-08-2008, 05:26 PM
  5. melee on npcs[help?]
    By Toonscape in forum Tutorials
    Replies: 5
    Last Post: 03-19-2008, 10:58 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
  •