Aller au contenu

Photo

Random Name Generator


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
Jargh193

Jargh193
  • Members
  • 18 messages
How can I, or should I say what would the script be to, OnSpawn or a creature/npc set a random name? and I mean for like all monsters/npcs.

Modifié par Jargh193, 18 août 2010 - 12:28 .


#2
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
This should help

Good luck.

#3
TSMDude

TSMDude
  • Members
  • 865 messages
nw_default9 I think it is. Just set in there something like this;



Added a new Creature name randomization feature to the default OnSpawn script ("nw_c2_default9.nss")

By setting a new variable int X2_NAME_RANDOM to 1 on a creature template in the toolset, the module creature can now tell creatures to randomize their name on Spawn. By default this will cause the creature to change it's name to a name generated by the RandomName command. For module builders not satisfied with the name selection provided by the RandomName command, the ability to override this behavior with a random name generation script of their choice has been included: If a script called "x3_name_gen.nss" exists in a module, it will be executed on spawn of any creature template that has random name generation activated. The builder can then specify a return value for that custom name generation script by setting a string variable named "X3_S_RANDOM_NAME" on OBJECT_SELF (the creature spawning), which will then be used instead of RandomName().



OR you can just set a exucute script on spawn of the above somewhere near the end with this x3_name_gen.nss being called but then you might end up with Umber Hulks named Bob or somewthing...so I recommond you do it for things like Bandits and such.

#4
Jargh193

Jargh193
  • Members
  • 18 messages
sounds great thanks....wait, what do you have against umber hulks named bob...jk