Thread: Change standing npc face direction

Page 4 of 6 FirstFirst ... 23456 LastLast
Results 31 to 40 of 53
  1. #31  
    Programmer, Contributor, RM and Veteran




    Join Date
    Mar 2007
    Posts
    5,074
    Thanks given
    2,625
    Thanks received
    3,579
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by Luke132 View Post
    Then what is the 'direction" variable for ?
    Facing a player or another npc.
    .
     

  2. #32  
    Ed
    Ed is offline
    AKA Edvinas
    Ed's Avatar
    Join Date
    Jun 2009
    Age
    28
    Posts
    4,504
    Thanks given
    523
    Thanks received
    512
    Rep Power
    2659
    is this tut for 317 or something? Cuz I my 508 server doesn't have NPCHandler file :/
     

  3. #33  
    Registered Member P A N I C's Avatar
    Join Date
    Jan 2007
    Posts
    174
    Thanks given
    0
    Thanks received
    0
    Rep Power
    58
    This didnt work for me, npcs still face south. Any help?
    Exactly.
     

  4. #34  
    Vira_
    Guest
    People have wanted this for ages, good release.

    You could handle this and use a cfg file for each NPC, I could work on that and post it here if anyone wants it.
     

  5. #35  
    Registered Member
    Steven317's Avatar
    Join Date
    May 2008
    Age
    28
    Posts
    1,133
    Thanks given
    19
    Thanks received
    24
    Rep Power
    573
    Nice.

    mts


    If you need any help, PM me.
    114407 reputation points



     

  6. #36  
    Registered Member
    Pride's Avatar
    Join Date
    Mar 2008
    Posts
    727
    Thanks given
    0
    Thanks received
    1
    Rep Power
    121
    Hmm, I'm trying to intergrate this into the autospawn config file, It ca be read and everything, Just.... arr someone reason You can't turn the Npc before it's loaded, At least... I think its that, So, Anyone have an idea what i can do?
    Code:
    public void newNPC(int npcType, int x, int y, int heightLevel,
    			int WalkingType, int HP, int maxHit, int attack, int defence,
    			String Turn) {
    		// first, search for a free slot
    		int slot = -1;
    		for (int i = 1; i < maxNPCs; i++) {
    			if (npcs[i] == null) {
    				slot = i;
    				break;
    			}
    		}
    
    		if (slot == -1)
    			return; // no free slot found
    
    		NPC newNPC = new NPC(slot, npcType);
    		newNPC.absX = x;
    		newNPC.absY = y;
    		newNPC.makeX = x;
    		newNPC.makeY = y;
    		newNPC.heightLevel = heightLevel;
    		newNPC.walkingType = WalkingType;
    		newNPC.HP = HP;
    		newNPC.MaxHP = HP;
    		newNPC.maxHit = maxHit;
    		newNPC.attack = attack;
    		newNPC.defence = defence;
    		npcs[slot] = newNPC;
    		/*try {
    			if (Turn.contains("N")) {
    				newNPC.turnNpc(newNPC.absX, newNPC.absY + 1);
    			} else if (Turn.contains("E")) {
    				newNPC.turnNpc(newNPC.absX - 1, newNPC.absY);
    			} else if (Turn.contains("S")) {
    				newNPC.turnNpc(newNPC.absX, newNPC.absY - 1);
    			} else if (Turn.contains("W")) {
    				newNPC.turnNpc(newNPC.absX + 1, newNPC.absY + 1);
    			}
    		} catch (Exception e) {
    		}*/
    	}
    
    	{
    		NPC.turnUpdateRequired = true;
    	}
    Here's what I had, But didn't work
    I tested the token2[8] And it's read Perfectly!
    Which means it's the method
     

  7. #37  
    Registered Member
    Xynth's Avatar
    Join Date
    May 2009
    Posts
    2,222
    Thanks given
    226
    Thanks received
    259
    Rep Power
    1155
    Try making it so process() isn't used. I figured it out =]. Nice TUT. Repped =].
     

  8. #38  
    Client Developer

    Pb600's Avatar
    Join Date
    Dec 2008
    Posts
    2,184
    Thanks given
    306
    Thanks received
    489
    Rep Power
    925
    i twork in delta? cause dont work for me, i really want this...
     

  9. #39  
    Registered Member
    Join Date
    Jan 2010
    Posts
    83
    Thanks given
    1
    Thanks received
    1
    Rep Power
    1
    please help i would like to kno how to make this work on deltscape
     

  10. #40  
    Registered Member
    Join Date
    Dec 2009
    Posts
    11
    Thanks given
    0
    Thanks received
    1
    Rep Power
    1
    Doesn't work on Delta?
     

Page 4 of 6 FirstFirst ... 23456 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •