Vert-I-Go

Member
ServUO Version
Publish Unknown
Ultima Expansion
None
Question:
How would you go about adding effects to a mobile? Like animated art tiles to a mobile. I tried
this.FixedParticles( 0xBA9F, 2, 2220, 0, EffectLayer.Head );
But that didn't seem to work, just wondering if I am heading in the right direction?
Trying to add a quest marker above the head once I can get it to show I can then get it to change once the status of the quest is either open or in progress or complete.
Oh I also tried
this.FixedEffect( 0xBA9F, 2, 2220, 0, EffectLayer.Head );
But I know there is no layer for that one and gives errors since there is no layer for that one gives arguments for it.
From Honest Beggar quest
Compiles just fine just no effects

bbe:
[Constructable]
        public Austin()    : base( AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2 )
        {
            Name = "Austin";
            Title = "the Beggar";
            Race = Race.Human;
            BodyValue = 0x190;
            Female = false;
            Hue = Race.RandomSkinHue();
            InitStats( 100, 100, 25 );

            Utility.AssignRandomHair( this, true );

            AddItem( new Backpack() );
            AddItem( new Doublet() );
            AddItem( new ShortPants( 0x755 ) );

            this.FixedParticles( 0x3779, 10, 2000, 5009, EffectLayer.Waist );

            this.FixedParticles( 0xBA9F, 2, 2220, 0, EffectLayer.Head );

        }
 
Will not show when in the constructor of the mobile, use OnAfterSpawn method or alike to fire the effect once the mobile is in the world! IIRC you could use the constructor but would need to use a call back timer to apply once the mobile constructed!
 
ok got it to somewhat work needs to be tweeked abit
added this
aa:
        public override void OnMovement( Mobile m, Point3D oldLocation )
        {
            base.OnMovement( m, oldLocation );

            if ( InRange( m, 5 ) && !InRange( oldLocation, 5 ) && ( !m.Hidden || m.AccessLevel == AccessLevel.Player ) )
                this.FixedParticles( 0xBA9F, 2, 2220, 0, EffectLayer.Head );
        }
 
Thats a better approach, your initial post would only trigger the effect upon mobile creation.
Might want to add a delay so its effect is not constantly spammed if alot of people are around the NPC, if you want something as a base for the delay you can take a look at SandVortex.cs
 
Oh you mean the sand attack part? ya just getting an idea to initially get it to work on a mobile for now will work on how to get the details ironed out in time will still have to get it worked out on if quest is open use different quest icons when completed and when its open so there is alot more to do one step at a time lol

aa:
        public void SandAttack( Mobile m )
        {
            DoHarmful( m );

            m.FixedParticles( 0x36B0, 10, 25, 9540, 2413, 0, EffectLayer.Waist );

            new InternalTimer( m, this ).Start();
        }
 
Last edited:

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back