Page 1 of 1

Scripting Question

Posted: July 1st, 2009, 1:44 pm
by GoBologna120
How would I make it so that a command only plays based on two variables? For example, checking the current quest AND whether it's comeplete? Would it be like:

Code: Select all

if ( = $quest 0 ) ( = $quest_1_comeplete 1 ) [ something ]
Or maybe:

Code: Select all

if ( = $quest 0 ) [ if ( = $quest_1_comeplete 1 ) [ something ]]

Re: Scripting Question

Posted: July 1st, 2009, 3:16 pm
by Obsidian
Most likely, && should work between the things you want to check.

Re: Scripting Question

Posted: July 1st, 2009, 4:58 pm
by GoBologna120
Those weren't listed in the wiki, but I'll try that. Thanks.

Re: Scripting Question

Posted: July 3rd, 2009, 7:17 pm
by johnno56
You may already have this info, but just in case you do not, I have a Cubescript Introduction file that I found interesting. It was for Sauerbraten, but could still be used for Sandbox. I hope it helps.

Regards

J
Cubescript Introduction.doc.gz
Introduction to Cubescript
(18.62 KiB) Downloaded 156 times
I use Linux - file is gzipped...


I'm not sure if I have done the attachment correctly. If not, I can email it to you.

Re: Scripting Question

Posted: July 3rd, 2009, 7:27 pm
by Mike
I'm not sure how recent that document is but I know that he recently updated his guide as well here:
http://www.clearcrystal.co.uk/cubescript_1.html

It was actually hirato who helped him clean up some stuff :D Take care!
-mike