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 08-17-2004, 09:31 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 Clientside Cops - PART THREE

So, I'm still having problems with clientside.

NPC Code:

//#CLIENTSIDE

if (created) {
this.var=1;
}
if (playertouchsme) {
if (this.var==1) {
if (client.hasflag) {
disabledefmovement;
}
}
}



As you can guess, it doesn't work. I can't seem to figure out why though, but I would guess it has something to do with the this.var.
__________________
Reply With Quote
  #2  
Old 08-17-2004, 09:58 PM
Xecutor Xecutor is offline
Former UN Manager
Join Date: Apr 2004
Posts: 117
Xecutor is on a distinguished road
Did you initialize the size of the NPC with setshape or some other means? Also make sure that client.hasflag was set.
Reply With Quote
  #3  
Old 08-17-2004, 09:58 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
Does it have an image? If it has neither setshape nor image, how can one touch it?
Reply With Quote
  #4  
Old 08-17-2004, 10:37 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
Did you initialize the size of the NPC with setshape or some other means? Also make sure that client.hasflag was set.
It does have setshape. Also, I know that client.hasflag is set because serverside actions that require client.hasflag to be set are being executed.
__________________
Reply With Quote
  #5  
Old 08-18-2004, 02:13 PM
calum calum is offline
Registered User
Join Date: Nov 2003
Location: Scotland
Posts: 182
calum is on a distinguished road
It seems to work fine for me when i setshape...
__________________
Reply With Quote
  #6  
Old 08-18-2004, 04:31 PM
MysticalDragon MysticalDragon is offline
Global Administration
MysticalDragon's Avatar
Join Date: Oct 2002
Location: Lynn Ma
Posts: 883
MysticalDragon is just really niceMysticalDragon is just really nice
Send a message via AIM to MysticalDragon Send a message via MSN to MysticalDragon
Quote:
Originally Posted by Googi
So, I'm still having problems with clientside.

NPC Code:

//#CLIENTSIDE

if (created) {
this.var=1;
}
if (playertouchsme) {
if (this.var==1) {
if (client.hasflag) {
disabledefmovement;
}
}
}



As you can guess, it doesn't work. I can't seem to figure out why though, but I would guess it has something to do with the this.var.
Sir your wrong.client.hasflag is not beeing executed.Alls your script says is when this.var,1 is set and client.hasflag it will disabledefmovement.i dont see setstring client.hasflag,; or set client.hasflag;
__________________
~Delteria Support
~Playerworld Support
~PWA Chief
http://support.toonslab.com
[email protected]



Reply With Quote
  #7  
Old 08-18-2004, 04:51 PM
Xecutor Xecutor is offline
Former UN Manager
Join Date: Apr 2004
Posts: 117
Xecutor is on a distinguished road
Quote:
Originally Posted by MysticalDragon
Sir your wrong.client.hasflag is not beeing executed.Alls your script says is when this.var,1 is set and client.hasflag it will disabledefmovement.i dont see setstring client.hasflag,; or set client.hasflag;
That is not his entire script.
Reply With Quote
  #8  
Old 08-18-2004, 06:04 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally Posted by MysticalDragon
Sir your wrong.client.hasflag is not beeing executed.Alls your script says is when this.var,1 is set and client.hasflag it will disabledefmovement.i dont see setstring client.hasflag,; or set client.hasflag;
And that flag is not set by using the command setstring as you cited too, otherwise Googi would have to check this way:

NPC Code:

if(strequals(#s(client.string),content)){
}

__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #9  
Old 08-18-2004, 07:03 PM
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
Something is enabledefmovement;-ing in the background.

Quote:
Originally Posted by MysticalDragon
Sir your wrong.client.hasflag is not beeing executed.Alls your script says is when this.var,1 is set and client.hasflag it will disabledefmovement.i dont see setstring client.hasflag,; or set client.hasflag;
... whatever happened to not posting unless you understand the problem?
Quote:
Originally Posted by Googi
It does have setshape. Also, I know that client.hasflag is set because serverside actions that require client.hasflag to be set are being executed.
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #10  
Old 08-18-2004, 07: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 calum
It seems to work fine for me when i setshape...
It works offline but not online.
__________________
Reply With Quote
  #11  
Old 08-18-2004, 07:42 PM
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 Googi
It works offline but not online.
I found the same predicament, but I found another script had enabledefmovent in a timeout. After commenting that out, it worked just fine.
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #12  
Old 08-26-2004, 02:31 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
It could be a problem somewhere else in your script, or because the disabledefmovement command is outdated? Doubtful though.
Perhaps try using a 'real' string instead of this.var, like setstring test,1;
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #13  
Old 08-26-2004, 03:39 PM
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 GoZelda
It could be a problem somewhere else in your script, or because the disabledefmovement command is outdated? Doubtful though.
Perhaps try using a 'real' string instead of this.var, like setstring test,1;
It's old yes, but not outdated
You shouldn't have to use strings unless you have to hold the information. Take out the this.var==1 check and see that really is the problem, or just replace the "disabledefmovement;" with a "setplayerprop #c,this is rank;".
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #14  
Old 08-26-2004, 11:54 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
Has disabledefmovement been replaced by a different command?
__________________
Reply With Quote
  #15  
Old 08-27-2004, 02:19 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
No.

(stupid ten character limit)
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 07:25 AM.


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