ID:150414
 
title says it all
Richter wrote:
title says it all

mob/Login()
alert("WELCOME!")
..()

I am in the giving code mood today.
In response to Nadrew
Better yet, put it in client/New(). If you put it in mob/Login() you'll get the welcome message each time you change mobs.

client/New()
src << "Welcome"
..()
In response to Shadowdarke
Unless you are changing a lot of mobs, this dosn't apply.
In response to Lord of Water
It's better to get into good habits from the start. If he always does it in client/New() it will always operate only when the player connects to the game. If he does it in mob/Login(), it will work for some games and for others it will spam you with stuff you don't want. Imagine if Tanks sent you all the login messages each time you left or joined a tank, turret, tower, soldier, decoy or even spectator.
In response to Shadowdarke
Agreed. I do multiple mob switches in my latest game, too -- I learned very quickly.