mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 21:45:15 +02:00
updates to bot script for more bot styles
This commit is contained in:
parent
2626d7db8c
commit
060e5f8c67
1 changed files with 23 additions and 2 deletions
|
@ -25,10 +25,31 @@ positionZ = getRandomFloat(0, 50);
|
|||
Avatar.position = {x: positionX, y: 0, z: positionZ};
|
||||
|
||||
// pick an integer between 1 and 20 for the face model for this bot
|
||||
botNumber = getRandomInt(1, 20);
|
||||
botNumber = getRandomInt(1, 100);
|
||||
|
||||
newBodyFilePrefix = "defaultAvatar";
|
||||
|
||||
if (botNumber <= 20) {
|
||||
newFaceFilePrefix = "bot" + botNumber;
|
||||
} else {
|
||||
|
||||
if (botNumber <= 40) {
|
||||
newFaceFilePrefix = "superhero";
|
||||
} else if (botNumber <= 60) {
|
||||
newFaceFilePrefix = "amber";
|
||||
} else if (botNumber <= 80) {
|
||||
newFaceFilePrefix = "ron";
|
||||
} else {
|
||||
newFaceFilePrefix = "angie";
|
||||
}
|
||||
|
||||
newBodyFilePrefix = "bot" + botNumber;
|
||||
}
|
||||
|
||||
|
||||
// set the face model fst using the bot number
|
||||
// there is no need to change the body model - we're using the default
|
||||
Avatar.faceModelURL = "https://s3-us-west-1.amazonaws.com/highfidelity-public/meshes/bot" + botNumber + ".fst";
|
||||
Avatar.faceModelURL = "https://s3-us-west-1.amazonaws.com/highfidelity-public/meshes/" + newFaceFilePrefix ".fst";
|
||||
Avatar.bodyModelURL = "https://s3-us-west-1.amazonaws.com/highfidelity-public/meshes/" + newBodyFilePrefix ".fst";
|
||||
|
||||
Agent.isAvatar = true;
|
Loading…
Reference in a new issue