Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

[Answered] Links in main text?

14 years ago
Is it possible to have links in the main text? Basically, I use variables instead of items, for various reasons. Mainly because I like the look I have for them a bit better, and you don't have to worry about "picking them up" or dropping them, or anything like that. Now, what I'm having trouble with is if I want them to be able to try to use an item thats actually a variable in any page. Is there a way to have a link to another page within the main body of the page? I don't want to have a list of about a billion links down the side that looks like this on every single page: Go east. Look at paper. Use flashlight. Eat apple. Do other stupid thing with an item that doesn't make any sense here. Look at your shoes. Read letter. Read journal. Use sword. Use key. Use rock. Use clump of grass. This is annoying, I'd think, if the only useful thing here is to go east, and the options are just on every page. What I want is for it to look something like this: Inventory: paper, flashlight, apple, shoes, letter, journal, sword, key, rock, clump of grass. Blah blah blah... This is my story. Blah Blah. What would you like to do? Go east. I really hope there's a way to do this. I don't wanna use items!! v.v; (Don't even ask me why, most of my reasons are because I am stubborn.)

[Answered] Links in main text?

14 years ago
Okay. That wasn't in one huge clump when I was writing it. :(

Main thing is I don't want the end of every page to look like this:

Go east. 
Look at paper. 
Use flashlight. 
Eat apple. 
Do other stupid thing with an item that doesn't make any sense here. 
Look at your shoes. 
Read letter. 
Read journal. 
Use sword. 
Use key. 
Use rock. 
Use clump of grass.

[Answered] Links in main text?

14 years ago
There are TWO options.

OPTION 1

Have an inventory item that when they use it, it takes them to a page where they have that huge list of "use items". You'll need to save the PAGEID of the page you were on before you used it (create a variable and use %SAVEDID := $PAGEID (the first one of those two is a created variable, hence the %)). Then use scripting in the mass of links to dictate which one works.

OPTION 2

Only place useful links on pages so if the "item" can't be used there, don't add a link to use it.

[Answered] Links in main text?

14 years ago
Okay, so. I decided I was unhappy with your answer. :P I wanted it, and I was going to have it. lol. And well, I've been working on it nearly non-stop since, well, a few hours before I posted about it. And I -FINALLY- figured it all out. Go me :D

Say you want to have an apple object, that you can click, and go to an "Eat Apple" page. You want to have this option on every page, so long as you have at least one apple.

You have to create an "Eat Apple" page, and then a link to that page from any other page(it doesn't matter which).

Once you have done that, go to your story and click "View this storygame" to play the game. Navigate to the page where that link is. But don't click the link.

Instead, use your broswer to view the source code (On a mac, this is view>view source). Now, scroll down the page until you see the header links. Its not going to be super obvious, but its there in the jumble of it all somewhere.

Underneath that, look at the few lines of code. They'll be spaced far apart so just look for what you named the links, and find the one you want. Copy the line of code that you see there. It should look similar to this: That code will link to the page you want. There's one problem with it, though. Because in scripting you can't use " you have to switch the " for '. But after that it still won't work because of the ' in the ('FollowLink','9'). It gets all messed up somehow. So you need to switch the ' in there to & # 39, but without spaces. This is a different code for '. Basically, what you end up with is something like this: Then you just put that in the pagetext somewhere and voila! It seems so simple now that I've explained it :( I had so many troubles with this one, but I think it'll be worth it.

[Answered] Links in main text?

14 years ago
*sigh* The & # 39 in the second code all turned into ' like they're supposed to.

We really should have edit buttons for our posts. :)

[Answered] Links in main text?

14 years ago
You are a champ! I'm so excited to try this out.

[Answered] Links in main text?

14 years ago
Thanks. I'm glad you like it, because it really did take me the better part of a day to figure it out (and probably a good 5 hours just on that last part with the stupid ' thingies.) If you miss the last part, you end up staring at a link that looks like it should do something but it just sits there. And you click it over and over, hoping by some miracle it works its own problems out. It was a frustrating day, but at least the end result is happy.

I'm super excited about the whole thing.

[Answered] Links in main text?

14 years ago

You're a champ, this and JJJ's solution to the $ITEMSTATE bug make me want to start working on my story again. Thanks, guys.

[Answered] Links in main text?

14 years ago
That would be sweet, October. This is so awesome!

[Answered] Links in main text?

14 years ago

Also Zikara, does this work for link scripts and variables as well? As in, can you have link scripts for the links in main text?

[Answered] Links in main text?

14 years ago
It does.

But what you have to do is this:

When you make that original link to the page, don't delete it. Just create a variable called %HIDDENLINK, which is set to 0. Then, make a link restriction for the link to not be shown unless %HIDDENLINK = 1. Then, its not in view ever, but the link in the maintext still works. Then, do all of your link scripts in the field for the page link that you now can't see.


Also, if you wanted link restrictions for the in-text link then you can use the page scripts for that. The same way you'd make normal text hidden. And voila!

With that, you can do anything that you can do with normal links.

[Answered] Links in main text?

14 years ago

Elegant and beautiful! Really excited to use it!

[Answered] Links in main text?

14 years ago
If anyone want to see the actual variable item system I have come up with (and some of the cool things it can do). I made a really small story just to show people for now. The story I'm actually putting this into isn't going to be done for a while yet, but I wanted to be able to show you guys what it can actually do.

So, check it out and let me know what you think: http://www.myadventuregame.com/story/Testing_variable_items.aspx

[Answered] Links in main text?

14 years ago

You have to tick the "Allow Sneak Preview" box in order for other people to be able to play it.

[Answered] Links in main text?

14 years ago
Oops! Its fixed now, so you can go look.

[Answered] Links in main text?

14 years ago

I can't comment on it yet properly because it's not even that late but I have to get my little sister up for school tomorrow morning and yeah, I'm use to getting up at 11.30 every morning so waking up at seven is not going to go down well if I stay up too much longer. But yeah, this looks awesome. Seriously. This is great. Congratulations, this has opened so many doors for so many people to include cool stuff in their storygames. Thank you so much.

[Answered] Links in main text?

14 years ago
When I say 'holy fuck, you've done something extraordinary,' I hope you understand the gravity of my words. That is so. SO awesome. Just... damn. Thank you.

[Answered] Links in main text?

14 years ago
Would you write an article on this?

http://www.myadventuregame.com/help/articles/myArticles.aspx

There will be an exp point bonus.

[Answered] Links in main text?

14 years ago

I was just about to suggest the same thing (I gave up on trying to get to sleep). I've got a day off tomorrow, so I'll definitely be experimenting with this stuff amongst other things.

[Answered] Links in main text?

14 years ago

Wow. Just wow. You're new, Zikara, and you already figured that out?!?!? Go you!

[Answered] Links in main text?

14 years ago
I'm a pretty good problem solver. Haha... That and I just try absolutely everything, and hope that eventually something will work.

[Answered] Links in main text?

14 years ago

wasn't that how everything was discovered and invented?

[Answered] Links in main text?

14 years ago
Most things, yes. :P

[Answered] Links in main text?

14 years ago

You'll make a fine problem solver one day....maybe today!

[Answered] Links in main text?

14 years ago
So the article on this is going to be about the longest one ever.

I didn't realize before I started writing it how much actually went into doing this, and how difficult it is to explain what I actually did.

But! I'm doing it, and it'll be done kind of shortly (week or two?).

But be prepared to sit down for a good, long read. (It may also just be that long, because I'm rather long winded, but I want to make sure things are thoroughly explained. :P )

[Answered] Links in main text?

14 years ago
Sounds fantastic!

[Answered] Links in main text?

14 years ago
Thanks, JJJ!

[Answered] Links in main text?

14 years ago
I've read what you did so far and it's awesome!

[Answered] Links in main text?

14 years ago
Thanks!

Do you think it makes sense so far? I can't get over the feeling that I'm not making any sense with it. I'm going to have a thing at the end that explains how you actually piece all these parts together, because what I have so far is code that goes inside, or before or after other code that's there, and it can be a bit confusing.

[Answered] Links in main text?

14 years ago
Being brilliant, I understand exactly where you're going with the article. Three tips though:

1. Add a link to your storygame demonstrating all of this. Since you reference it.
2. Take periods off from the headers (nitpick!)
3. You might want to clarify the ladder half of the setting up the variables section. I understand it but I could see how it could be confusing.

Awesome work thus far though! Super excited to use all of this. So impressed.

[Answered] Links in main text?

14 years ago
1. Alright. I was considering doing that, and it might help people to better understand what all of it does if they can see it in action.
2. Hehe... okay.
3. I'm thinking of moving the talk about the later variables to under the headers where they are actually used. Like adding the EATBREAD, PLAYFLUTE variables to where I'm going to explain adding text to a page from using the items. And the on page ones to where I explain the code to make them appear on the page, and then explaining them a bit more fully there.
(and... latter. nitpick! :P)

[Answered] Links in main text?

14 years ago
haha, thanks! I'm so bad with ladder/latter. I actually messed that up on my English paper last week and got scolded. I'll leave 3 up to you, your judgement will be better than mine. For #1, I really think it should be linked or not mention just for coherence. Preferably linked.

All good so far.

[Answered] Links in main text?

14 years ago
Yea, I think I'm going to do linked. That is, if I can manage to get through writing this article without tinkering that test game so much that I ruin it and can't get it back haha :P