View Single Post
  #6  
Old 06-10-2001, 11:59 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
No pulling/pushing is not automatic on the
npcserver. There is
if (actionpulled)
and
if (actionpushed)
and the npc then must move itself and the player.
The script of the table:

NPC Code:

if (created) {
noplayeronwall;
setshape 1,6*16,11*16;
}
if (actionpulled || actionpushed || washit) {
if (washit)
i = playerdir;
else
i = strtofloat(#p(0));
newx = x + vecx(i)*0.5;
newy = y + vecy(i)*0.5;

if (!onwall2(newx,newy,6,11)) {
x = newx;
y = newy;
if (actionpulled) {
playerx += vecx(i)*0.5;
playery += vecy(i)*0.5;
}
}
}



It's not perfect, the player can pull himself into
a wall. But it is working perfectly on npcserver
and you can do your own special effects
like you can do a bowling ball which must be pushed
and then automatically moves