Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 12-08-2005, 07:12 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
I would quite like it if you spaced the operator out a bit, i.e.
PHP Code:
res one two
Instead of...
PHP Code:
res=one@two
Note that you can also use SPC and NL operators, the former inserting a space and the latter inserting a new line (effectively, a "\n"), i.e.
PHP Code:
one "Doris";
res "Hello" SPC one
... producing "Hello Doris!".

Quote:
Originally Posted by prozac424242
If, instead of the player's name, you want to put in a player variable or a server string, #s(client.whateveryoucalledthestring) and #s(serverr.thestringnameyougavefortheserverstring) still works.
This is bad:
PHP Code:
res "My my, " #s(clientr.stringname); 
You would use the following:
PHP Code:
res "My my, " clientr.stringname
Please do not mix old gscript and gscript.

Quote:
Originally Posted by prozac424242
Also, if you have a Gui box whose text you want updated, having any kind of setTimer(number) will casue the text to flash. .05 time casues the text to not show at all, if read from a server string, if I remember correctly the server's fastest response time is .1, so in the timeout, do a check that grabs the string value to a variable, sleep for .1, and check the variable against the current string value. If the values differ, then update the text attribute of whatever you called the box. The text attribute for GuiTextCtrl ("My_Text") would be My_Text.text and you can set it equal to whatever you like in a separate part of the npc.
And if you are not updating the text every 0.1 seconds, then this is throughly bad practise and you should use approximately more events!
__________________
Skyld
Reply With Quote
 


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:29 AM.


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