Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

[Answered] Items create new link

14 years ago

Is there a way to use an item that opens a link in the same page without it jumping to another page? if not can, you add to the dropdown list were it says, if has, if not has, and then put if used. I dont want to re-do a page i have already done dozens of times and would like to know if this is possible, if not can you make something like i suggested happen?

[Answered] Items create new link

14 years ago
Your question isn't clear, could you try rephrasing it?

What I'm getting is that you want people to use the item, and then when they do, another link appears. You could do this by linking to a different page (that you create with the same text and links + the extra link).

Why do you want to do this?

[Answered] Items create new link

14 years ago
If I am understanding what you want, then what you have to do is create the item, and then make an item effect that leads to the same page and then put the following in the item script:

$DEST := @NONE
%HIDELINK := 0


Then create a variable called HIDELINK that is set to 1 at the start of the game, and then go to that page, create the link you want to appear only after the item is used, and then click on the variable restrictions and make the variable HIDELINK set to 0 there.

I tested it, and it worked. You can check out this to see it: http://www.myadventuregame.com/story/Testing_variable_items.aspx Just click on the item, and then use it right on the introduction page to see what I mean.

But, as you'll see there's a weird error where you get a pop up saying the item can't be used there. I don't know enough about items right now to know how to fix that, and I don't have time right now to figure it out, but I'll look at it later to see if I can fix that part too. And there you go.

[Answered] Items create new link

14 years ago
The weird error can probably be fixed by setting a default item effect from the item properties page. It will work if the item effect fires before the item script and not vice versa but I haven't tested it yet.

[Answered] Items create new link

14 years ago
Well, I tested it to see what the problem was. And apparently, items don't like $DEST.

But I think that's okay for what he wants to do, so just don't put that in the script and only include %HIDELINK := 0 and you should be good. But make sure that the page you use it on is the same as the page it takes you to, in the little drop down bars. And that should do it.