Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Scripting with tags

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
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)

PostPosted: Sat Oct 30, 2010 7:52 am    Post subject: Scripting with tags Reply with quote

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
View user's profile Send private message
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Sat Oct 30, 2010 9:27 am    Post subject: Reply with quote

if (check tag(7) && check tag(Cool && check tag(9) && check tag(10)) then (set tag(11, on)) else (set tag(11, off))
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Greenwado
Well, it's just me, what did you expect?




Joined: 09 Aug 2010
Posts: 70
Location: Okacha (OK-A-CHA)

PostPosted: Sat Oct 30, 2010 10:18 am    Post subject: Reply with quote

ummm.... thats a little confusing, could you rewrite that without the Cool if possible?

EDIT: the Cool 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
View user's profile Send private message
Greenwado
Well, it's just me, what did you expect?




Joined: 09 Aug 2010
Posts: 70
Location: Okacha (OK-A-CHA)

PostPosted: Sat Oct 30, 2010 10:29 am    Post subject: Reply with quote

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
View user's profile Send private message
unsigned msw
Guest






PostPosted: Sat Oct 30, 2010 12:37 pm    Post subject: Reply with quote

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

PostPosted: Sat Oct 30, 2010 2:45 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Oct 30, 2010 5:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group