
03-29-2006, 04:45 AM
|
|
Former Classic Staff
|
 |
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
|
|
Event Handlers for player entering/leaving an NPCs shape
|
I suggested this in my Tech Support thread on playertouchsme, but it certainly hasn't received any attention, and the Future Improvements forum is certainly a more appropriate place for it.
Every NPC has an x,y,width, and height. However, there is no event handler for entering the shape of the NPC. The event handler "playertouchsme" doesn't cut it because it detects the area in front of the player rather than the base of the player.
I'm not saying there's no way of detecting if a player is within the shape of an NPC. I'm saying there's no efficient serverside way of detecting it.
onPlayerEntersMyShape
onPlayerLeavesMyShape
It may be difficult to write code for detecting if a player leaves the shape of an NPC if the NPC's x/y/width/height remain dynamic. Such is the reason we can't have an event called when an NPC touches a player. Because of this, it would make sense to declare the NPC's coordinates and shape as static using a command, that would, in turn, enable the event handlers.
This would be useful in
1. Damage Systems
2. Sparring/PK/Event Areas
3. Any quest activity that might require a player standing on something. This can be extended into multiplayer quests where different players must be in different areas.
I guarantee that other ideas can be expanded from this.
PLEASE!!! WE SERIOUSLY NEED THIS!!! |
|
|
|