View previous topic :: View next topic |
Author |
Message |
Greenwado Well, it's just me, what did you expect?

Joined: 09 Aug 2010 Posts: 70 Location: Okacha (OK-A-CHA)
|
Posted: Sat Oct 30, 2010 7:52 am Post subject: Scripting with tags |
|
|
I need to write a script that turn a tag 11 on when the tags 7 8 9 and 10 are on.
-It must be activated when all four of the other tags are on.
-Tags 7 8 9 10 are on when the items Bag, Rope, Hammer, and Shovel are in the inventory.
How would the script be written? _________________ Happy RPG Makin |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sat Oct 30, 2010 9:27 am Post subject: |
|
|
if (check tag(7) && check tag( && check tag(9) && check tag(10)) then (set tag(11, on)) else (set tag(11, off)) _________________
|
|
Back to top |
|
 |
Greenwado Well, it's just me, what did you expect?

Joined: 09 Aug 2010 Posts: 70 Location: Okacha (OK-A-CHA)
|
Posted: Sat Oct 30, 2010 10:18 am Post subject: |
|
|
ummm.... thats a little confusing, could you rewrite that without the if possible?
EDIT: the is really a 8 ) _________________ Happy RPG Makin
Last edited by Greenwado on Sat Oct 30, 2010 10:58 am; edited 1 time in total |
|
Back to top |
|
 |
Greenwado Well, it's just me, what did you expect?

Joined: 09 Aug 2010 Posts: 70 Location: Okacha (OK-A-CHA)
|
Posted: Sat Oct 30, 2010 10:29 am Post subject: |
|
|
WAIT, figure it out...
my code is
Code: |
#------------------------------------
#Tags
plotscript, checkingtags, begin
if (check tag(7)
&& check tag(8)
&& check tag(9)
&& check tag(10))
then (set tag(11, on))
else (set tag(11, off))
if (check tag (11, on)
then (show textbox (32)
end
|
HSpeak says:
Code: |
ERROR: in line 121 of script checkingtags in
C:/OHRRPGCE/import/scripts/smithsonain spectre/scripts.txt
plotscript, checkingtags, begin
script checkingtags is missing end or ) |
_________________ Happy RPG Makin |
|
Back to top |
|
 |
unsigned msw Guest
|
Posted: Sat Oct 30, 2010 12:37 pm Post subject: |
|
|
2nd to last line
then ( show text box (32)
needs another ending parenthesis to 'close' the first one in the line. |
|
Back to top |
|
 |
Pepsi Ranger Reality TV Host

Joined: 05 Feb 2003 Posts: 493 Location: South Florida
|
Posted: Sat Oct 30, 2010 2:45 pm Post subject: |
|
|
You may also want to close up your "if (checktag (11,ON)" statement, which you probably want to rewrite as:
Code: | if (checktag (11)) then( |
Checktags default to true when you use just the numbers. If you need to check whether a tag is off, write:
Code: | if ((checktag (11))==false) then( |
Notice the extra parentheses.
Every open parenthesis needs a closed one to follow at the end of the specific block if you expect the compiler to accept your changes. _________________ Progress Report:
The Adventures of Powerstick Man: Extended Edition
Currently Updating: General sweep of the game world and dialogue boxes. Adding extended maps.
Tightfloss Maiden
Currently Updating: Chapter 2 |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Oct 30, 2010 5:37 pm Post subject: |
|
|
Pepsi Ranger wrote: | Code: | if ((checktag (11))==false) then( |
Notice the extra parentheses. |
Actually, that extra pair of parentheses is redundant, you can just write
Code: | if (checktag (11)==false) then( |
_________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
|