View Single Post
  #23  
Old 05-10-2004, 09:09 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally Posted by jake13jake
Now that I have the time in my hands to post fully about the origins of this suggestion:

I'm not really going far beyond laziness to a good extent. For whoever it was... i did this script for the top part of a picnic table in my tileset, slightly modified to let it be used as an example.
NPC Code:

if (playerenters) {
for (i=x;i<=x+5;i++){
showimg i*y,ostileset.png,i,y;
changeimgpart i*y,43*16,25*16,16,16;
}
}


The actual script that I would have used this on is gone now, because of a managerial change and a new plan of what is going to happen. It read values off of the string:

setstring this.port,portnumber,x,y,dir,boatx,boaty,signx,sig ny;

To explain the string:

-Consider portnumber,signx,signy irrelevant.
-The x,y,dir was to actually place the tickettaker char that used showcharacter and charprops.
-The boatx,boaty was for placing a showimg of the boat on the given coordinates.

Before I go any further, I'll explain to you how the old boat system on Classic had worked. (and also, please understand the fact that I was converting it to work on an NPC server and that it had been using like 20 putnpc scripts beforehand)
-you sit at the dock until the boat arrives
-the boat, ticket taker appear at the end of the timer.
-you go talk to the ticket taker, he warps you to a separate boat level.
-you stay in the boat level until you get at the stop you want.
-you get off the boat, warp into a new level.

I wanted to be able to control all of this through a single class. The problem was that the tickettaker char took immediate control of the setshape and I couldn't use setshape anywhere else through the NPC because of that. I don't see it as a big deal, I wouldn't care about being able to swim under the boat graphic, but if it was something where it would make more sense to block, I would appreciate being able to use a feature that set a shape using x and y values.
The boat needs to be a serverside NPC since you said you're using an NPC server, correct? At that point you can control it with setshape2 Like I said a few posts before, one big script is a NO NO! It will take much more time to load versus small scripts. It sounds efficient to put it all in one, but its the exact opposite. If you want I have the script(s) for 2k1's old moveable pirate boat. You're much better off to do it that way because the boat should be on its own. Setshap isn't meant to be used with showimgs to begin with. :/ It won't kill you or the server to use a seperate NPC for the boat. Besides, doing it like that would allow you to actually move the boat between levels like on 2k1. It would give a better sense of realism rather than just magically teleporting to your destination
__________________
Reply With Quote