Random Race?
So I was looking around for a code to make npc's have a random race upon spawn. I know how to write it for the most part but im having trouble finding which command to use. Only one I see on wiki is
Code:
quest::npcrace(raceid) # Temporarily changes the NPC's race If anyone is unclear I simply want the npc to be a random race when spawning. Would this actually work? (Dont have time to test atm) Code:
Sub EVENT_SPAWN { |
Well I tested it and it doesnt work, Not to sure what I did wrong lol
|
havnt tested this but it should work.
Code:
@races = (464,466,469,458,467,454,367,420,); |
Will give it a shot, will it work like that for gender as well?
|
So tested it and added line for gender as well, only question now is there a way to make the race picked have the correct size? Im getting giant gnomes and small ogres lol if not its no biggy but would like to have them scale size based on the race
|
could create different arrays for big and small races then set the size in the script based on the model
|
Mind giving me an example to build off of? Sounds a bit out of my current skill set lol
|
Replied to your PM, but, posting here all to see:
Code:
sub EVENT_SPAWN { |
Using the following code, checked all races sizes and gender options via GM commands, but all i keep getting are tiny humans.
Code:
sub EVENT_SPAWN { |
As mentioned in your PM I just replied to, but will post if here. You're using a model not loading with the zone. You'll want to research how to modify your /resources/GlobalLoad.txt file based on your requirements/desires.
And yep, first time hearing about tiny humans (this could also be a gender issue, basically, the combination of race/gender doesnt match with what is loaded in the client either because of the globalload and/or because of wrong gender). |
idk man only models im using are playable races, and the code I originally used worked fine, was just having a sizing issue. Here is the code im using now
Code:
sub EVENT_SPAWN { And here is my first code, Code:
@races = (1,2,3,4,5,6,7,8,); |
All times are GMT -4. The time now is 08:04 PM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.