Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

How can I make an item only be usable in a chapter

9 years ago

When I made my first story, I had to manually make every item go to a page that said that you used the wrong item with the exception of the item that was supposed to be used on that page. I had to do this every time I created a page that required or had the option of using an item. This wouldn't be so bad but the page has to load for every single time I had to make conditions, and of course I have to go back and forth with the whole thing.

Pretty much, there was too much time wasted with that method.

This time I'm going to attempt to circumvent this with scripting. I figured that with scripting, I can put some code on the item's script editor to make it check to see what chapter it is on and take you to the appropriate page. However, testing this out, it doesn't seem to work. I put this in the item's script editor:

IF $DEST = @C2 THEN $DEST := @P7

But no matter where I use it, it gives me the message that it can't be used even if I'm in the second chapter. Is this right or am I missing something?

How can I make an item only be usable in a chapter

9 years ago

IF $CHAPTERID = 2 THEN $DEST := @P7

How can I make an item only be usable in a chapter

9 years ago

Now I feel kinda dumb... but it works! Thanks Bradin.

How can I make an item only be usable in a chapter

9 years ago

Dude, what's with your profile changing all the time. I've only been on this site for 3 months and it's changed 4 times now.

How can I make an item only be usable in a chapter

9 years ago

Whimsy.

How can I make an item only be usable in a chapter

9 years ago

You're pink now? I get the odd feeling you're secretly a metamorphmagus (y'know, the wizards that can change how they look at will, without spells?). 

How can I make an item only be usable in a chapter

9 years ago

How do you do that? When I go on your profile page it changes color and everything! It looks so cool!

How can I make an item only be usable in a chapter

9 years ago

CSS scripting.

How can I make an item only be usable in a chapter

9 years ago

That's hard... Is it? I never used CYS script. How's it work?

How can I make an item only be usable in a chapter

9 years ago
He said CSS...

How can I make an item only be usable in a chapter

9 years ago

It's the same thing!

 

I don't know how either works!

How can I make an item only be usable in a chapter

9 years ago
If you don't know how either works it's not going to do anyone much good to try and explain to you advanced things you can do with CYS or CSS coding.

Learn the basics then ask again later if you're actually interested.