Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Item that does multiple things.

18 years ago
Hello, I am new to the site, and I am already planning a game, however....

I have this item, one that is very important throughout the course of the game.  As you progress, the item will be able to do different things.  However, I want to be able to do any of these things at any time.  Like.... say.... if you felt like spraying your fire extinguisher all randomly for no reason, you can (and face the concequences).  The fact that the item has multiple uses complicates things.

I'm planning on using conditional text alot (since this item will be in a chapter on its own to keep my sanity), so it will look like this

Page A: Main event
-Page B: Use item
-Page C: Choose how to use item
-Page B: Describe using item (consequences happen here)
Page A: Back to main event, with any changes noted.

Is there an easier way to do this?  I'd like to be able to go directly to a certain page from a link under certain circumstances. (i.e. using the extinguisher to actually extinguish a fire, or causing the extiguisher to explode by swinging it in the wrong place), but because I'm using chapters, this is not possible.  Is there another simpler method I can use?  Thanks.

Item that does multiple things.

18 years ago

It seems that Scripting may be the easiest way to accomplish your goals. But I'm not 100% sure what you are trying to do ...

Do you simply want to link from inside of one chapter to inside of another chapter? If so, since the Editor does not allow this at this time, simply find the Page ID you want to link to (this will be visible once Scripting is enabled) and set the Link Script to "$DEST := @P98", where 98 is the Page ID.

Do you want to be able to go back to the original page that they used the item on? Again, the editor does not allow you to go back more than one previous page at a time, so you'd have to use a simple script to "bookmark" the page. I can show you how to do this if this is your goal.

Item that does multiple things.

18 years ago
I'd like to see the script to bookmark the page. That would be very useful when using items and you don't know where they used them from but want a previous page that will return to it, even more than one page past the original.

Item that does multiple things.

18 years ago

Link Script for "Enter The General Store": %LSPAGEID := $PAGEID

Link Script for "Leave the General Store": $DEST := "@P" + %LSPAGEID

Item that does multiple things.

18 years ago
Hrm, you guys must have access to some secret knowledge of scripting. How you know what the variables and syntax look like is beyond me. Thanks, though, Havvy!

So the variable LSPAGEID is set to PAGEID. Then, somehow, the destination is set to P + the variable. Why does this work? I'd probably know if I understood that @P meant something and $PAGEID must be some string that's recognized globally or something. Right?

If that works, cool. I'm going to use it. Would like to see why though, so I can change it up as I please.

Item that does multiple things.

18 years ago

Item that does multiple things.

18 years ago
Ah HA! Cool.

Item that does multiple things.

18 years ago

$PAGEID means the number of the page.  If you have scripting working, it's very easy to figure out which page it is.

@P means Alex P.  I don't know what it means to tell the truth.
LSPAGEID and PAGEID are variables.

Item that does multiple things.

18 years ago
As far as I can tell, the @P is the first portion of.... say.... @P12.  which is Page #12, in this case.  Apparently, you can build variables and stuff from strings, which is rather neat.

Item that does multiple things.

18 years ago
@ is the starter, P means page while C means chapters, @P2 is page id2, @C2 is chapter id2...

Item that does multiple things.

18 years ago
Hmm, interesting.  Seems like scripting will make this go along quicker than I thought.

Perhaps I should ask to get it enabled, since I'm still failing horribly to get it to work otherwise....
As for what I plan to do, essentially I need to be able to link to pages from between chapters.  Both bookmarking and direct inter-chapter linking would be used, depending on what point the game is.

Item that does multiple things.

18 years ago
There is a much more difficult way to do it without scripting as well.