Graal Forums  

Go Back   Graal Forums > PlayerWorlds > PlayerWorlds Main Forum
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-11-2010, 01:49 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
The hardest part is planning. When designing a server, think of all of the systems as one system since they will act together, and think up everything it will need to do, and leave room for it to do more things in the future (modularity)
__________________
Reply With Quote
  #2  
Old 03-13-2010, 12:00 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by cbk1994 View Post
The hardest part is planning. When designing a server, think of all of the systems as one system since they will act together, and think up everything it will need to do, and leave room for it to do more things in the future (modularity)

I think you're right, I generally create the weapons that involve around the player behind the scenes, then I create another weapon to display this information to the screen. The hardest part is thinking of the functions that you'll need.

An example would be creating a weapon called "-Items" which every function inside this weapon would revolve around items (dropping, adding etc) and then another weapon such as the "Inventory" or "Trading" which would just call the functions from "-Items" to display the information.
__________________
Reply With Quote
  #3  
Old 03-16-2010, 06:00 AM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
Quote:
Originally Posted by xAndrewx View Post
I think you're right, I generally create the weapons that involve around the player behind the scenes, then I create another weapon to display this information to the screen. The hardest part is thinking of the functions that you'll need.

An example would be creating a weapon called "-Items" which every function inside this weapon would revolve around items (dropping, adding etc) and then another weapon such as the "Inventory" or "Trading" which would just call the functions from "-Items" to display the information.
what's the advantage to creating a weapon called "-Items" over joining the player to a class?
Reply With Quote
  #4  
Old 03-16-2010, 08:51 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by Cubical View Post
what's the advantage to creating a weapon called "-Items" over joining the player to a class?
Clientside functions

HTML Code:
(@ "-Items").onDropItem(id, amount);
(@ "-Items").onGetItemCount();
(@ "-Items").onGetItemQuantity(id);
__________________
Reply With Quote
  #5  
Old 03-16-2010, 08:56 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by xAndrewx View Post
Clientside functions

HTML Code:
(@ "-Items").onDropItem(id, amount);
(@ "-Items").onGetItemCount();
(@ "-Items").onGetItemQuantity(id);
You can actually rename the object name of the WNPC in the weapon script so you can access it by a more... simpler name, instead of doing (@ "-Items"). I think it's name = "Items";... that could be wrong, though.

Also, player-joined classes have clientside functions if you put clientside functions in the class, lol. Just remember though, pretty sure all class-functions joined to a player are accessed by player.function, thus I tend to add functions that represent actions to a player(player.damage()), while putting item-related functions in a WNPC that is appropriately named(items.createitem()), as it would look odd for say, player.createitem().
Reply With Quote
  #6  
Old 03-16-2010, 09:39 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by DustyPorViva View Post
You can actually rename the object name of the WNPC in the weapon script so you can access it by a more... simpler name, instead of doing (@ "-Items"). I think it's name = "Items";... that could be wrong, though.

Also, player-joined classes have clientside functions if you put clientside functions in the class, lol. Just remember though, pretty sure all class-functions joined to a player are accessed by player.function, thus I tend to add functions that represent actions to a player(player.damage()), while putting item-related functions in a WNPC that is appropriately named(items.createitem()), as it would look odd for say, player.createitem().
Oh I didn't know about the player.joined classes had a clientside effect, thank you =D
__________________
Reply With Quote
  #7  
Old 03-16-2010, 01:07 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Weapons are usually preferable since they don't have a few problems player classes on clientside have:
  • They lag behind when logging on since you have to join them clientside in an onCreated function on a weapon. This means you have to delay other scripts until the class loads.
  • They are notoriously hard to update. Often I have to restart my client, and sometimes the NPC-server, to make simple changes.

You will need to join the class to the player on clientside for the clientside portion to work.

Quote:
Originally Posted by DustyPorViva View Post
You can actually rename the object name of the WNPC in the weapon script so you can access it by a more... simpler name, instead of doing (@ "-Items"). I think it's name = "Items";... that could be wrong, though.
PHP Code:
itemControl this
__________________
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:27 AM.


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