Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-29-2006, 04:45 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
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!!!
Reply With Quote
  #2  
Old 03-30-2006, 08:07 PM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
You could check to see if the players x/y is inside the npcs width/height without a special new command.
Reply With Quote
  #3  
Old 04-01-2006, 07:35 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by konidias
You could check to see if the players x/y is inside the npcs width/height without a special new command.
Show me an efficient way of detecting it serverside, and then I'll stop being pissed off at you.
Reply With Quote
  #4  
Old 04-15-2006, 03:51 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
I have recently realized that gscript could also be expanded for increased functionality of this suggestion.
setshape could be expanded to have a mode for ellipses with x-radius and y-radius, or to have a mode for {x1,x2},{y1,y2}

Ellipses would be good for round arenas, or round damage fields.
Array-based coords would be good for a damaging object that moves at angles and lays damage fields around its path. Perhaps instead of {x1,x2},{y1,y2}... maybe something more like what showpoly uses. In that case I could very easily make a donut-shaped damage field.

Another good reason to have this would be for modifying the movement system to turn off players blocking on certain areas (though this is the only one that would be implemented clientside, and in which case it's doable without the event handlers, but simplified through the use of the event handlers).
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:48 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.