Thread: Bridge
View Single Post
  #8  
Old 06-11-2002, 12:28 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
NPC Code:

//Easy Bridge By Warcaptain
//#CLIENTSIDE
if (playerenters){
dontblock;
this.sw=int(imgwidth(#f)/16); //converts the width to tile
this.sh=int(imgheight(#f)/16); //converts the heightto tile
}

if (playerenters||timeout){
//checks if player is in range to be on the bridge
if (playerx in |x,x+this.sw-2.75|&&playery in |y-2,y+this.sw-2|){
attachplayertoobj 0,id;
drawunderplayer;
}elseif (playerattached){
playerx+=vecx(playerdir)*.5; //makes sure player gets off
playery+=vecy(playerdir)*.5; //makes sure player gets off
detachplayer;
drawoverplayer;
}
timeout=.05;
}


there, easy bridge by warcaptain :-)
all you need to do, is add setshape2 blah

and this isnt really a bridge, you can work the special walk under script from here
its more a walk on script
Reply With Quote