Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

[Answered] $LINKTEXT

18 years ago
Pretty much like page text except for links. Then we would be able to include html and make links change colours and size and make the same link go to fifty different places.

[Answered] $LINKTEXT

18 years ago
Sounds pretty cool but then it could blend into the text and get really confusing.
So I vote "No"

[Answered] $LINKTEXT

18 years ago
this is good, tho i may be wrong but it may already be developed, just not implemented in the scripting engine.., except u cant make it go to fifty different places or w/e u said, cuz thats what LINKDEST does...

[Answered] $LINKTEXT

18 years ago

so yeah, in theory the linktext works, but u should test adn see if it is implemented. the syntax for linktext is:

$LINKTEXT{linknumber} := "{description}"

so on the first link of one of your pages, in the page script, put:

$LINKTEXT01 := "This is new description for this link!"

[Answered] $LINKTEXT

18 years ago
alright, so i tested it, cuz yeah, i wanted to see for myself, and it does infact work, so i moved this to adv forum.

[Answered] $LINKTEXT

18 years ago
It does work, and you can make the link text red in it!

But it only works in Page Scripts. I'll post a Feature Wishing Well about it being able to be used in Link Scripts.

[Answered] $LINKTEXT

18 years ago
Oh, okay. I didn't think of putting the link ID at the end (of course, its a system variable, that was a possibility). I meant as in by using the $DEST variable you could make one link go to fifty different places with a lot of text without all those links.

[Answered] $LINKTEXT

18 years ago

Yeah, it works. I use it all the time on one of my advanced story games I'm working on.

A good example of having changeable link text:

The link might be a skill check. The player has to roll 2d6 against one of their skills, and get higher than it, to succeed. By altering the link text in the Page Script, you can tell them what their chance is of succeeding.

()      Sneak up behind the guard (Stealth=6. Chance=50%)
()      Shoot at the guard from where you are standing (Firearms=2. Chance=20%)

Using variables, you can display whatever their current Stealth score is in the link's text, then calculate the chance of that score succeeding a 2d6 roll, and display the Chance of Success in the link as well. That way, if there's almost no chance of them succeeding the dice roll, they might choose a different option instead.

----------------------

%CHANCE1 := 100/12
%CHANCE1 := %CHANCE1 * %STEALTHSKILL
$LINKTEXT1 := "Sneak up behind the guard (Stealth=" + %STEALTHSKILL + ". Chance=" + %CHANCE1 + "%"

-----------------------

If %STEALTHSKILL was 6 then when you go to that page, the first link would look like:

()      Sneak up behind the guard (Stealth=6. Chance=50%)

[Answered] $LINKTEXT

18 years ago
oops! In my example, I just guessed the percentage chance for the skill score off the top of my head. I realised immediately after posting that the percentage Chance numbers I gave in my example are wrong, but besides that, the actual idea is still right :)

[Answered] $LINKTEXT

18 years ago
lol, good example! i should include the $LINKTEXT in the intermediate scripting article, will do tonight or tomorrow morning...

[Answered] $LINKTEXT

18 years ago
CAN WE MAKE EM CHANGE COLORS?

[Answered] $LINKTEXT

18 years ago
Yeah, we can, by including this in the Page Script:

$LINKTEXT01 := "<font color='red'>" + "This is in red" + "</font>"

Obviously you can change that around, and the number at the end of $LINKTEXT can be changed according to what link on the page you're referring to. You can also change sizes to, except in the html replace color with size and replace the colour with a number.

[Answered] $LINKTEXT

18 years ago
lol thats awesome and i will add it in a bit... just gotta get some organizing here in the real world done and i can actually focus the article. (gonna add all these discoveries to the Intermediate/advanced article)

[Answered] $LINKTEXT

18 years ago
ROFLMAO THIS IS AWESOME!

[Answered] $LINKTEXT

12 years ago

necro necro necro

Ahem, this still isn't in any of the articles other than the Scripting Code Reference. This is a cool feature, but not many people will know of it...

[Answered] $LINKTEXT

12 years ago

Yeah, there's a lot of cool info in the Advanced Editor Forum that has to be mined for to find  ;)

[Answered] $LINKTEXT

12 years ago

Also in the text scripting. I think I am going to create a Complete Guide to Scripting.

[Answered] $LINKTEXT

12 years ago

That would be rather ambitious, but certainly worthwhile  =)