K so I found a small script to make monster rainbow colour change cool for like five secs then i wanted more control but Ima nooble. I was wondering if and how to make a monster cycle specific colours. just to know how. but def want this -{{Also trig colour change based on hp level?}}- for my shard

RECAP
1 how do i cycle specific colours on monster mobile?
2 Can i trig monster colour change based on hp level?
3 Side quest i am looking for a good decompiler as well i wanna Frankenstein a copy of UO steam?
 
Hi,

As Mobile.cs declares :
Code:
public virtual void OnHitsChange(int oldValue)
		{ }

You can add (in BaseCreature, or in spécific monsters) :
Code:
public override void OnHitsChange(int oldValue)
		{  this.Hue = (int)AnotherValue; }

You can also declare something like that in BaseCreature :
Code:
public virtual bool CanTrigColorOnHits{ get { return false; } }
		public override void OnHitsChange(int oldValue)
		{
			if(CanTrigColorOnHits)
			{
				this.Hue = GetNewHue(oldValue);
			}
		}
And then just declare in Monsters you want to change color :
Code:
public override bool CanTrigColorOnHits{ get { return true; } }

Then you can check hits, maybe like that:
Code:
public int GetNewHue(int oldhits)
		{
			if(oldHits > (this.HitsMax / 10))
				return 0xFFFF;
			else
				return 0xAAAA;
		}
 
Back