Jump to content
  • 0
VM Khemo

Need help with making NPC's Shout [317 Loading 641]

Question

[COLOR="#0000FF"][B][I][SIZE=3]I know how to add NPC shouts(Yellow Text above NPC Head)
and I have made the codes for it, except none of them are working.
A little help please?


I've added this code;[/SIZE][/I][/B][/COLOR]

[CODE] }
}
if (npcs[i].npcType == 211) {
if (misc.random2(30) < = 2) {
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
nps[i].textUpdate = "Welcome to Infinite Crysis!"
}
}
if (npcs[i].npcType == 211 || npcs[i].npcType == 211
|| npcs[i].npcType == 211
|| npcs[i].npcType == 211
|| npcs[i].npcType == 211) {
if (misc.random2(50) == 1) {
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "Welcome to Infinite Crysis!";
}
}[/CODE]

[COLOR="#0000FF"][B][I][SIZE=3]
Under this code;[/SIZE][/I][/B][/COLOR]

[CODE] /**
* Random walking and walking home
**/
if (npcs[i] == null) continue;
if((!npcs[i].underAttack || npcs[i].walkingHome) && npcs[i].randomWalk && !npcs[i].isDead) {
npcs[i].facePlayer(0);
npcs[i].killerId = 0;
if(npcs[i].spawnedBy == 0) {
if((npcs[i].absX > npcs[i].makeX + Config.NPC_RANDOM_WALK_DISTANCE) || (npcs[i].absX < npcs[i].makeX - Config.NPC_RANDOM_WALK_DISTANCE) || (npcs[i].absY > npcs[i].makeY + Config.NPC_RANDOM_WALK_DISTANCE) || (npcs[i].absY < npcs[i].makeY - Config.NPC_RANDOM_WALK_DISTANCE)) {
npcs[i].walkingHome = true;
}
}

if (npcs[i].walkingHome && npcs[i].absX == npcs[i].makeX && npcs[i].absY == npcs[i].makeY) {
npcs[i].walkingHome = false;
} else if(npcs[i].walkingHome) {
npcs[i].moveX = GetMove(npcs[i].absX, npcs[i].makeX);
npcs[i].moveY = GetMove(npcs[i].absY, npcs[i].makeY);
npcs[i].getNextNPCMovement(i);
npcs[i].updateRequired = true;[/CODE]

[COLOR="#0000FF"][B][I][SIZE=3]No compiler problems, everything runs perfectly fine, no problem with the targeted NPC, it just doesn't Shout.[/SIZE][/I][/B][/COLOR]

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
I'm not too good with this stuff but I noticed this.
"nps[i].textUpdate = "Welcome to Infinite Crysis!""
>nps
>>npcs
I'm not sure if it's meant to be like that or not so, just pointing it out.

Share this post


Link to post
Share on other sites

×