Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
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
  #2  
Old 05-11-2004, 08:47 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by G_yoshi
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
Pfft... it is CLASSIC after all... we'd go nuts if we didn't get teleported everywhere as if by magic. In addition, you're wrong about the script being serverside. The script was 99.9% clientside save the triggeraction warp. I don't believe two showimgs and a showchar using hide and show would very much affect somebody's lag significantly, and I even think it could have worked better with lag so that you could see the timer as it hit 0 instead of it forwarding straight to the boat. It's much easier to keep track of two NPCs than it is to keep track of six.
Reply With Quote
  #3  
Old 05-12-2004, 01:12 AM
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
Pfft... it is CLASSIC after all... we'd go nuts if we didn't get teleported everywhere as if by magic. In addition, you're wrong about the script being serverside. The script was 99.9% clientside save the triggeraction warp. I don't believe two showimgs and a showchar using hide and show would very much affect somebody's lag significantly, and I even think it could have worked better with lag so that you could see the timer as it hit 0 instead of it forwarding straight to the boat. It's much easier to keep track of two NPCs than it is to keep track of six.
And you failed to listen to what I said. I just told you it would only require approximately two NPCs if that. Why the hell would even need six?! No wonder why it sucked :/
__________________
Reply With Quote
  #4  
Old 05-12-2004, 06:04 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by G_yoshi
And you failed to listen to what I said. I just told you it would only require approximately two NPCs if that. Why the hell would even need six?! No wonder why it sucked :/
Okay, how it used to be in one specific level:
three- sign for red boat, red boat, ticket taker for red boat.
three- sign for blue boat, blue boat, ticket taker for blue boat.
Quote:
Originally Posted by Dach
uh, the boat is clientside? why, exactly? its much easier to do serverside
It wasn't easier to do it serverside in this situation because of the hide/show stuff on the tickettaker, and a few other conditions that needed to be checked clientside that I honestly forget. It didn't lag, and I was trying to do it as close to the old way as possible... give or take eventually making the image move upto the dock itself. The person inside the boat (separate from the class) that lets you get on the dock was done serverside, because he was easier to do serverside... but for some reason the actual class was easier for me clientside.
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 04:52 AM.


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