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 10-02-2001, 01:55 AM
iceman8832 iceman8832 is offline
Registered User
Join Date: Oct 2001
Location: U.S.A.
Posts: 121
iceman8832 is on a distinguished road
Question this.

Hey all. I can script okay. But I was wondering for the longest time how you use strings and variables and most importantly how you script with this. Could you help thanks.

Reply With Quote
  #2  
Old 10-02-2001, 03:35 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
to set them:
this.variablename=value;
setstring stringname,value;

to recall them
just use this.variablename when doing calculations
use #v(this.variablename) when used in string operations

use #s(stringname) to recall the actual string content
use strtofloat(#s(stringname)) to recall the string as a number

tell me if you understand
Reply With Quote
  #3  
Old 10-02-2001, 04:32 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
that.
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
  #4  
Old 10-02-2001, 04:45 AM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
Ok this. vars are like mostly used as timers and stuff like that...well actually a lot of other ways also. ANYWAYS, this. vars only apply to that specific NPC.
For instance:
if you made one NPC do this:
say2 #v(this.message)
and another NPC do this:
say2 #v(this.message)
they would both display different things because as I said this. vars only work for that specific NPC. Other vars apply to all npcs so if you did one NPC saying this:
say2 #v(message)
and another saying:
say2 #v(message)
they would say the same thing. Argh it's hard to explain but I hope you understand
__________________

-=Shard IceFire=-
Reply With Quote
  #5  
Old 10-02-2001, 05:50 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
goto the links section on the g2k1 site and find the one for npc tutorials
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 01:26 AM.


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