NPC Random lightsaber colors

veaseomat

New Member
Joined
Jan 10, 2011
Messages
10
I figured out how to give NPC's random lightsaber colors this morning.

in MMOCoreORB/src/server/zone/objects/creature/ai/AiAgentImplementation.cpp

on line 196 before

readyWeapon = weao;


add this

Locker locker(weao);
if (weao->isJediWeapon()) {
int color = System::random(30);
weao->setBladeColor(color);
weao->setCustomizationVariable("/private/index_color_blade", color, true);
}

in the future i might go a step further and give dark jedi only red and light jedi the rest BUT for now im super happy to see anything other than just red on npc jedi lol.

ENJOY
-Veaseomat
 

eqsanctum

Member
Joined
Mar 26, 2015
Messages
153
Now that is cool. Thanks for the contribution! Had to do the image. Had it sitting around never had a chance to use it lol. Not calling you a Kyle. Definitely appreciate the contribution to the community.

4z9lq2.jpg
 

veaseomat

New Member
Joined
Jan 10, 2011
Messages
10
ha thanks, I'm quite proud of it. just wanted to post it somewhere in case it helps someone, bothered me for a long time.
 

Halyn

That One Guy
Staff member
Moderator
Joined
Jan 11, 2015
Messages
257
Location
Empire in Flames
ha thanks, I'm quite proud of it. just wanted to post it somewhere in case it helps someone, bothered me for a long time.
There's absolutely nothing wrong with small changes for immersion. I did something similar with astromech droids, for the same reason.
 
Top Bottom