Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Some questions about Items

9 years ago

I'm working on a game, and with the first problem there are 4 possible solutions, with their own variable to mark which happened. (Nice little acronym for it too even, CHOP).And each should give an item, mostly as a trophy of how you accomplished it.

So, first question is, while H & O solutions have their own page, C & P use the same one, but use different text to describe the outcome. How can I give a player with C = 1 a different item to a player with P = 1, in the same page? It could and would work, to have their own page with the same text, but not very elegant.

Second question, seeing as it's only possible to get one of these items, would I be able to, instead of making four items, one item with code to change the description, and possibly the image in inventory? I believe I saw a thread stating something similar, but can't find it again. Something about, if Gender = 1 (for a male), Item = Pants. If Gender = 2 (or !1), Item = Skirt. Again, easy enough to make 4 items and have them given on their own unique page, but just not very elegant :D

Cheers!

Some questions about Items

9 years ago

It's all in the on page scripting, or whatever you call it. (this one: http://chooseyourstory.com/help/articles/article.aspx?ArticleId=3850)

%%VARIABLE%=%1% TEXT GOES HERE.%% %%PATH%=%2%OR ELSE SOME OTHER TEXT GOES HERE.%% just slapped directly onto the page. You could theoretically recycle the same page for most of your game this way.

The variable itself is set when the player clicks the relevant links, or in the page script left of the title (just pointing this last out because I completely failed to notice it for an embarrassingly long time...) and you can use that to change the descs for items too. Pictures, I don't think can be changed, but I'm pretty newbish about all this too so don't quote me on that.  (there's no way to quote things at all on this weird backwards forum anyway so hah!)  

If you're not significantly changing the text and just want to tack on a line or paragraph before or after the main body you can do that right in the link script too. (go into 'change Editor features' on the story properties page and set everything as advanced as it can go if you haven't already, btw)

IF %MOUSEWHEEL = 39 THEN $PAGETEXT :=  $PAGETEXT + "Inappropriate OOC whine-fest commences."   

Or switch that last bit around to put the new text on top.

Oh, and this is a useful article on items in general: http://chooseyourstory.com/help/articles/article.aspx?ArticleId=105

Includes the bit about making them collapsible, which I guess isn't the default after all. Whoops.

Some questions about Items

9 years ago
You can just give an item by doing $ITEMSTATE00 := 1, with 00 being replaced by the item number, in the page script.

So rather than them picking up the item, they just receive the proper one once they reach the page (just use an if statement to decide which they get).

You could change the description based on a variable, but not the image, so you're better off just using 4 different items.