Thread: grab
View Single Post
  #5  
Old 08-27-2007, 07:40 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
Quote:
Originally Posted by DustyPorViva View Post
There is onActionpushed/pulled, but no grabbed.
You do so by simply performing a triggeraction on keydown(6).
PHP Code:
function onKeypressed() {
  if (
keydown(6)) triggeraction(player.x+1.5+vecx(player.dir)*2,player.y+2.5+vecy(player.dir)*2,"grabbed",parameters...);

Then, in the NPC, you do something like:
PHP Code:
function onActiongrabbed() {
this.chat="Oh no, some pervert is grabbing me!";

:O thank you D
__________________
**FLIP OUT**
Reply With Quote