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 07-21-2004, 09:03 PM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
The terrible twins (clientside and serverside) - PART TWO!

Having failed to correctly identify which commands are clientside and which ones are serverside, I'm forced to ask if I would be correct in saying...

The following is done serverside:

Defining this.vars.
Defining level.vars (level just being a generic word used instead of "this")
Setting the timeout
"with" statements
The "message" command

And that the following is done clientside:

Setting playerdir.
The "disabledefmovement" and "enabledefmovement" commands.
The "setani" command.
The "showimg", "hideimg", "changeimgvis" and "changeimgcolors" commands.
__________________
Reply With Quote
  #2  
Old 07-21-2004, 09:07 PM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
playerdir should be settable serverside, if it doesn't. I shall smacketh Stefan.

Anything *img* is clientside. setani should be serverside, unless you mean showani (I think that's the command).

timeouts can exist on both sides. Message is also both sides, I believe.
Reply With Quote
  #3  
Old 07-21-2004, 09:09 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Rick
playerdir should be settable serverside, if it doesn't. I shall smacketh Stefan.

Anything *img* is clientside. setani should be serverside, unless you mean showani (I think that's the command).

timeouts can exist on both sides. Message is also both sides, I believe.
Ganis are clientside. They can be set serverside as well.
Reply With Quote
  #4  
Old 07-21-2004, 09:11 PM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Quote:
Originally Posted by Lance
Ganis are clientside. They can be set serverside as well.
Well, I meant serverside as well, poor wording on my part.
Reply With Quote
  #5  
Old 07-21-2004, 09:25 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
I thought setplayerprop #c was serverside and message was client?
__________________
Reply With Quote
  #6  
Old 07-21-2004, 10:23 PM
Xecutor Xecutor is offline
Former UN Manager
Join Date: Apr 2004
Posts: 117
Xecutor is on a distinguished road
Quote:
Originally Posted by Gerami
I thought setplayerprop #c was serverside and message was client?
They are both client and serversided. Note that they aren't even related.
Reply With Quote
  #7  
Old 07-21-2004, 10:34 PM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
setplayerprop #c is for player chat.
message is for NPC chat.
Reply With Quote
  #8  
Old 07-21-2004, 11:26 PM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Quote:
Originally Posted by Rick
setplayerprop #c is for player chat.
message is for NPC chat.

Yeah.

The alternate for NPC chat is setcharprop #c. I don't know why you would use it, though.
Reply With Quote
  #9  
Old 07-22-2004, 02:24 AM
Nappa Nappa is offline
The Great Nappa
Nappa's Avatar
Join Date: Sep 2003
Location: Florida
Posts: 1,911
Nappa is on a distinguished road
Send a message via AIM to Nappa
I use setcharprop #c, . SAY THAT TO MY FACE, SUCKA
__________________
Reply With Quote
  #10  
Old 07-22-2004, 02:50 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by protagonist
Yeah.

The alternate for NPC chat is setcharprop #c. I don't know why you would use it, though.
Well, we who are scripters know that when you have a showcharacter NPC, this is the more appropriate way to do so.
Reply With Quote
  #11  
Old 07-22-2004, 03:05 AM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Quote:
Originally Posted by Lance
Well, we who are scripters know that when you have a showcharacter NPC, this is the more appropriate way to do so.
Do I detect a hint of condescending attitude?
Reply With Quote
  #12  
Old 07-22-2004, 03:20 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by protagonist
Do I detect a hint of condescending attitude?
I do not know what you are talking about. This is the soon-to-be-renamed super happy fun forum, and there are most certainly no condescending attitudes here.
Reply With Quote
  #13  
Old 07-22-2004, 03:21 AM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Quote:
Originally Posted by Lance
I do not know what you are talking about. This is the soon-to-be-renamed super happy fun forum, and there are most certainly no condescending attitudes here.

I am sure you will be banned from it, then.
Reply With Quote
  #14  
Old 07-22-2004, 03:28 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by protagonist
I am sure you will be banned from it, then.
Sorry, but I moderate it. :]

I do not like these attacks, though. So, please stop.
Reply With Quote
  #15  
Old 07-22-2004, 03:32 AM
Nappa Nappa is offline
The Great Nappa
Nappa's Avatar
Join Date: Sep 2003
Location: Florida
Posts: 1,911
Nappa is on a distinguished road
Send a message via AIM to Nappa
I say we banish message for all eternity.

DOWN WITH MESSAGE, UP WITH SETCHARPROP #C!
__________________
Reply With Quote
  #16  
Old 07-22-2004, 03:33 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Nappa
I say we banish message for all eternity.

DOWN WITH MESSAGE, UP WITH SETCHARPROP #C!
But then what will the poor non-showcharacter NPCs do?
Reply With Quote
  #17  
Old 07-22-2004, 03:34 AM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Quote:
Originally Posted by Lance
Sorry, but I moderate it. :]

I do not like these attacks, though. So, please stop.
I am not attacking you, I'm asking you why you are behaving so inappropriately to a user when you are a moderator. Especially in your own forum. Explain?
Reply With Quote
  #18  
Old 07-22-2004, 03:36 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by protagonist
I am not attacking you, I'm asking you why you are behaving so inappropriately to a user when you are a moderator. Especially in your own forum. Explain?
Telling me I will be banned is most certainly an attack of some sort.

Waiting on some kind of explanation of how I acted inappropriately. Also, I might advise you that you are now breaking that other rule that says if you have a problem with a moderator you are supposed to PM them.
Reply With Quote
  #19  
Old 07-22-2004, 03:36 AM
Nappa Nappa is offline
The Great Nappa
Nappa's Avatar
Join Date: Sep 2003
Location: Florida
Posts: 1,911
Nappa is on a distinguished road
Send a message via AIM to Nappa
Quote:
Originally Posted by Lance
But then what will the poor non-showcharacter NPCs do?

They will suffer the wrath of a thousand suns!

THAT IS WHAT THEY SHALL DO
__________________
Reply With Quote
  #20  
Old 07-22-2004, 04:14 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Well, are there any other reasons that a script would work offline but not online besides mistakes with clientside and serverside?
__________________
Reply With Quote
  #21  
Old 07-22-2004, 04:15 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Googi
Well, are there any other reasons that a script would work offline but not online besides mistakes with clientside and serverside?
That would be the primary reason.
Reply With Quote
  #22  
Old 07-22-2004, 04:42 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
There's no clientside/serverside limitations of if () statements, right?
__________________
Reply With Quote
  #23  
Old 07-22-2004, 04:43 AM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Quote:
Originally Posted by Lance
Telling me I will be banned is most certainly an attack of some sort.
I was replying to your sarcastic comment with a fitting response.
Quote:
Originally Posted by Lance
Waiting on some kind of explanation of how I acted inappropriately. Also, I might advise you that you are now breaking that other rule that says if you have a problem with a moderator you are supposed to PM them.
I will do so, then.
Reply With Quote
  #24  
Old 07-22-2004, 06:11 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Quote:
Originally Posted by Googi
There's no clientside/serverside limitations of if () statements, right?
Yep, there is no limitation.
Reply With Quote
  #25  
Old 07-22-2004, 06:20 AM
Xecutor Xecutor is offline
Former UN Manager
Join Date: Apr 2004
Posts: 117
Xecutor is on a distinguished road
Quote:
Originally Posted by Rick
Yep, there is no limitation.
Well actually if you are comparing variables set serverside or clientside then it would be limited.
Reply With Quote
  #26  
Old 07-22-2004, 05:28 PM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Quote:
Originally Posted by Xecutor
Well actually if you are comparing variables set serverside or clientside then it would be limited.
Wait, so you're saying that the following script wouldn't work because the variable was set serverside and the command is clientside?

NPC Code:

if (playerchats) {
this.var=2;
}

//#CLIENTSIDE

if (keypressed) {
if (this.var==2) {
showimg 1,img.png,295,380;
changeimgvis 1,4;
}
}

__________________
Reply With Quote
  #27  
Old 07-22-2004, 05:35 PM
Xecutor Xecutor is offline
Former UN Manager
Join Date: Apr 2004
Posts: 117
Xecutor is on a distinguished road
That is correct.
Reply With Quote
  #28  
Old 07-22-2004, 11:17 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
Quote:
Originally Posted by Xecutor
They are both client and serversided. Note that they aren't even related.
Woops, i mean the other one..is it setchar #c? Or something like that. I'm not familiar with a lot of things and suck without the comands list next to me !

When I tried message it wasnt working right serverside. Dont remember why ;-;
__________________
Reply With Quote
  #29  
Old 07-23-2004, 06:47 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
Quote:
Originally Posted by Xecutor
Well actually if you are comparing variables set serverside or clientside then it would be limited.
This was in reference to if () statements.
You can set variables serverside and clientside. You can do most tasks serverside and clientside, but you cannot read a this.var set clientside serverside and vice-versa. Level.vars are serverside only I believe, as is the with() command. Many things that you can do serverside and clientside depend on what action you're performing.
If I want to show a local message, setplayerprop #c,Blah; would work clientside to set the chat of the player. I've found a lot of times doing setplayerprop #c,; clientside does not in fact set it for the other players, so serversided would be better if you're hiding the chat. Just random things you have to figure out.
Most of it is common sense, just figure who has to access it, and does it effect more than that one player? For example, setting preferences for a GUI doesn't need any interaction outside of the clientside, but modifying guilds needs to have interaction with a server/players, therefore would need to be serversided
-Projectshifter
__________________
Who has time for life these days?
Reply With Quote
  #30  
Old 07-23-2004, 08:51 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally Posted by Projectshifter
I've found a lot of times doing setplayerprop #c,; clientside does not in fact set it for the other players,
eh? it updates for all players either way... unless you meant setcharprop here
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
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 03:11 PM.


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