0 votes
by (820 points)
edited by

I have several choices of dialog for an NPC. Basically, anywhere the NPC shows up, you can talk to them, and it will replace a Span with the currently available topics for that NPC. It's actually working great, and all the links are fine... except one.

The last link leads to a gameover screen. It works fine. The second to last link, however, does not. As soon as the last link appears (it's behind an IF), the second to last link becomes impossible to click on unless you get the cursor exactly on the topmost row of pixels in the link.

Now, I THINK this must have something to do with a faint textshadow i placed around the last link. i place this same class span around any link that leads to events that could result in a gameover, though. (admittedly, this one goes straight to a gameover, but if the player is paying attention, they will realize that...)

<<if $detbrambles is 2>>
	<<nobr>>
		<br>
		<<link "Who is the man in the brambles?">>
			<<replace "#text">>
				<<display "con whisper briars">>
			<</replace>>
		<</link>>
	<<endnobr>>
<</if>>

<<nobr>>
	<<link "Ask for help">>
		<<set $flowermore to true>>
		<<replace "#HUDaction">>
			<<display "con whisper topics">>
		<</replace>>
		<<replace "#text">>
			<<display "eve whisper more">>
		<</replace>>
	<</link>>
<<endnobr>>

<<nobr>>
	<<if $flowermore>>
		<span class="gameover">
			[[Stay longer|ENDING G01 flowers]]
			<</link>>
		</span>
	<</if>>
<<endnobr>>

the CSS code for the gameover is...

.gameover {
	text-shadow: 0 0 4px black, 0 0 16px red, 0 0 32px darkred;
}

I've used this in other places without having this happen, but obviously I've got SOMETHING out of whack with this one. I've tried adding more space between them, and it seems to have had no effect on the problem.

EDIT: Adding ANOTHER space between the links did solve the problem. Still not sure why it's only doing this in this one instance, though.

1 Answer

+1 vote
by (159k points)
selected by
 
Best answer

The code example for your "gameover" span element contains an end <</link>> tag without the companion start <<link>> tag. I don't know if this is a cut-n-paste error or if the same issue exists in your original code.

<<nobr>>
	<<if $flowermore>>
		<span class="gameover">
			[[Stay longer|ENDING G01 flowers]]
		-->	<</link>> <-- Not meant to be here
		</span>
	<</if>>
<<endnobr>>

If you think the text-shadow property is causing your issue then temporarily comment it out and then test your code again.

.gameover {
	/* text-shadow: 0 0 4px black, 0 0 16px red, 0 0 32px darkred; */
}

 

by (820 points)

Yes, that's a cut&paste mistake on my part; the endlink isn't actually there in the code. Also: that loud thumping noise you now hear is my forehead hitting the desk. 

Commenting out the text shadow DOES solve the problem. Interesting. Frustrating, but interesting. I'll have to see if I can figure something out; changing the whole thing for that one link, when it's working in other places seems a bit excessive and messes up the visuals.

Thanks GreyElf.

...