Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   this. (https://forums.graalonline.com/forums/showthread.php?t=13560)

iceman8832 10-02-2001 01:55 AM

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.

:(

btedji 10-02-2001 03:35 AM

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

lordhelmut 10-02-2001 04:32 AM

that.

Shard_IceFire 10-02-2001 04:45 AM

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 :D

btedji 10-02-2001 05:50 AM

goto the links section on the g2k1 site and find the one for npc tutorials


All times are GMT +2. The time now is 09:16 AM.

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