Modifié par Jargh193, 18 août 2010 - 12:28 .
Random Name Generator
Débuté par
Jargh193
, août 18 2010 12:27
#1
Posté 18 août 2010 - 12:27
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.
#2
Posté 18 août 2010 - 01:12
#3
Posté 18 août 2010 - 01:13
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.
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
Posté 18 août 2010 - 01:25
sounds great thanks....wait, what do you have against umber hulks named bob...jk





Retour en haut






