Non-threaded

Forums » Newbie Central » Read Thread

Introduce yourself and get to know the community.

A Question of Display

4 years ago

So, I know that there is an inventory system in place- items that are used for specific things.

Something I was wondering, though, is if there is a system that shows items that aren't necessarily used for anything in particular- for example, if I wanted to state that the character is wearing a black jacket and jeans, and have this appear on every page until they take off their jacket, in which case it will only state that they are wearing jeans.

I guess what I'm looking for is a "footer" that can be changed based on what happens.

Is there anything like this, or a good alternative to this?

Any input is appreciated.

A Question of Display

4 years ago

I'm sure someone more able with the inventory can help you a bit more than I can, but I think you could probably use it to carry the things your character is wearing, and then have them switch out at certain choices for other objects.  That sounds like a lot of work though, and if you want it in text it'd probably be easier just to do it manually.

A Question of Display

4 years ago
I'd say that with variables/scripting, you could have two variables, %JEANS and %JACKET. Then you could have a global script that says something like:

IF %JEANS = 1 THEN $PAGETEXT := $PAGETEXT + "You are wearing jeans."
IF %JACKET = 2 THEN $PAGETEXT := $PAGETEXT + "You are wearing a jacket."

(:= means 'set equal to', = just means 'equal to' [as I understand]).

Now, I'm not sure if the above is technically correct, but that particular implementation (even if it worked) would be lackluster, as adding those two sentences everywhere wouldn't be very... immersive. If it works for the particular effect you are going for, then fine.

Personally, however, I'd be more inclined to use one variable, say %CLOTHES, and then have something more like:

IF %CLOTHES = 1 THEN $PAGETEXT := $PAGETEXT + "You are wearing jeans and a jacket."
IF %CLOTHES = 2 THEN $PAGETEXT := $PAGETEXT + "You are wearing jeans."
IF %CLOTHES = 3 THEN $PAGETEXT := $PAGETEXT + "You are wearing a jacket."

Alternatively, you could have the variable track the same thing, but use on page scripting to show text based on the variable. This would have you manually put it on the desired pages (with potential tweaks), such as:

%%CLOTHES%=%1%Text for wearing both%%%%CLOTHES%=%2%Text for wearing one%%%%CLOTHES%=%1%Text for wearing the other one%%

This is what I would do, because I'm afraid of global scripts, but depending on what exactly you are doing, this could be very tedious, and so figuring out global scripts would be the much better choice.



However, if you want something more similar to the items but to not actually use the items, you can probably learn CSS and use that to make it look pretty (while still using variables to track stuff). This is going beyond just the site editor, but you would obviously get more power with such knowledge, however it is far from necessary to write a good story (I mention it in case you have a VERY specific goal you seek, and you need it to be just the way you are imaging, in case whatever that is cannot be achieved without outside stuff).

I should clarify that this doesn't require some outside download, it is just the thing webpages use to style themselves (or something like that), which means if you wrote the 'code' for it you could have it work (to an extent, as I think some stuff wouldn't work, but I'm unsure).

Alternatively (again), you can do the option mentioned in the other post(s).

If you go with using items, reading on how to manipulate items with scripting would be very helpful, as you can change if items are in the inventory and the like with ITEMSTATE. This can make it easier to manipulate to do what you want.

Check the articles under help and info, or ask for more details in the advanced editor forum, as there you're more likely to find someone else who might know how to explain it all better. Alternatively they may show up here to explain instead.

Hopefully there is something useful in this post, I'm still working on branching out in a way so that my posts on variables/scripting make sense, but without involving me listing everything I think I know, so if it doesn't make sense, whoops, but do tell.


*edit*
P.S. Pornography isn't allowed on this site, so while sexual themes aren't forbidden, be careful not to go too far, as it would lead to the story being deleted. This site isn't as open to content as Infinity Story (but few are, lol).

A Question of Display

4 years ago
Not especially difficult with variables. Just read the first half of Zake's post, then check out the articles on scripting in Help & Info. (don't read the second half of Zake's posts, no one does that)

A global script is the way to go. It's exactly same as any other, it just is active on every page. (While not being difficult to disable on a few specific ones if you need to.)