Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Is there a way to make text appear as token nears?

1755616275

Edited 1755616311
I know using the Foreground layer, I can make text or an object "disappear" as a token approaches it by putting it on the foreground layer, and setting the conditional fade. The text or object reappears when the token moves away. I'm looking for a way to have text or an object appear as a player moves their token toward it. I know I can do it by putting something on top of it that disappears as the player moves toward it, but that seems like "extra" work somehow. I'm thinking there might be a simpler way to do this. For an object, this might be a monster that appears out of the darkness to attack the player, that they couldn't see before. Or for text, it might be words that appear on the wall when they approach.  So, is there an easy way to make things "appear" as the player moves their token toward it?
1755625317
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you mean you want to enlarge the reaction area so that the change comes from farther away rather than overlap, then yes. You can group the reacting object with a very large invisible token. Then set the reaction on the group. All members will react as a unit.
No, I meant exactly what I said: how to make objects APPEAR as a player moves their token toward it. Right now, all I can do is make objects DISAPPEAR. keithcurtis said: If you mean you want to enlarge the reaction area so that the change comes from farther away rather than overlap, then yes. You can group the reacting object with a very large invisible token. Then set the reaction on the group. All members will react as a unit.
holy F, I was just thinking the same thing Saul. I wanted my pc to walk around a market stall and hear rumors from different npc when they walk within range. I was going to create a text bubble but idk how to reverse the foreground mechanic. Just like you said, I dont want the foreground item to disappesr but to appear. 
1755629391
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Saul J. said: No, I meant exactly what I said: how to make objects APPEAR as a player moves their token toward it. Right now, all I can do is make objects DISAPPEAR. keithcurtis said: If you mean you want to enlarge the reaction area so that the change comes from farther away rather than overlap, then yes. You can group the reacting object with a very large invisible token. Then set the reaction on the group. All members will react as a unit. Sorry, the action is the same, only the initial values are different. I thought the main problem was range, not behavior. Here are the settings to make invisible objects appear:
1755629435

Edited 1755629624
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That being said, I'm not sure that text objects can accept reactions? Edit: Yes they can, though it might require grouping them as described above, since it seems you can give them a conditional fade, but not an initial opacity.
In my testing, it looks like both the token and the transparent square token grouped with it, have to have the SAME settings - i.e. they both have to be set to 0% base opacity and have a conditional fade reaction of 100%. It doesn't work otherwise. And, it's as I originally said: "   I know I can do it by putting something on top of it that disappears as the player moves toward it." Or the object can be near it, too, but it requires a second object grouped with it. Note that it ONLY works with objects on the Token Layer, and it doesn't work in darkness. Objects on the Foreground :ayer can be set to be "above darkness" but objects on the Token Layer cannot. That means you can have something appear out of the darkness when you move away from it, but not when you move toward it, which is what I wanted. The bottom line is: what I wanted to do is not currently possible on Roll20.
1755706471
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hmm. In that case, I think the only option would be to create a graphic of some text outside of Roll20 and upload that. :/ Since you can set conditional transparency on a text object, it seems that there should be an option to set initial transparency. Would that be a solution to your problem?
Hm, well, I suck at creating graphics. :-) Otherwise, yeah, I'd consider that. As for setting the initial transparency, I *think* that would solve the problem, if it works like on a token.   My feeling is that an object is an object and it shouldn't matter whether it's a creature, a piece of furniture, a text, or a drawing. They should all essentially behave the same. keithcurtis said: Hmm. In that case, I think the only option would be to create a graphic of some text outside of Roll20 and upload that. :/ Since you can set conditional transparency on a text object, it seems that there should be an option to set initial transparency. Would that be a solution to your problem?
1755715253
Gold
Forum Champion
In a pinch... if you decided to go the Text-as-Graphic route... you can use a Logo Generator website to make Text as JPG, or Text as Animated GIF, surprisingly easily. Of course you would have to create it there, download the graphic file, then upload the graphic file into Roll20. After doing a lot of them, it could start to get cumbersome in your Art Library. Here's an example of the type of website that makes text-into-graphic easily,&nbsp; <a href="https://cooltext.com/Logo-Design-Fire" rel="nofollow">https://cooltext.com/Logo-Design-Fire</a> Saul J. said: Hm, well, I suck at creating graphics. :-) Otherwise, yeah, I'd consider that.
1755718980
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Saul J. said: Hm, well, I suck at creating graphics. :-) Otherwise, yeah, I'd consider that. As for setting the initial transparency, I *think* that would solve the problem, if it works like on a token.&nbsp;&nbsp; My feeling is that an object is an object and it shouldn't matter whether it's a creature, a piece of furniture, a text, or a drawing. They should all essentially behave the same. keithcurtis said: Hmm. In that case, I think the only option would be to create a graphic of some text outside of Roll20 and upload that. :/ Since you can set conditional transparency on a text object, it seems that there should be an option to set initial transparency. Would that be a solution to your problem? I have sent a query, since I know "Reactions" are a feature that is currently in development. API-wise, Text objects are different from graphics, in terms of their features. They don't have a calculated width or height you can measure, and they lack a lot of things like gmnotes, etc. This is also true in some respects of paths as well. Different objects have different groups of properties.
keithcurtis said: I have sent a query, since I know "Reactions" are a feature that is currently in development. API-wise, Text objects are different from graphics, in terms of their features. They don't have a calculated width or height you can measure, and they lack a lot of things like gmnotes, etc. This is also true in some respects of paths as well. Different objects have different groups of properties. Actually, they do have a calculated width or height because they have a text box around the text and you can calculate the height and width of it. That's the same as a token - a token can be round or square or rectangular.. but it's got a "box" around it that defines its height and width (generally, I think). And objects can have different PROPERTIES, but their BEHAVIOR should be the same. Character tokens and NPC tokens have different sheets, different setups, and a lot of different things but they behave the same way. This is not a new concept.
1755745928
timmaugh
Forum Champion
API Scripter
Actually, text objects have a left and a top, but their height &amp; width (at least in Jumpgate + Experimental sandbox) report as 0.
1755751781
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I used the same script, timmaugh. I didn't get 0, but height and width reported as the same integer values, regardless of size.
1755789442
timmaugh
Forum Champion
API Scripter
That's interesting. I wonder what is causing the initialization of those values, and why they don't scale...
1755790096
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I believe I had set the position programatically. Maybe that caused a value to propagate? Still doesn't explain why two different sized text objects had the same values, though.
Ok, well, all of that about the text box is well and good but I'm still stumped about the way the foreground layer, and things appearing/disappearing work. Here's a token on a page. The page is in "darkness". This is the GM's view of the Token Layer: The token is on some text that is on the Foreground Layer. Here is the Foreground Layer view: and the settings for the text: My intent is for the text to be "invisible" or in other words fade out while a token is on it. Here is a player POV: Oddly, this works if the player has control over the token: I've logged in as the player with control over this token dozens of times, and it's always looked correct. As soon as I take away the player's ability to control that token, the text becomes visible to that player. That's not what I expect, and not what I want.
1755794530

Edited 1755794540
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Interesting. So unless there isa player observer token, conditional transparency is ignored? This sounds like in needs some investigation. Just checking though—this is a separate issue from your initial goal in the top post, which was to make text appear as a reaction, not disappear?
1755820206
Pat
Pro
API Scripter
Saul J. said: I've logged in as the player with control over this token dozens of times, and it's always looked correct. As soon as I take away the player's ability to control that token, the text becomes visible to that player. That's not what I expect, and not what I want. The reactions are player/token specific so everyone doesn't see the interior of a building when the roof reacts to one player overlapping it.&nbsp;
Yes, it's a separate issue. I've "resolved" this for my current use by giving all players control over the token, and then "locking" the token in place so they don't move it around until I'm ready to do so for my current usage. I'm not sure (yet) how often this might come up in play. keithcurtis said: Interesting. So unless there isa player observer token, conditional transparency is ignored? This sounds like in needs some investigation. Just checking though—this is a separate issue from your initial goal in the top post, which was to make text appear as a reaction, not disappear?
Pat said: Saul J. said: I've logged in as the player with control over this token dozens of times, and it's always looked correct. As soon as I take away the player's ability to control that token, the text becomes visible to that player. That's not what I expect, and not what I want. The reactions are player/token specific so everyone doesn't see the interior of a building when the roof reacts to one player overlapping it.&nbsp; Which suggests that there might be a need for some sort of parameter that can indicate whether the object's fading is player/token specific or general for everyone who has "line of sight".&nbsp;