Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-28-2003, 01:43 AM
RTelvecho RTelvecho is offline
Banned
RTelvecho's Avatar
Join Date: Oct 2002
Location: Toronto, Ontario, Canada
Posts: 807
RTelvecho is on a distinguished road
Send a message via AIM to RTelvecho
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
Reply With Quote
  #2  
Old 01-28-2003, 01:48 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by Kaimetsu
In a script gani? No chance. I thought about the same thing once but it'd just be a big security hole.
I think he is talking of a NPC on a level. Or even more likely a DB NPC considering it is for a boat.
__________________
new account: Trevor
Reply With Quote
  #3  
Old 01-28-2003, 08:09 PM
RTelvecho RTelvecho is offline
Banned
RTelvecho's Avatar
Join Date: Oct 2002
Location: Toronto, Ontario, Canada
Posts: 807
RTelvecho is on a distinguished road
Send a message via AIM to RTelvecho
No its a personal boat u fire and it sets ur gani to that...
I was doing tests off line thats why I didnt sort out the server and clientsides
Reply With Quote
  #4  
Old 01-28-2003, 08:56 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Using a boat as a weapon seems rather..., I can't think of a nicer word so I'll say it, stupid. I mean what is the point? Just use it online as a DB NPC.
__________________
new account: Trevor

Last edited by tlf288; 01-29-2003 at 06:41 AM..
Reply With Quote
  #5  
Old 01-29-2003, 04:43 AM
RTelvecho RTelvecho is offline
Banned
RTelvecho's Avatar
Join Date: Oct 2002
Location: Toronto, Ontario, Canada
Posts: 807
RTelvecho is on a distinguished road
Send a message via AIM to RTelvecho
This boat is a boat the player buys and its small, if you must know. I figured it out, thanks anyway.
Reply With Quote
  #6  
Old 01-30-2003, 06:42 AM
Kinatt Kinatt is offline
Banned
Kinatt's Avatar
Join Date: Jan 2003
Location: Raleigh North Carolina
Posts: 850
Kinatt is on a distinguished road
Send a message via AIM to Kinatt Send a message via Yahoo to Kinatt
Re: Setshape Ganis?

Ok I did it you may want to try 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;
}



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;
}


the index file of the matrices was not correct the mathematical equation had an error in line 34 on the second section.. also known as Zc^2 it was a pleasure helping.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.