I wanna make it so it sez "There is no one to attack" when you click attack and there's nothing there. How might I go about doing this?
verb .
Attack(mob/M in oview(1))
ID:178553
Apr 27 2002, 10:08 pm
|
|
In response to Vortezz
|
|
I mean, I want it to say something when you use the attack command and there's nothing around to attack.
|
In response to Likwiddraino000
|
|
In response to Likwiddraino000
|
|
Likwiddraino000 wrote:
I mean, I want it to say something when you use the attack command and there's nothing around to attack. Simple. Just change: if(!M) return //if there are no nearby mobs, then don't do anything to: if(!M) ;) =V |
In response to Vortezz
|
|
I put it in there, but it doesn't work. I tried attacking with no one around and it didn't say anything.
verb Attack(mob/M in oview(1)) if(!M) usr << "There's nothing to attack!" |
Personally, I hate this attack system. I prefer attacking the nearest, strongest mob. Here's a sample attack verb :).
You'll need to write your own deathcheck() proc. Please don't just copy and paste this into your game. Try to learn from it :p
=V
PS: This is untested code :)