Banned
|
 |
Join Date: Oct 2002
Location: Toronto, Ontario, Canada
Posts: 807
|
|
Setshape Ganis?
Ok Im making this thing that requires setshape2 for a gani.. im not sure if I use setshape2 or if there is another way of doing this... I did some tests first. To get familiar with setshape2 I did this
NPC Code:
if (created) {
setimgpart od_fishingboat0.gif,47,0,79,195;
drawunderplayer;
setshape2 5,12,{
0,0,22,0,0,
0,22,22,22,0,
22,22,22,22,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22,22,22,22,22,
22,22,22,22,22,
0,0,22,0,0,
0,0,22,0,0,
};
}
if (playertouchsme) {
playerx=35;
playery=45;
attachplayertoobj 0,id;
this.mode=1;
}
if (created||timeout) {
if (this.mode==1) {
playerx=x+2.5;
playery=y+1.5;
y-=1;
}
timeout=.1;
}
Then I tried it in a gani and stuff.. no luck..
NPC Code:
if (playerenters) {
toweapons Boat;
}
if (weaponfired) {
this.on=1-this.on;
timeout=.05;
}
if(timeout) {
if (this.on==1) {
setshape2 5,12,{
0,0,22,0,0,
0,22,22,22,0,
22,22,22,22,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22, 0, 0, 0,22,
22,22,22,22,22,
22,22,22,22,22,
0,0,22,0,0,
0,0,22,0,0,
};
setani cyn_boat,;
} else {
setani idle,;
}
timeout=.05;
}
please help  |
|