Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Help with link restrictions

6 years ago

How do I make it to where a link is hidden and you can't click on it unless you clicked on a different link?

Example; character in a room, you can do many things to escape. But the only way to open the secret compartment in the wall is to have the key, which you get from under the mat? I'm not using items, but to get the 'key' you click on the 'look under mat' link then you can open the wall because you clicked that link. In link options I can't find a way to make it to where you can only click on a link if you clicked on a different link.

Help with link restrictions

6 years ago
Put a variable in the link you want them to click first that changes when they click it. Then have the variable restriction in the hidden link check for that number and show up if it's true.

Help with link restrictions

6 years ago

I'm not doing variables. I've seen many storygame on this website which have no variables, but sometimes you can't click on one link unless you clicked on a different link first in multiple choice things.

Help with link restrictions

6 years ago
I guess if you're wanting to use the more tedious and pointlessly complicated version you can copy and paste a long time to have multiple identical-except-for-that-one-link paths.

How would you know whether someone else's game was using variable restrictions or not, though?

Help with link restrictions

6 years ago

Cause I don't see the number things. Aren't variables normally something you can see, and has to do with how the character is doing?

Example: MAGIC 5. HEALTH 65. MONEY 20.

Aren't those variables?

Help with link restrictions

6 years ago
They only display if you tell them too. We're talking about link scripts here, all you need in this case is for one that tracks whether the link had been clicked

...you know I'd really recommend just reading a few articles. This will be a lot easier for you to do and easier for others to explain once you understand the basics. A clearer idea of what a variable is and what they're for is a good place to start. They make a lot of things about writing a game much simpler.

Help with link restrictions

6 years ago
Variables are just used to store data. Letting the player see the variable is a setting you can uncheck if you don't want them to know about it.

Help with link restrictions

6 years ago

I know what a variable is... At least the basics. I haven't read about scripting yet though. Didn't think that was necessary.

Help with link restrictions

6 years ago

Ok, so I read basics of scripting, which was confusing. Didn't see or understand where it said how to make it to where you can only click on one link if you clicked on a different link, otherwise you have to go back. Which is what I want to know.

In my storygame I'm making I wanted to make it to where you can only open the safe if you clicked on the found a key link, so on the get key link I clicked on edit scripts. I typed in;     %KEY ;= %KEY + 1       then I clicked validate. It excepted it. Then I edited the examine safe link and added a open safe link. On the open safe link I put in the edit script thing;     IF %KEY = 1 THEN %KEY ;= 0       then clicked validate. It excepted! That was supposed to make it to where you could only click that link if KEY is 1.

I then tested the game, clicked on safe before I grabbed the key, but the option to open safe was right there!!! Did I do something wrong? How do I fix this? Did I read the article wrong?

Help with link restrictions

6 years ago

I may just have to make an item inventory after all...

Help with link restrictions

6 years ago
First, I think you mean 'accepted'.

And, well I have been saying that what you're asking about is a variable restriction, so perhaps, the article you should have looked at is How to use Link and Variable Restrictions.

I'm not seeing anything in your description of what you did that actually has you setting a restriction. It seems like you're just setting %KEY to 1 and then 0 and not actually telling the game do anything with that.

Help with link restrictions

6 years ago

How then do I make the game do what I want with that then? And I think I already looked that article and it didn't have what I need...

I'll look at it tomorrow.

Help with link restrictions

6 years ago
You...you use a variable restriction. To restrict the link to the variable.

@Killa_Robot @Ogre11 please help

Help with link restrictions

6 years ago
Ok, it sounds like you're almost there. Here's what I'd do:

On the first found key link, instead of a plus, I'd make the key := 1 (hopefully you used a colon and not a semicolon).

Then, in the second link, don't write anything. Instead, click on the stop sign next to the link, click on Variable Restrictions, then make it so KEY has to equal one.

That should do it.

Help with link restrictions

6 years ago
This seems like it might be too complicated for her.

Help with link restrictions

6 years ago
This is a pretty classic case of someone wanting to do something without first understanding it.

Sadly until she reads the articles, or explains why she thinks they're not relevant, there's not much more we can do.

Help with link restrictions

6 years ago
Yeah. I opted not to write a detailed explanation because I didn't get the sense she'd even gone as far as the 'click the tiny stop sign' stage before giving up. Because it's fairly self explanatory after that point.

Help with link restrictions

6 years ago

Okay, so I use the stop sign. I didn't think it would show up there. Thanks, I'll try that now.

Help with link restrictions

6 years ago

It works! Now I can finally finish my game! 

So, I had to make the key in variables maker, then made it to where found key link added a key by saying     %KEY := 1     then I edited the safe, making it have the open safe link minus the KEY by one by saying     %KEY := 0     to make sure that you don't have a leftover key, than went to stop sign next to the open safe link, clicked on variables, clicked on key and set it to where you can only open if KEY is between 1 and 1. Then I tested it, and it worked! I had to find the hidden key first.

But is there anything else about the variable and script thing, or is this all I need to know for the basics?