Scripting - (Any questions on scripting ask here)

This forum is for discussing anything related to The Quest editor.

Re: Scripting - (Any questions on scripting ask here)

Postby KGold » Sun Jun 17, 2012 9:03 pm

OMG, it was only a small typing error, and I didn't notice it...
Thank you!
If you have been really too busy,
And you feel your head being dizzy,
It's recommended to have a rest,
I have a good offer-play the Quest! : )
User avatar
KGold
 
Posts: 127
Joined: Sun Jun 10, 2012 3:21 pm
Location: Hungary

Re: Scripting - (Any questions on scripting ask here)

Postby Catacomber » Mon Jun 18, 2012 2:33 am

Also here:

(posx==11) && (posy==11)) { setglobal("eyex_secretwalls",2);

All your other setglobals are different. : ) Not eyex_
All your other globals are exp1_
User avatar
Catacomber
 
Posts: 978
Joined: Tue Oct 25, 2011 5:20 am
Location: New York City

Re: Scripting - (Any questions on scripting ask here)

Postby KGold » Mon Jun 18, 2012 11:40 am

How inattentive I am! After making Eyeland with eyex identifier, I must accommodate to this one. Thank you!
If you have been really too busy,
And you feel your head being dizzy,
It's recommended to have a rest,
I have a good offer-play the Quest! : )
User avatar
KGold
 
Posts: 127
Joined: Sun Jun 10, 2012 3:21 pm
Location: Hungary

Re: Scripting - (Any questions on scripting ask here)

Postby Jacob » Fri Jan 31, 2014 12:12 am

What language is The Quest programmed in? Lua?
Jacob
And remember kids, in The Quest, there is no such thing as a dead end :)
Jacob
 
Posts: 90
Joined: Thu Oct 27, 2011 4:01 pm
Location: england

Re: Scripting - (Any questions on scripting ask here)

Postby UKayeF » Sun Aug 10, 2014 3:41 pm

I have problems when trying to create a new spell. This comes up when I'm trying to cast a spell that improves the player's stealth skill. According to the description given in the player's menu it is supposed to work but when casted there is absolutely no effect at all.
here are the details of the spell:

id: tqrw_spellhide
name: Hide
category: environment
target: self
price: 80 (don't think that matters though tbh)
sp base: 20
sp/skill level: 1.00
effect : fortify stealth skill by 4.00/0.00 for 10/1.00 turns

the animation on the target I used is bres_spellself01 but that's rather irrelevant I guess

thanks if you can help me!! :)
UKayeF
 
Posts: 7
Joined: Mon Aug 04, 2014 9:12 pm

Re: Scripting - (Any questions on scripting ask here)

Postby KGold » Sat Jun 24, 2017 1:47 pm

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...
If you have been really too busy,
And you feel your head being dizzy,
It's recommended to have a rest,
I have a good offer-play the Quest! : )
User avatar
KGold
 
Posts: 127
Joined: Sun Jun 10, 2012 3:21 pm
Location: Hungary

Re: Scripting - (Any questions on scripting ask here)

Postby Elendil / Redshift » Sat Jun 24, 2017 5:26 pm

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.
User avatar
Elendil / Redshift
Site Admin
 
Posts: 560
Joined: Sun Oct 09, 2011 11:35 am

Re: Scripting - (Any questions on scripting ask here)

Postby KGold » Sun Jun 25, 2017 12:47 pm

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.


What's the script for it?
The only way I can modify a global's value is using this: setglobal("test_example",1); (at least the one I'm aware of)
But this uses a particular value...
In case I want the value to increase by 1 every time I touch a certain statue for instance, this won't work. Is there a way to achieve this?
If you have been really too busy,
And you feel your head being dizzy,
It's recommended to have a rest,
I have a good offer-play the Quest! : )
User avatar
KGold
 
Posts: 127
Joined: Sun Jun 10, 2012 3:21 pm
Location: Hungary

Re: Scripting - (Any questions on scripting ask here)

Postby Elendil / Redshift » Sun Jun 25, 2017 5:40 pm

Code: Select all
setglobal("global", getglobal("global") + 1);
User avatar
Elendil / Redshift
Site Admin
 
Posts: 560
Joined: Sun Oct 09, 2011 11:35 am

Re: Scripting - (Any questions on scripting ask here)

Postby KGold » Mon Jun 26, 2017 7:17 pm

Elendil / Redshift wrote:
Code: Select all
setglobal("global", getglobal("global") + 1);

This is what I was looking for, thank you!
If you have been really too busy,
And you feel your head being dizzy,
It's recommended to have a rest,
I have a good offer-play the Quest! : )
User avatar
KGold
 
Posts: 127
Joined: Sun Jun 10, 2012 3:21 pm
Location: Hungary

Previous

Return to Editor

Who is online

Users browsing this forum: No registered users and 1 guest