Question or issue with world.Broadcast.

Lemke

Gold Donator
Silver Donator
Sep 26, 2015
32
4
37
Hello!
I spawned a mob in T2A map,when he moves world.Broadcast is generated well,but only can see the broadcast if im in T2A map with the mob,if ill go Felucca,or Trammel,or other map,the broadcast is not visible,why?Here the code im using:

Added this:

C#:
private DateTime LastUse;/////Added to get the world broadcast
        private DateTime LastUseTwo;/////Added to get the world broadcast
        public virtual TimeSpan Delay{ get{ return TimeSpan.FromMinutes( 1 ); } }/////Added to get the world broadcast
        public virtual TimeSpan DoubleDelay{ get{ return TimeSpan.FromMinutes( 1 ); } }/////Added to get the world broadcast
Then the code:

C#:
protected override bool OnMove(Direction d)
        {
        if ( LastUseTwo + DoubleDelay > DateTime.Now  )
                        {   
                            return true;
                        }
                        else
                        {   
                            World.Broadcast( 1590, true, "Agho'r is now walking around T2A map(Felucca),are you ready to find him?..." );
                            LastUseTwo = DateTime.Now;
                        }
          
            return base.OnMove(d);
        }
 

Lemke

Gold Donator
Silver Donator
Sep 26, 2015
32
4
37
could be that the AI sleeps and doesnt walk if nobody is there
Interesting,its possible for sure,is there any method to do the broadcast when he is alive / spawned?Thank you!
 

PyrO

Well-Known Member
Jan 27, 2015
1,074
75
You can do a broadcast from the constructor of that mobile, or have like a global timer hold the reference to the mobile, if the mobile is set you would start the timer. And then go that route.
 
  • Like
Reactions: Lemke