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-03-2002, 10:44 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Your questions...

please post your basic/advanced questions here that are NPC related, please do not make a thread for every little problem



btw, i have started this topic because i agree with python about all the topics
__________________
[signature]insert here[/signature]
Reply With Quote
  #2  
Old 07-03-2002, 02:15 PM
Artificial_Sweetener Artificial_Sweetener is offline
Registered User
Artificial_Sweetener's Avatar
Join Date: Mar 2002
Posts: 758
Artificial_Sweetener is on a distinguished road
Hmm.. this is odd,
I'm reading rabid's StringVariable tutorial and I came to a point where it tells you about setting a string variable and I'm having a problem.
NPC Code:

if (playerchats) {
setstring welcomemessage,#c;
}



Everytime I try this it deletes the Flag 'welcomemessage=hello' instead of changing it.. Any Idea why?

[edit]
Also I was wondering about the old guard guy in dustari.. What did they use to make it follow the player? I thought followplayer didn't work 0.0?
[/edit]
__________________
OOC: Scarlett (Head Auctioneer)
IC: Queen Arianna Durime of (Inra)

Last edited by Artificial_Sweetener; 07-03-2002 at 02:41 PM..
Reply With Quote
  #3  
Old 07-03-2002, 04:03 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Quote:
Originally posted by Artificial_Sweetener

[edit]
Also I was wondering about the old guard guy in dustari.. What did they use to make it follow the player? I thought followplayer didn't work 0.0?
[/edit]
probably just made it so the npcs x and y changed accordingly to the players x and y...
Reply With Quote
  #4  
Old 07-03-2002, 09:15 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
well, it depends on when you call the setstring command


if you do
NPC Code:

if (playerchats) {
setstring welcomemessage,#c;
}



but if you have it running in a loop, then its doubtful that the player will have chat text on ever loop execution

and if it is ran in a loop execution, you could do

NPC Code:

if (timeout) {
if (!strequals(#c,)) {
setstring welcomemessage,#c;
}
}

__________________
[signature]insert here[/signature]
Reply With Quote
  #5  
Old 07-04-2002, 05:31 AM
Artificial_Sweetener Artificial_Sweetener is offline
Registered User
Artificial_Sweetener's Avatar
Join Date: Mar 2002
Posts: 758
Artificial_Sweetener is on a distinguished road
:: reads all of Rabid's tutorials ::

Geez I need more... I read and learned everything in Rabid's tutorials in 15 minutes..

Do you know where I could find some more? Most of the tutorials on the graal2001 site have a broken link to the download location..

Plz..
__________________
OOC: Scarlett (Head Auctioneer)
IC: Queen Arianna Durime of (Inra)
Reply With Quote
  #6  
Old 07-04-2002, 11:12 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
i'll help you learn, contact me:

aim: LoganTwlv
msn: [email protected]
__________________
[signature]insert here[/signature]
Reply With Quote
  #7  
Old 07-04-2002, 11:13 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
rabid didnt make em, stefan did ^.^ they were in the uploads folder of the FTP, he just made em public
Reply With Quote
  #8  
Old 07-04-2002, 12:30 PM
Artificial_Sweetener Artificial_Sweetener is offline
Registered User
Artificial_Sweetener's Avatar
Join Date: Mar 2002
Posts: 758
Artificial_Sweetener is on a distinguished road
Quote:
Originally posted by Python523
rabid didnt make em, stefan did ^.^ they were in the uploads folder of the FTP, he just made em public
Oh heh -.-
__________________
OOC: Scarlett (Head Auctioneer)
IC: Queen Arianna Durime of (Inra)
Reply With Quote
  #9  
Old 07-08-2002, 01:03 PM
Artificial_Sweetener Artificial_Sweetener is offline
Registered User
Artificial_Sweetener's Avatar
Join Date: Mar 2002
Posts: 758
Artificial_Sweetener is on a distinguished road
Hey one of you mods... sticky this. it would help ease off the mass of question threads =]
__________________
OOC: Scarlett (Head Auctioneer)
IC: Queen Arianna Durime of (Inra)
Reply With Quote
  #10  
Old 07-08-2002, 07:18 PM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
K.. I see ":" in some scripts.. what is it for?
same with "?"

and with the "in" thing.. I see some stuff after that is contained in "< #,#,#,#>"

wouldn't it be { } instead.. since its an array? or something?
*super confused*
__________________

Reply With Quote
  #11  
Old 07-08-2002, 09:42 PM
Bhala Bhala is offline
Disgruntled Monkey
Bhala's Avatar
Join Date: Mar 2001
Posts: 779
Bhala is on a distinguished road
? and : are used together as a simple if else statment mostly used for seting vars

this.hat = (myvar<1 ? 1 : 2);

that is the same as doing this:

if(myvar<1){
this.hat=1;
}else{
this.hat=2;
}
__________________
Reply With Quote
  #12  
Old 07-09-2002, 12:33 AM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
Quote:
Originally posted by Bhala
? and : are used together as a simple if else statment mostly used for seting vars

this.hat = (myvar<1 ? 1 : 2);

that is the same as doing this:

if(myvar<1){
this.hat=1;
}else{
this.hat=2;
}
<3 to you
__________________

Reply With Quote
  #13  
Old 07-10-2002, 12:48 PM
Bhala Bhala is offline
Disgruntled Monkey
Bhala's Avatar
Join Date: Mar 2001
Posts: 779
Bhala is on a distinguished road
i know about in's too but i dont rembemer about the <> part but here is what i know...

var in |20,200|

is the same as:

var>20 && var<200

also you can do:
var=1;
this.array={1,23,4,5,3,0};
var in this.array

that would be true
__________________
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 02:09 PM.


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