ID:179383
 
After returning to BYOND after 9 monthes, I'm quite pleased with the improvements, and decided this system was right for what I'm trying to do :)

But Anyway, After 3 hours of coding I've got a handle on most the code, syntax, etc. But i'm having trouble telling the difference between NPC and PC mobs, and areas.

To start out, I made an easy animated slime icon, and made a slime mob, and placed one on the map. But my DeathCheck script deletes the mob when they die (which is what i want when the player is a character), but in the case of the NPC, I want it to instead warp to a new place and restore their HP. Anyone have any ideas?

Also, I've looked at the demos that are around, but still can't figure this out. Can someone please explain to me how to set up areas on a map, and make it play different music when they walk on it?

Thanks in advance!
Dreq wrote:
But Anyway, After 3 hours of coding I've got a handle on most the code, syntax, etc. But i'm having trouble telling the difference between NPC and PC mobs, and areas.

A PC has a client, an NPC does not. So:

if (!src.client)
...



Also, I've looked at the demos that are around, but still can't figure this out. Can someone please explain to me how to set up areas on a map, and make it play different music when they walk on it?

Define an area class, then in the mapper select that area in the object tree, push the fill button, and drag it out on the map.

For playing music on entry, take a look at the area.Entered() proc.