View Single Post
  #3  
Old 03-07-2011, 11:30 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
There is no "Stops Touching Me" event, depending on the situation I would do something like this:

PHP Code:
function onPlayerTouchsMe() { 
  if (
this.ani != "walk"this.setcharani("walk",null);
  
setTimer(0.25); 
}

function 
onTimeout() {
  
this.setcharani("idle""");

Provided the player continues to touch the NPC it won't timeout (because it will keep getting reset to 0.25) and go to the idle position. Maybe adjust the timer to suit your needs though.

Edit: Well... Timeout, scheduleevent, same difference.
__________________
Quote:
Reply With Quote