View Single Post
  #2  
Old 03-07-2011, 11:29 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quite vague, what're you wanting it to do exactly? You do know if you touch it, you touch it alot of times? I don't know of this would work...

HTML Code:
function onPlayerTouchsMe() {
  this.ani = "walk";
  
  cancelevents("onFinishTouch");
  scheduleevent(0.2, "onFinishTouch", "");
}

function onFinishTouch() {
  this.ani = "idle";
}
It will run "onFinishTouch" 0.2 seconds after the NPC was touched. Reduce time if needed- don't use it serverside (if possible)
__________________
Reply With Quote