Re: Scripting - (Any questions on scripting ask here)
Posted: Sun Jun 17, 2012 9:03 pm
OMG, it was only a small typing error, and I didn't notice it...
Thank you!
Thank you!
The forum for all Redshift games.
http://linux.redshift.hu/forums/
KGold wrote:Is it possible to modify the value of a global by adding to it or subtracting from it instead of typing in a particular one with a script?
I'm pretty sure it is, I just forgot how...
Elendil / Redshift wrote:KGold wrote:Is it possible to modify the value of a global by adding to it or subtracting from it instead of typing in a particular one with a script?
I'm pretty sure it is, I just forgot how...
You can only access globals with getglobal and setglobal. Of course, after you get the value, you can add and subtract to/from it.
setglobal("global", getglobal("global") + 1);
Elendil / Redshift wrote:
- Code: Select all
setglobal("global", getglobal("global") + 1);
if(evtstepon() && (getstate()<4))
{
if(isnight())
{Test_Skel01.setvisible();
Test_Skel02.setvisible();
Test_Skel03.setvisible();
Test_Ghoul01.setvisible();}
else
if(isdaylight())
{Test_Skel01.sethidden();
Test_Skel02.sethidden();
Test_Skel03.sethidden();
Test_Ghoul01.sethidden();}}