|
team canada
|
 |
Join Date: Jul 2004
Location: Canada
Posts: 5,200
|
|
Setshape2 and attachplayertoobj ARGH
Oh boy two problems in one day. OK so im trying to make a passenger boat script. So a group of people can jump on and have a jolly good time exploring the ocean. Problem is everytime I get on the boat I get warped down a level except I can see still all the npcs and players in that same level.
PHP Code:
if (created) {
setstring this.level,#L,#v(x),#v(y);
setimg ship1.gif;
setshape 1,32,32;
this.isadummynpc = true;
}
if (playerchats) {
if (strequals(#c,destroy)) {
detachplayer;
sendtonc boat destroyed;
destroy;
}
}
//#CLIENTSIDE
if (created) {
setshape2 14, 25, {
11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 22, 22, 22, 22, 22, 22, 22, 22, 11, 11, 11,
11, 11, 11, 22, 22, 22, 3, 3, 22, 22, 22, 11, 11, 11,
11, 11, 22, 22, 3, 3, 3, 3, 3, 3, 22, 22, 11, 11,
11, 11, 22, 0, 3, 3, 0, 0, 3, 3, 0, 22, 11, 11,
11, 11, 22, 0, 0, 0, 0, 0, 0, 0, 0, 22, 11, 11,
11, 11, 22, 0, 0, 0, 22, 22, 0, 0, 0, 22, 11, 11,
11, 11, 22, 0, 0, 22, 3, 3, 22, 0, 0, 22, 11, 11,
11, 11, 22, 0, 0, 22, 3, 3, 22, 0, 0, 22, 11, 11,
11, 11, 22, 0, 0, 0, 3, 3, 0, 0, 0, 22, 11, 11,
11, 11, 22, 0, 0, 0, 3, 3, 0, 0, 0, 22, 11, 11,
11, 11, 0, 0, 0, 22, 3, 3, 22, 0, 0, 0, 11, 11,
11, 11, 0, 0, 0, 22, 3, 3, 22, 0, 0, 0, 11, 11,
11, 11, 22, 0, 0, 0, 22, 22, 0, 0, 0, 22, 11, 11,
11, 11, 22, 0, 0, 0, 0, 0, 0, 0, 0, 22, 11, 11,
11, 11, 22, 0, 0, 0, 0, 0, 0, 0, 0, 22, 11, 11,
11, 11, 22, 22, 0, 0, 0, 0, 0, 0, 22, 22, 11, 11,
11, 11, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 11, 11,
11, 11, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 11, 11,
11, 11, 11, 22, 22, 22, 22, 22, 22, 22, 22, 11, 11, 11,
11, 11, 11, 11, 22, 22, 22, 22, 22, 22, 11, 11, 11, 11,
11, 11, 11, 11, 11, 22, 22, 22, 22, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 22, 22, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, };
}
if (playertouchsme) {
setplayerprop #c,Jump in the water and Press A to leave!;
attachplayertoobj 0,id;
}
if (timeout && playerattached){
if (keydown(6)){
detachplayer;
enabledefmovement;
setplayerprop #c,You disembark the boat.;
}
if (!playerx in |x,x+14|) {
if (!playery in |y,y+25|) {
playerx=x+6;
playery=y+14;
}
}
}timeout=.05;
Edit:Another Update in script!
The Graphic im using is also attached.
My Problems Before and After pictures also included!
Help would be much appreciated!  |
Last edited by fowlplay4; 01-27-2006 at 05:11 AM..
Reason: Script Update
|